-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathansible
More file actions
29 lines (16 loc) · 801 Bytes
/
ansible
File metadata and controls
29 lines (16 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# ansible
> Manage groups of computers remotely over SSH.
> Use the /etc/ansible/hosts file to add new groups/hosts.
> More information: <https://www.ansible.com/>.
- List hosts belonging to a group:
ansible {{group}} --list-hosts
- Ping a group of hosts by invoking the ping module:
ansible {{group}} -m ping
- Display facts about a group of hosts by invoking the setup module:
ansible {{group}} -m setup
- Execute a command on a group of hosts by invoking command module with arguments:
ansible {{group}} -m command -a '{{my_command}}'
- Execute a command with administrative privileges:
ansible {{group}} --become --ask-become-pass -m command -a '{{my_command}}'
- Execute a command using a custom inventory file:
ansible {{group}} -i {{inventory_file}} -m command -a '{{my_command}}'