Last active
June 5, 2020 14:06
-
-
Save michaelkebe/cd714b71dd3bb22d2122b162ea0973e7 to your computer and use it in GitHub Desktop.
ansible group position bug when inventory is yml
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
[my_group] | |
host-1 | |
host-2 | |
host-3 |
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
all: | |
children: | |
my_group: | |
hosts: | |
host-1: | |
host-2: | |
host-3: |
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
--- | |
- hosts: my_group | |
- hosts: my_group[0] | |
- hosts: my_group[1] | |
- hosts: my_group[2] |
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
#!/bin/sh | |
ansible-inventory -i hosts.ini --graph all | |
ansible-playbook -i hosts.ini playbook.yml --list-hosts |
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
#!/bin/sh | |
ansible-inventory -i hosts.yml --graph all | |
ansible-playbook -i hosts.yml playbook.yml --list-hosts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment