Initial commit
This commit is contained in:
21
DOC/README.ad-hoc
Normal file
21
DOC/README.ad-hoc
Normal file
@ -0,0 +1,21 @@
|
||||
# ----
|
||||
# Execute 'ad-hoc' command through ansible with extended privileges
|
||||
# ---
|
||||
|
||||
ansibl all --become --become-method sudo --ask-become-pass -a 'whoami'
|
||||
|
||||
ansible all --become --become-method sudo --ask-become-pass -a 'uptime'
|
||||
|
||||
# - Note:
|
||||
# - alternatively, you can out the following entrie into your 'ansible-cfg' file:
|
||||
# -
|
||||
# - [privilege_escalation]
|
||||
# - become=True
|
||||
# - become_method=sudo
|
||||
# - become_ask_pass=True
|
||||
# -
|
||||
# - Now you can omit the the 'becom' flags:
|
||||
# -
|
||||
ansible all -a 'whoami'
|
||||
ansible all -a 'uptime'
|
||||
|
Reference in New Issue
Block a user