Ansible adhoc commands
This commit is contained in:
@@ -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