Last active
February 24, 2021 04:28
-
-
Save xbalaji/09232cc77ae8856a7126848b690ccc1f to your computer and use it in GitHub Desktop.
ansible-adhoc-facts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get facts from a remote 'myhost.com' with ssh user root, password on prompt | |
ansible all -i 'myhost.com,' -m setup -u root -k | |
# Ansible playbook structure - create directories first, so you can run a single touch command | |
mkdir -p group_vars host_vars library filter_plugin roles/common/{tasks,handlers,templates,files,vars,defaults,meta} | |
touch ansible.cfg hosts.ini site.yml staging.ini production.ini roles/common/{tasks,handlers,templates,files,vars,defaults,meta}/main.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment