Last active
September 9, 2016 06:17
-
-
Save gthieleb/87d9c9a4c717a1625926918e59a37840 to your computer and use it in GitHub Desktop.
ansible pointing to another hosts file
This file contains 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
# since 2.x use inventory | |
cat > ~/.ansible.cfg << EOF | |
[defaults] | |
inventory = ~/.ansible/hosts | |
EOF | |
test -d ~/.ansible || mkdir ~/.ansible | |
# put your hosts here | |
cat > ~/.ansible/hosts << EOF | |
[vms] | |
vm01 | |
vm02 | |
vm03 | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mkdir ~/.ansible