Ansible adhoc commands
This commit is contained in:
1 parent
522a316fad
commit
0e83fd5521
1 file changed
+14
@@ -1 +1,15 @@
|
||||
# Ansible
|
||||
|
||||
## Adhoc commands
|
||||
|
||||
**Generic**
|
||||
|
||||
```
|
||||
ansible <hosts/groups pattern> -l <limit pattern> -m <module> -a "<module args>" -u <login user> --become --ask-become-pass
|
||||
```
|
||||
|
||||
**Example**
|
||||
|
||||
```
|
||||
ansible all -l localhost -m systemd -a "name=nginx state=restarted" -u test --become --ask-become-pass
|
||||
```
|
||||
Reference in new issue
Block a user