/inventory.ini Secret
Last active
November 30, 2016 21:17
Trying out ansible's group-of-groups behavior, where the top-level group also includes hosts. Targeting groups B &C do *not* include the parent and chidlren; targetting group A appears to get all hosts correctly.
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
[groupA] | |
containerA ansible_host=10.3.114 | |
groupB | |
groupC | |
[groupB] | |
containerB ansible_host=10.3.45 | |
[groupC] | |
containerC ansible_host=10.0.3.60 |
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
NAME STATE IPV4 IPV6 AUTOSTART | |
------------------------------------------------ | |
containerA RUNNING 10.0.3.114 - NO | |
containerB RUNNING 10.0.3.45 - NO | |
containerC RUNNING 10.0.3.60 - NO |
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
root@nrb-ord-aio:~# ansible -m ping -i inventory groupA | |
containerC | UNREACHABLE! => { | |
"changed": false, | |
"msg": "Failed to connect to the host via ssh: ssh: connect to host 10.0.3.60 port 22: Connection refused\r\n", | |
"unreachable": true | |
} | |
containerA | UNREACHABLE! => { | |
"changed": false, | |
"msg": "Failed to connect to the host via ssh: ssh: connect to host 10.3.114 port 22: Connection timed out\r\n", | |
"unreachable": true | |
} | |
containerB | UNREACHABLE! => { | |
"changed": false, | |
"msg": "Failed to connect to the host via ssh: ssh: connect to host 10.3.45 port 22: Connection timed out\r\n", | |
"unreachable": true | |
} | |
root@nrb-ord-aio:~# ansible -m ping -i inventory groupC | |
containerC | UNREACHABLE! => { | |
"changed": false, | |
"msg": "Failed to connect to the host via ssh: ssh: connect to host 10.0.3.60 port 22: Connection refused\r\n", | |
"unreachable": true | |
} | |
root@nrb-ord-aio:~# ansible -m ping -i inventory groupB | |
containerB | UNREACHABLE! => { | |
"changed": false, | |
"msg": "Failed to connect to the host via ssh: ssh: connect to host 10.3.45 port 22: Connection timed out\r\n", | |
"unreachable": true | |
} | |
root@nrb-ord-aio:~# ansible -m ping -i inventory containerA | |
containerA | UNREACHABLE! => { | |
"changed": false, | |
"msg": "Failed to connect to the host via ssh: ssh: connect to host 10.3.114 port 22: Connection timed out\r\n", | |
"unreachable": true | |
} | |
root@nrb-ord-aio:~# ansible -m ping -i inventory containerC | |
containerC | UNREACHABLE! => { | |
"changed": false, | |
"msg": "Failed to connect to the host via ssh: ssh: connect to host 10.0.3.60 port 22: Connection refused\r\n", | |
"unreachable": true | |
} | |
root@nrb-ord-aio:~# ansible -m ping -i inventory containerB | |
containerB | UNREACHABLE! => { | |
"changed": false, | |
"msg": "Failed to connect to the host via ssh: ssh: connect to host 10.3.45 port 22: Connection timed out\r\n", | |
"unreachable": true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment