CiscoDevNet / learning-labs-issues

Defects and bugs in learning lab content and project management
4 stars 0 forks source link

ansible-ios-module #261

Closed bfernando1 closed 4 years ago

bfernando1 commented 4 years ago

In [ansible-ios-module][lab] the Playbook uses port 8181 to connect to the IOS device. This port isn't open from the dev box or my local machine.

nc -zv 10.10.20.48 8181
nc: connectx to 10.10.20.48 port 8181 (tcp) failed: Connection refused

After updating group_vars/iosxe.yaml to port 22, the playbook then times out.

Here's what I used to test:

ansible-playbook ansible-02-ios-modules/02-ios_command_show_ntp.yaml -i hosts -e "hosts=iosxe"

Here's how I modified group_vars

ansible_connection: network_cli
ansible_become: yes
ansible_become_method: enable
ansible_network_os: ios
ansible_user: 'developer'
ansible_ssh_pass: 'C1sco12345'
ansible_port: 22
[lab]: https://developer.cisco.com/learning/modules/intro-ansible-iosxe/ansible-ios-modules/step/2
bfernando1 commented 4 years ago

Please classify this as Severity 1

annegentle commented 4 years ago

Hi, I've removed the reference to the DevNet DevBox as those are no longer configured to have outside access. You can provision one yourself with https://github.com/DevNetSandbox/sbx_devbox/tree/master/devbox_build if you like.

I also understand that the SSH port is 8181 when using the required infrastructure either at a DevNet Express or using the IOS XE on CSR Recommended Sandbox, which likely explains why changing the YAML reference to port 22 did not work.

bfernando1 commented 4 years ago

I ran the playbook on the [Always On: IOS XE on CSR Latest Code Always On][lab] lab and it's working appropriately.

(venv) ➜  intro-ansible git:(master) ansible-playbook ansible-02-ios-modules/02-ios_command_show.yaml

PLAY [Sample IOS show version for Ansible 2.5] *********************************

TASK [GATHERING FACTS] *********************************************************
ok: [ios-xe-mgmt.cisco.com]
...
...
...
PLAY RECAP *********************************************************************
ios-xe-mgmt.cisco.com      : ok=6    changed=0    unreachable=0    failed=0

Closing [Issue #26][issue]

[lab]: https://devnetsandbox.cisco.com/RM/Diagram/Index/38ded1f0-16ce-43f2-8df5-43a40ebf752e?diagramType=Topology [issue]: https://github.com/CiscoDevNet/learning-labs-issues/issues/261