So I want to reach out to my router. I first try
raub@desktop:~/dev/ansible$ ssh janitor@uranus.example.com
janitor@uranus. example.com's password:
which is expected since I have ssh'd into the router quite many times
from this computer. i.e. by now it knows uranus quite well. Just to be
paranoid, let's try port 830 as this is a Juniper router:
raub@desktop:~/dev/ansible$ ssh -p 830 janitor@uranus.mgmt.kushana.com
janitor@uranus.mgmt.kushana.com's password:
So far so good. Then I run a quick ansible test:
raub@desktop:~/dev/ansible$ ansible-playbook -vvv network.yml --limit uranus
[...]
ok: [uranus] => {
"changed": false,
"elapsed": 0,
"invocation": {
"module_args": {
"active_connection_states": [
"ESTABLISHED",
"FIN_WAIT1",
"FIN_WAIT2",
"SYN_RECV",
"SYN_SENT",
"TIME_WAIT"
],
"connect_timeout": 5,
"delay": 0,
"exclude_hosts": null,
"host": "uranus.example.com",
"msg": null,
"path": null,
"port": 830,
"search_regex": null,
"sleep": 1,
"state": "started",
"timeout": 300
}
},
"match_groupdict": {},
"match_groups": ,
"path": null,
"port": 830,
"search_regex": null,
"state": "started"
}
TASK [network : Get facts about "uranus"]