Go to file
2021-06-01 00:19:50 +02:00
.gitignore Initial commit 2019-05-30 17:52:45 +02:00
ansible.cfg Initial commit 2019-05-30 17:52:45 +02:00
hosts Adjust 'hosts'-file. 2021-06-01 00:19:50 +02:00
README.ad-hoc Initial commit 2019-05-30 17:52:45 +02:00
update-git-repositories.retry Initial commit 2019-05-30 17:52:45 +02:00
update-git-repositories.yml Initial commit 2019-05-30 17:52:45 +02:00
upgrade.yml Initial commit 2019-05-30 17:52:45 +02:00

# ----
# 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'