dell-networking / ansible-dellos-examples Goto Github PK
View Code? Open in Web Editor NEWSample Ansible playbooks to understand how the Dell EMC Networking Anisble Module works.
License: Apache License 2.0
Sample Ansible playbooks to understand how the Dell EMC Networking Anisble Module works.
License: Apache License 2.0
##ERROR! couldn't resolve module/action 'dellos_vlan'. This often indicates a misspelling, missing collection, or incorrect module path.##
How can I use the dellos_vlan feature?
I can't understand why ansible is unable to find the "dellos_vlan".
Hey guys,
I've managed to connect to my core switches (Force 10 S4810s) with the dellos9 module, but cannot successfully connect to any of my edge switches (PowerConnect 5548Ps) using dellos6 module.
I believe this could be due to the odd way that these switches provide SSH auth, as they use non-standard SSH login prompt (Using ssh user@switchname
results in the switch still prompting for username & password).
Any ideas on how I can get around this?
Cheers.
Unable to do a show run or a backup of a Dell OS 6 device.
found that if I remove these lines on an interface the issue is fixed
interface tengigabitethernet 1/0/14
ip dhcp snooping log-invalid
ip dhcp snooping trust
Error output:
10.16.0.2> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-local-12020o4njal5o/ansible-tmp-1641886808.38716-12057-13075119202984/ > /dev/null 2>&1 && sleep 0'
fatal: [Core1]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"commands": [
"show running-config"
],
"interval": 1,
"match": "all",
"provider": null,
"retries": 10,
"wait_for": null
}
},
"msg": "ect dcbxp ets-config\r\nno lldp tlv-select dcbxp ets-recommend\r\nno lldp tlv-select dcbxp pfc\r\nno lldp tlv-select dcbxp application-priority\r\nexit\r\n!\r\ninterface Te1/0/14\r\nip dhcp snooping trust\r\nip dhcp snooping log-invalid\r\nswitchport mode trunk\r\nno lldp tlv",
"rc": -32603
}
I´m Using Foreman with Ansible and i need the dellos 6 module. When i´m running my Playbook on Ansible, i got no issues:
---
- hosts: testos
gather_facts: yes
tasks:
- name: backup
dellos6_config:
backup: yes
backup_options:
dir_path: /home/{{ inventory_hostname }}
But, when i run a Playbook as Job-Template in Foreman with this collection it dosen work, but i gave the Host the same vars witch i set in the Ansible inventory file. It is not just the dellos6_config, the dellos6_command dosent work aswell. I tried the solving on this thread: #12, but it dosent work. My full log for the issue is:
1:
ansible-playbook 2.9.19
2:
config file = /usr/share/foreman-proxy/.ansible.cfg
3:
configured module search path = [u'/usr/share/foreman-proxy/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
4:
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
5:
executable location = /usr/bin/ansible-playbook
6:
python version = 2.7.17 (default, Feb 27 2021, 15:10:58) [GCC 7.5.0]
7:
Using /usr/share/foreman-proxy/.ansible.cfg as config file
8:
setting up inventory plugins
9:
host_list declined parsing /usr/lib/ruby/bin/json_inventory.sh as it did not pass its verify_file() method
10:
Parsed /usr/lib/ruby/bin/json_inventory.sh inventory source with script plugin
11:
Loading callback plugin yaml of type stdout, v2.0 from /usr/lib/python2.7/dist-packages/ansible/plugins/callback/yaml.pyc
12:
[WARNING]: Skipping callback plugin '', unable to load
13:
Skipping callback 'actionable', as we already have a stdout callback.
14:
Skipping callback 'counter_enabled', as we already have a stdout callback.
15:
Skipping callback 'debug', as we already have a stdout callback.
16:
Skipping callback 'dense', as we already have a stdout callback.
17:
Skipping callback 'dense', as we already have a stdout callback.
18:
Skipping callback 'full_skip', as we already have a stdout callback.
19:
Skipping callback 'json', as we already have a stdout callback.
20:
Skipping callback 'minimal', as we already have a stdout callback.
21:
Skipping callback 'null', as we already have a stdout callback.
22:
Skipping callback 'oneline', as we already have a stdout callback.
23:
Skipping callback 'selective', as we already have a stdout callback.
24:
Skipping callback 'skippy', as we already have a stdout callback.
25:
Skipping callback 'stderr', as we already have a stdout callback.
26:
Skipping callback 'unixy', as we already have a stdout callback.
27:
Skipping callback 'yaml', as we already have a stdout callback.
28:
29:
PLAYBOOK: foreman-playbook-66e8dc2a-b26a-4a9b-aa07-ef73afe9d8cf.yml ************
30:
Positional arguments: /tmp/foreman-playbook-66e8dc2a-b26a-4a9b-aa07-ef73afe9d8cf.yml
31:
become_method: sudo
32:
inventory: (u'/usr/lib/ruby/bin/json_inventory.sh',)
33:
forks: 5
34:
tags: (u'all',)
35:
verbosity: 4
36:
connection: smart
37:
timeout: 10
38:
1 plays in /tmp/foreman-playbook-66e8dc2a-b26a-4a9b-aa07-ef73afe9d8cf.yml
39:
40:
PLAY [all] *********************************************************************
41:
META: ran handlers
42:
43:
TASK [backup] ******************************************************************
44:
task path: /tmp/foreman-playbook-66e8dc2a-b26a-4a9b-aa07-ef73afe9d8cf.yml:7
45:
<10.230.220.111> attempting to start connection
46:
<10.230.220.111> using connection plugin ansible.netcommon.network_cli
47:
<10.230.220.111> local domain socket does not exist, starting it
48:
<10.230.220.111> control socket path is /var/lib/foreman-proxy/ansible/pc/d2db63d60a
49:
<10.230.220.111> local domain socket listeners started successfully
50:
<10.230.220.111> loaded cliconf plugin ansible_collections.dellemc.os6.plugins.cliconf.os6 from path /usr/share/ansible/collections/ansible_collections/dellemc/os6/plugins/cliconf/os6.py for network_os dellemc.os6.os6
51:
<10.230.220.111>
52:
<10.230.220.111> local domain socket path is /var/lib/foreman-proxy/ansible/pc/d2db63d60a
53:
<10.230.220.111> Using network group action dellos6 for dellos6_config
54:
<10.230.220.111> ESTABLISH LOCAL CONNECTION FOR USER: foreman-proxy
55:
<10.230.220.111> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /tmp/ansible-local-4300Nqd9CG `"&& mkdir "` echo /tmp/ansible-local-4300Nqd9CG/ansible-tmp-1618168803.43-4309-161039117427704 `" && echo ansible-tmp-1618168803.43-4309-161039117427704="` echo /tmp/ansible-local-4300Nqd9CG/ansible-tmp-1618168803.43-4309-161039117427704 `" ) && sleep 0'
56:
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/network/dellos6/dellos6_config.py
57:
<10.230.220.111> PUT /tmp/ansible-local-4300Nqd9CG/tmpU18qXm TO /tmp/ansible-local-4300Nqd9CG/ansible-tmp-1618168803.43-4309-161039117427704/AnsiballZ_dellos6_config.py
58:
<10.230.220.111> EXEC /bin/sh -c 'chmod u+x /tmp/ansible-local-4300Nqd9CG/ansible-tmp-1618168803.43-4309-161039117427704/ /tmp/ansible-local-4300Nqd9CG/ansible-tmp-1618168803.43-4309-161039117427704/AnsiballZ_dellos6_config.py && sleep 0'
59:
<10.230.220.111> EXEC /bin/sh -c '/usr/bin/python3 /tmp/ansible-local-4300Nqd9CG/ansible-tmp-1618168803.43-4309-161039117427704/AnsiballZ_dellos6_config.py && sleep 0'
60:
<10.230.220.111> EXEC /bin/sh -c 'rm -f -r /tmp/ansible-local-4300Nqd9CG/ansible-tmp-1618168803.43-4309-161039117427704/ > /dev/null 2>&1 && sleep 0'
61:
The full traceback is:
62:
File "/tmp/ansible_dellos6_config_payload_peyt_jaa/ansible_dellos6_config_payload.zip/ansible/module_utils/network/dellos6/dellos6.py", line 86, in get_config
63:
return _DEVICE_CONFIGS[cmd]
64:
fatal: [szdsw.1.11.1]: FAILED! => changed=false
65:
invocation:
66:
module_args:
67:
after: null
68:
auth_pass: null
69:
authorize: null
70:
backup: true
71:
backup_options:
72:
dir_path: /home/szdsw.1.11.1
73:
filename: null
74:
before: null
75:
config: null
76:
host: null
77:
lines: null
78:
match: line
79:
parents: null
80:
password: null
81:
port: null
82:
provider: null
83:
replace: line
84:
save: false
85:
src: null
86:
ssh_keyfile: null
87:
timeout: null
88:
update: merge
89:
username: null
90:
msg: unable to retrieve current config
91:
stderr: Unable to decode JSON from response to exec_command(show running-config). Received 'None'.
92:
stderr_lines: <omitted>
93:
94:
PLAY RECAP *********************************************************************
95:
szdsw.1.11.1 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
96:
If it´s help, i can give you the -vvvv ouput of the ansible run witch works every time:
PLAYBOOK: test.yml *********************************************************************
Positional arguments: test.yml
become_method: enable
inventory: (u'/etc/ansible/hosts',)
forks: 5
tags: (u'all',)
verbosity: 4
connection: smart
timeout: 10
become: True
1 plays in test.yml
PLAY [testos] **************************************************************************
TASK [Gathering Facts] *****************************************************************
task path: /home/rz/test/test.yml:3
<10.230.220.111> attempting to start connection
<10.230.220.111> using connection plugin network_cli
<10.230.220.111> local domain socket does not exist, starting it
<10.230.220.111> control socket path is /root/.ansible/pc/ed2646cbac
<10.230.220.111> local domain socket listeners started successfully
<10.230.220.111> loaded cliconf plugin ansible_collections.dellemc.os6.plugins.cliconf.os6 from path /root/.ansible/collections/ansible_collections/dellemc/os6/plugins/cliconf/os6.py for network_os dellemc.os6.os6
<10.230.220.111>
<10.230.220.111> local domain socket path is /root/.ansible/pc/ed2646cbac
<10.230.220.111> ESTABLISH LOCAL CONNECTION FOR USER: root
<10.230.220.111> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-local-64941JlxiH `"&& mkdir "` echo /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169891.12-6501-182112744120939 `" && echo ansible-tmp-1618169891.12-6501-182112744120939="` echo /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169891.12-6501-182112744120939 `" ) && sleep 0'
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/system/setup.py
<10.230.220.111> PUT /root/.ansible/tmp/ansible-local-64941JlxiH/tmpfdnTN9 TO /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169891.12-6501-182112744120939/AnsiballZ_setup.py
<10.230.220.111> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169891.12-6501-182112744120939/ /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169891.12-6501-182112744120939/AnsiballZ_setup.py && sleep 0'
<10.230.220.111> EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169891.12-6501-182112744120939/AnsiballZ_setup.py && sleep 0'
<10.230.220.111> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169891.12-6501-182112744120939/ > /dev/null 2>&1 && sleep 0'
ok: [rzdsw-sz1-11-1]
HTTPSConnectionPool(host='foreman.sonia.de', port=443): Max retries exceeded with url: /api/v2/hosts/facts (Caused by SSLError(SSLError(1, u'[SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1946)'),))
META: ran handlers
TASK [backup] **************************************************************************
task path: /home/rz/test/test.yml:8
<10.230.220.111> attempting to start connection
<10.230.220.111> using connection plugin network_cli
<10.230.220.111> found existing local domain socket, using it!
<10.230.220.111> updating play_context for connection
<10.230.220.111>
<10.230.220.111> local domain socket path is /root/.ansible/pc/ed2646cbac
<10.230.220.111> Using network group action dellos6 for dellos6_config
<10.230.220.111> ESTABLISH LOCAL CONNECTION FOR USER: root
<10.230.220.111> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-local-64941JlxiH `"&& mkdir "` echo /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169894.21-6624-35579316833252 `" && echo ansible-tmp-1618169894.21-6624-35579316833252="` echo /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169894.21-6624-35579316833252 `" ) && sleep 0'
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/network/dellos6/dellos6_config.py
<10.230.220.111> PUT /root/.ansible/tmp/ansible-local-64941JlxiH/tmpLoXvxy TO /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169894.21-6624-35579316833252/AnsiballZ_dellos6_config.py
<10.230.220.111> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169894.21-6624-35579316833252/ /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169894.21-6624-35579316833252/AnsiballZ_dellos6_config.py && sleep 0'
<10.230.220.111> EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169894.21-6624-35579316833252/AnsiballZ_dellos6_config.py && sleep 0'
<10.230.220.111> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169894.21-6624-35579316833252/ > /dev/null 2>&1 && sleep 0'
<10.230.220.111> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-local-64941JlxiH `"&& mkdir "` echo /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169901.4-6624-210183191206346 `" && echo ansible-tmp-1618169901.4-6624-210183191206346="` echo /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169901.4-6624-210183191206346 `" ) && sleep 0'
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/files/stat.py
<10.230.220.111> PUT /root/.ansible/tmp/ansible-local-64941JlxiH/tmpyTgn5W TO /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169901.4-6624-210183191206346/AnsiballZ_stat.py
<10.230.220.111> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169901.4-6624-210183191206346/ /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169901.4-6624-210183191206346/AnsiballZ_stat.py && sleep 0'
<10.230.220.111> EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169901.4-6624-210183191206346/AnsiballZ_stat.py && sleep 0'
<10.230.220.111> PUT /root/.ansible/tmp/ansible-local-64941JlxiH/tmpnJXl1_ TO /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169901.4-6624-210183191206346/source
<10.230.220.111> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169901.4-6624-210183191206346/ /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169901.4-6624-210183191206346/source && sleep 0'
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/files/copy.py
<10.230.220.111> PUT /root/.ansible/tmp/ansible-local-64941JlxiH/tmp3sgZh2 TO /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169901.4-6624-210183191206346/AnsiballZ_copy.py
<10.230.220.111> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169901.4-6624-210183191206346/ /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169901.4-6624-210183191206346/AnsiballZ_copy.py && sleep 0'
<10.230.220.111> EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169901.4-6624-210183191206346/AnsiballZ_copy.py && sleep 0'
<10.230.220.111> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-local-64941JlxiH/ansible-tmp-1618169901.4-6624-210183191206346/ > /dev/null 2>&1 && sleep 0'
changed: [rzdsw-sz1-11-1] => {
"backup_path": "/home/rzdsw-sz1-11-1/rzdsw-sz1-11-1_config.2021-04-11@19:38:21",
"changed": true,
"date": "2021-04-11",
"filename": "rzdsw-sz1-11-1_config.2021-04-11@19:38:21",
"invocation": {
"module_args": {
"after": null,
"auth_pass": null,
"authorize": null,
"backup": true,
"backup_options": {
"dir_path": "/home/rzdsw-sz1-11-1",
"filename": null
},
"before": null,
"config": null,
"host": null,
"lines": null,
"match": "line",
"parents": null,
"password": null,
"port": null,
"provider": null,
"replace": "line",
"save": false,
"src": null,
"ssh_keyfile": null,
"timeout": null,
"update": "merge",
"username": null
}
},
"saved": false,
"shortname": "/home/rzdsw-sz1-11-1/rzdsw-sz1-11-1_config",
"time": "19:38:21"
}
META: ran handlers
META: ran handlers
PLAY RECAP *****************************************************************************
rzdsw-sz1-11-1 : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
dellos6_config fails with minimal output. I increased the timers just in case, and verified that I could ssh to the host via the command ansible host.
2019-01-21 20:00:54,885 p=4908 u=rmerolle | network_os is set to dellos6
2019-01-21 20:00:54,988 p=4915 u=rmerolle | paramiko [172.16.13.11] starting thread (client mode): 0x3270210L
2019-01-21 20:00:54,989 p=4915 u=rmerolle | paramiko [172.16.13.11] Local version/idstring: SSH-2.0-paramiko_2.4.2
2019-01-21 20:00:55,029 p=4915 u=rmerolle | paramiko [172.16.13.11] Remote version/idstring: SSH-2.0-OpenSSH_7.5
2019-01-21 20:00:55,029 p=4915 u=rmerolle | paramiko [172.16.13.11] Connected (version 2.0, client OpenSSH_7.5)
2019-01-21 20:00:55,065 p=4915 u=rmerolle | paramiko [172.16.13.11] kex algos:[u'curve25519-sha256', u'[email protected]', u'diffie-hellman-group-exchange-sha256', u'diffie-hellman-group16-sha512', u'diffie-hellman-group18-sha512', u'diffie-hellman-group14-sha256', u'diffie-hellman-group14-sha1'] server key:[u'ssh-rsa', u'rsa-sha2-512', u'rsa-sha2-256'] client encrypt:[u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'[email protected]', u''] server encrypt:[u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'[email protected]', u''] client mac:[u'hmac-sha1', u'[email protected]', u'hmac-sha2-256', u'hmac-sha2-512', u'[email protected]', u'[email protected]', u''] server mac:[u'hmac-sha1', u'[email protected]', u'hmac-sha2-256', u'hmac-sha2-512', u'[email protected]', u'[email protected]', u''] client compress:[u'none', u'[email protected]'] server compress:[u'none', u'[email protected]'] client lang:[u''] server lang:[u''] kex follows?False
2019-01-21 20:00:55,066 p=4915 u=rmerolle | paramiko [172.16.13.11] Kex agreed: diffie-hellman-group-exchange-sha256
2019-01-21 20:00:55,066 p=4915 u=rmerolle | paramiko [172.16.13.11] HostKey agreed: ssh-rsa
2019-01-21 20:00:55,067 p=4915 u=rmerolle | paramiko [172.16.13.11] Cipher agreed: aes128-ctr
2019-01-21 20:00:55,067 p=4915 u=rmerolle | paramiko [172.16.13.11] MAC agreed: hmac-sha2-256
2019-01-21 20:00:55,068 p=4915 u=rmerolle | paramiko [172.16.13.11] Compression agreed: none
2019-01-21 20:00:55,764 p=4915 u=rmerolle | paramiko [172.16.13.11] Got server p (8192 bits)
2019-01-21 20:00:58,819 p=4915 u=rmerolle | paramiko [172.16.13.11] kex engine KexGexSHA256 specified hash_algo <built-in function openssl_sha256>
2019-01-21 20:00:58,821 p=4915 u=rmerolle | paramiko [172.16.13.11] Switch to new keys ...
2019-01-21 20:00:58,925 p=4915 u=rmerolle | paramiko [172.16.13.11] userauth is OK
2019-01-21 20:01:03,040 p=4915 u=rmerolle | paramiko [172.16.13.11] Authentication (password) successful!
2019-01-21 20:01:03,064 p=4915 u=rmerolle | paramiko [172.16.13.11] [chan 0] Max packet in: 32768 bytes
2019-01-21 20:01:03,088 p=4915 u=rmerolle | paramiko [172.16.13.11] Received global request "[email protected]"
2019-01-21 20:01:03,089 p=4915 u=rmerolle | paramiko [172.16.13.11] Rejecting "[email protected]" global request from server.
2019-01-21 20:01:03,128 p=4915 u=rmerolle | paramiko [172.16.13.11] [chan 0] Max packet out: 32768 bytes
2019-01-21 20:01:03,128 p=4915 u=rmerolle | paramiko [172.16.13.11] Secsh channel 0 opened.
2019-01-21 20:01:03,178 p=4915 u=rmerolle | paramiko [172.16.13.11] [chan 0] Sesch channel 0 request ok
2019-01-21 20:01:03,218 p=4915 u=rmerolle | paramiko [172.16.13.11] [chan 0] Sesch channel 0 request ok
2019-01-21 20:01:04,171 p=4896 u=rmerolle | Using module file /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ansible/modules/network/dellos6/dellos6_config.py
2019-01-21 20:01:44,314 p=4908 u=rmerolle | command timeout triggered, timeout value is 40 secs.
See the timeout setting options in the Network Debug and Troubleshooting Guide.
2019-01-21 20:01:44,343 p=4896 u=rmerolle | The full traceback is:
WARNING: The below traceback may *not* be related to the actual failure.
File "/var/folders/5l/b5g8v52d1cn_6d_zvccsjss4pdcnx3/T/ansible_dellos6_config_payload_lVlaGE/ansible_dellos6_config_payload.zip/ansible/module_utils/network/dellos6/dellos6.py", line 86, in get_config
return _DEVICE_CONFIGS[cmd]
2019-01-21 20:01:44,344 p=4896 u=rmerolle | fatal: [172.16.13.11]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"after": null,
"auth_pass": null,
"authorize": null,
"backup": true,
"before": null,
"config": null,
"host": null,
"lines": null,
"match": "line",
"parents": null,
"password": null,
"port": null,
"provider": null,
"replace": "line",
"save": false,
"src": null,
"ssh_keyfile": null,
"timeout": null,
"update": "merge",
"username": null
}
},
"msg": "unable to retrieve current config",
"stderr": "command timeout triggered, timeout value is 40 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide.",
"stderr_lines": [
"command timeout triggered, timeout value is 40 secs.",
"See the timeout setting options in the Network Debug and Troubleshooting Guide."
]
}
2019-01-21 20:01:44,345 p=4915 u=rmerolle | paramiko [172.16.13.11] [chan 0] EOF sent (0)
2019-01-21 20:01:44,385 p=4915 u=rmerolle | paramiko [172.16.13.11] EOF in transport thread
2019-01-21 20:01:44,416 p=4896 u=rmerolle | PLAY RECAP ***************************************************************************************************************************************
2019-01-21 20:01:44,416 p=4896 u=rmerolle | 172.16.13.11 : ok=1 changed=0 unreachable=0 failed=1
2019-01-21 20:01:44,416 p=4896 u=rmerolle | localhost : ok=1 changed=0 unreachable=0 failed=0
2019-01-21 20:01:44,517 p=4908 u=rmerolle | shutdown complete
2019-01-21 20:02:05,490 p=5063 u=rmerolle | ansible-playbook 2.7.6
config file = /Users/rmerolle/repos/git/network-automation/ad-hoc/ansible.cfg
configured module search path = [u'/Users/rmerolle/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ansible
executable location = /Library/Frameworks/Python.framework/Versions/2.7/bin/ansible-playbook
python version = 2.7.15 (v2.7.15:ca079a3ea3, Apr 29 2018, 20:59:26) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
associated vars:
ansible_network_os: dellos6
ansible_connection: network_cli
ansible_command_timeout: 180
ansible_buffer_read_timeout: 10
ansible_user: user
ansible_ssh_pass: password
associated task:
- name: PULL CONFIG
dellos6_config:
backup: yes
register: config_output
Is the Force10 S60 supported? I'm running 8.3.3.10 but unfortunately can not get it to work with dellos6, dellos9 or dellos10.
Hi,
When applying a playbook to create some port-channels on an s4148f with OS10, I keep getting this error:
fatal: [sw-06.us01]: FAILED! => {
"changed": false,
"err": "socket_path does not exist or cannot be found"
}
MSG:
unable to enter configuration mode
The playbook I'm applying is:
---
- name: test dell sw config
hosts: sw-06.us01
connection: network_cli
tasks:
- name: create port channels
dellos10_config:
lines:
- interface port-channel 1
- no shutdown
- switchport mode trunk
- switchport access vlan 1
- vlt-port-channel 1
- name: create port channels
dellos10_config:
lines:
- interface port-channel {{ item }}
- no shutdown
- switchport mode trunk
- switchport access vlan 1
- vlt-port-channel {{ item }}
loop:
- 2
- 3
Here is the very verbose output from the commands I've been trying to run:
# maxx @ MacBook-Pro-2 in ~/TK/ansible/dell-switches on git:master x [12:06:15] C:2
$ ansible-playbook -vvv -i inventory.yaml mve-pre-bonding.yaml
ansible-playbook 2.5.0
config file = /Users/maxx/.ansible.cfg
configured module search path = [u'/Users/maxx/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/2.5.0/libexec/lib/python2.7/site-packages/ansible
executable location = /usr/local/bin/ansible-playbook
python version = 2.7.14 (default, Sep 25 2017, 09:54:19) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]
Using /Users/maxx/.ansible.cfg as config file
Parsed /Users/maxx/TK/ansible/dell-switches/inventory.yaml inventory source with ini plugin
PLAYBOOK: mve-pre-bonding.yaml ***********************************************************************************************************************************************************************************************************************************************
1 plays in mve-pre-bonding.yaml
PLAY [test dell sw config] ***************************************************************************************************************************************************************************************************************************************************
TASK [Gathering Facts] *******************************************************************************************************************************************************************************************************************************************************
task path: /Users/maxx/TK/ansible/dell-switches/mve-pre-bonding.yaml:2
Using module file /usr/local/Cellar/ansible/2.5.0/libexec/lib/python2.7/site-packages/ansible/modules/system/setup.py
<sw-06.us01.textkernel.net> ESTABLISH LOCAL CONNECTION FOR USER: maxx
<sw-06.us01.textkernel.net> EXEC /bin/sh -c 'echo ~ && sleep 0'
<sw-06.us01.textkernel.net> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /Users/maxx/.ansible/tmp/ansible-tmp-1524570660.1-278950133217066 `" && echo ansible-tmp-1524570660.1-278950133217066="` echo /Users/maxx/.ansible/tmp/ansible-tmp-1524570660.1-278950133217066 `" ) && sleep 0'
<sw-06.us01.textkernel.net> PUT /Users/maxx/.ansible/tmp/ansible-local-15482GDas1F/tmprJ8A6C TO /Users/maxx/.ansible/tmp/ansible-tmp-1524570660.1-278950133217066/setup.py
<sw-06.us01.textkernel.net> EXEC /bin/sh -c 'chmod u+x /Users/maxx/.ansible/tmp/ansible-tmp-1524570660.1-278950133217066/ /Users/maxx/.ansible/tmp/ansible-tmp-1524570660.1-278950133217066/setup.py && sleep 0'
<sw-06.us01.textkernel.net> EXEC /bin/sh -c '/usr/bin/python /Users/maxx/.ansible/tmp/ansible-tmp-1524570660.1-278950133217066/setup.py && sleep 0'
<sw-06.us01.textkernel.net> EXEC /bin/sh -c 'rm -f -r /Users/maxx/.ansible/tmp/ansible-tmp-1524570660.1-278950133217066/ > /dev/null 2>&1 && sleep 0'
ok: [sw-06.us01]
META: ran handlers
TASK [create port channels] **************************************************************************************************************************************************************************************************************************************************
task path: /Users/maxx/TK/ansible/dell-switches/mve-pre-bonding.yaml:7
Using module file /usr/local/Cellar/ansible/2.5.0/libexec/lib/python2.7/site-packages/ansible/modules/network/dellos10/dellos10_config.py
<sw-06.us01.textkernel.net> ESTABLISH LOCAL CONNECTION FOR USER: maxx
<sw-06.us01.textkernel.net> EXEC /bin/sh -c 'echo ~ && sleep 0'
<sw-06.us01.textkernel.net> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /Users/maxx/.ansible/tmp/ansible-tmp-1524570663.76-280540794051151 `" && echo ansible-tmp-1524570663.76-280540794051151="` echo /Users/maxx/.ansible/tmp/ansible-tmp-1524570663.76-280540794051151 `" ) && sleep 0'
<sw-06.us01.textkernel.net> PUT /Users/maxx/.ansible/tmp/ansible-local-15482GDas1F/tmpejen1R TO /Users/maxx/.ansible/tmp/ansible-tmp-1524570663.76-280540794051151/dellos10_config.py
<sw-06.us01.textkernel.net> EXEC /bin/sh -c 'chmod u+x /Users/maxx/.ansible/tmp/ansible-tmp-1524570663.76-280540794051151/ /Users/maxx/.ansible/tmp/ansible-tmp-1524570663.76-280540794051151/dellos10_config.py && sleep 0'
<sw-06.us01.textkernel.net> EXEC /bin/sh -c '/usr/bin/python /Users/maxx/.ansible/tmp/ansible-tmp-1524570663.76-280540794051151/dellos10_config.py && sleep 0'
<sw-06.us01.textkernel.net> EXEC /bin/sh -c 'rm -f -r /Users/maxx/.ansible/tmp/ansible-tmp-1524570663.76-280540794051151/ > /dev/null 2>&1 && sleep 0'
fatal: [sw-06.us01]: FAILED! => {
"changed": false,
"err": "socket_path does not exist or cannot be found",
"invocation": {
"module_args": {
"after": null,
"auth_pass": null,
"authorize": null,
"backup": false,
"before": null,
"config": null,
"host": null,
"lines": [
"interface port-channel 1",
"no shutdown",
"switchport mode trunk",
"switchport access vlan 1",
"vlt-port-channel 1"
],
"match": "line",
"parents": null,
"password": null,
"port": null,
"provider": null,
"replace": "line",
"save": false,
"src": null,
"ssh_keyfile": null,
"timeout": null,
"update": "merge",
"username": null
}
}
}
MSG:
unable to enter configuration mode
to retry, use: --limit @/Users/maxx/TK/ansible/dell-switches/mve-pre-bonding.retry
PLAY RECAP *******************************************************************************************************************************************************************************************************************************************************************
sw-06.us01 : ok=1 changed=0 unreachable=0 failed=1
# maxx @ MacBook-Pro-2 in ~/TK/ansible/dell-switches on git:master x [13:51:14] C:2
$ ansible-playbook -vvv -i inventory.yaml mve-pre-bonding.yaml --limit @/Users/maxx/TK/ansible/dell-switches/mve-pre-bonding.retry
ansible-playbook 2.5.0
config file = /Users/maxx/.ansible.cfg
configured module search path = [u'/Users/maxx/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/2.5.0/libexec/lib/python2.7/site-packages/ansible
executable location = /usr/local/bin/ansible-playbook
python version = 2.7.14 (default, Sep 25 2017, 09:54:19) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]
Using /Users/maxx/.ansible.cfg as config file
Parsed /Users/maxx/TK/ansible/dell-switches/inventory.yaml inventory source with ini plugin
PLAYBOOK: mve-pre-bonding.yaml ***********************************************************************************************************************************************************************************************************************************************
1 plays in mve-pre-bonding.yaml
PLAY [test dell sw config] ***************************************************************************************************************************************************************************************************************************************************
TASK [Gathering Facts] *******************************************************************************************************************************************************************************************************************************************************
task path: /Users/maxx/TK/ansible/dell-switches/mve-pre-bonding.yaml:2
Using module file /usr/local/Cellar/ansible/2.5.0/libexec/lib/python2.7/site-packages/ansible/modules/system/setup.py
<sw-06.us01.textkernel.net> ESTABLISH LOCAL CONNECTION FOR USER: maxx
<sw-06.us01.textkernel.net> EXEC /bin/sh -c 'echo ~ && sleep 0'
<sw-06.us01.textkernel.net> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /Users/maxx/.ansible/tmp/ansible-tmp-1524570727.29-32405431277467 `" && echo ansible-tmp-1524570727.29-32405431277467="` echo /Users/maxx/.ansible/tmp/ansible-tmp-1524570727.29-32405431277467 `" ) && sleep 0'
<sw-06.us01.textkernel.net> PUT /Users/maxx/.ansible/tmp/ansible-local-15580PMYGtK/tmpt_KFcu TO /Users/maxx/.ansible/tmp/ansible-tmp-1524570727.29-32405431277467/setup.py
<sw-06.us01.textkernel.net> EXEC /bin/sh -c 'chmod u+x /Users/maxx/.ansible/tmp/ansible-tmp-1524570727.29-32405431277467/ /Users/maxx/.ansible/tmp/ansible-tmp-1524570727.29-32405431277467/setup.py && sleep 0'
<sw-06.us01.textkernel.net> EXEC /bin/sh -c '/usr/bin/python /Users/maxx/.ansible/tmp/ansible-tmp-1524570727.29-32405431277467/setup.py && sleep 0'
<sw-06.us01.textkernel.net> EXEC /bin/sh -c 'rm -f -r /Users/maxx/.ansible/tmp/ansible-tmp-1524570727.29-32405431277467/ > /dev/null 2>&1 && sleep 0'
ok: [sw-06.us01]
META: ran handlers
TASK [create port channels] **************************************************************************************************************************************************************************************************************************************************
task path: /Users/maxx/TK/ansible/dell-switches/mve-pre-bonding.yaml:7
Using module file /usr/local/Cellar/ansible/2.5.0/libexec/lib/python2.7/site-packages/ansible/modules/network/dellos10/dellos10_config.py
<sw-06.us01.textkernel.net> ESTABLISH LOCAL CONNECTION FOR USER: maxx
<sw-06.us01.textkernel.net> EXEC /bin/sh -c 'echo ~ && sleep 0'
<sw-06.us01.textkernel.net> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /Users/maxx/.ansible/tmp/ansible-tmp-1524570729.3-76645556750450 `" && echo ansible-tmp-1524570729.3-76645556750450="` echo /Users/maxx/.ansible/tmp/ansible-tmp-1524570729.3-76645556750450 `" ) && sleep 0'
<sw-06.us01.textkernel.net> PUT /Users/maxx/.ansible/tmp/ansible-local-15580PMYGtK/tmpqbOO5H TO /Users/maxx/.ansible/tmp/ansible-tmp-1524570729.3-76645556750450/dellos10_config.py
<sw-06.us01.textkernel.net> EXEC /bin/sh -c 'chmod u+x /Users/maxx/.ansible/tmp/ansible-tmp-1524570729.3-76645556750450/ /Users/maxx/.ansible/tmp/ansible-tmp-1524570729.3-76645556750450/dellos10_config.py && sleep 0'
<sw-06.us01.textkernel.net> EXEC /bin/sh -c '/usr/bin/python /Users/maxx/.ansible/tmp/ansible-tmp-1524570729.3-76645556750450/dellos10_config.py && sleep 0'
<sw-06.us01.textkernel.net> EXEC /bin/sh -c 'rm -f -r /Users/maxx/.ansible/tmp/ansible-tmp-1524570729.3-76645556750450/ > /dev/null 2>&1 && sleep 0'
changed: [sw-06.us01] => {
"changed": true,
"commands": [
"interface port-channel 1",
"no shutdown",
"switchport mode trunk",
"switchport access vlan 1",
"vlt-port-channel 1",
"commit"
],
"invocation": {
"module_args": {
"after": null,
"auth_pass": null,
"authorize": null,
"backup": false,
"before": null,
"config": null,
"host": null,
"lines": [
"interface port-channel 1",
"no shutdown",
"switchport mode trunk",
"switchport access vlan 1",
"vlt-port-channel 1"
],
"match": "line",
"parents": null,
"password": null,
"port": null,
"provider": null,
"replace": "line",
"save": false,
"src": null,
"ssh_keyfile": null,
"timeout": null,
"update": "merge",
"username": null
}
},
"saved": false,
"updates": [
"interface port-channel 1",
"no shutdown",
"switchport mode trunk",
"switchport access vlan 1",
"vlt-port-channel 1",
"commit"
]
}
TASK [create port channels] **************************************************************************************************************************************************************************************************************************************************
task path: /Users/maxx/TK/ansible/dell-switches/mve-pre-bonding.yaml:16
Using module file /usr/local/Cellar/ansible/2.5.0/libexec/lib/python2.7/site-packages/ansible/modules/network/dellos10/dellos10_config.py
<sw-06.us01.textkernel.net> ESTABLISH LOCAL CONNECTION FOR USER: maxx
<sw-06.us01.textkernel.net> EXEC /bin/sh -c 'echo ~ && sleep 0'
<sw-06.us01.textkernel.net> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /Users/maxx/.ansible/tmp/ansible-tmp-1524570742.49-132600049626147 `" && echo ansible-tmp-1524570742.49-132600049626147="` echo /Users/maxx/.ansible/tmp/ansible-tmp-1524570742.49-132600049626147 `" ) && sleep 0'
<sw-06.us01.textkernel.net> PUT /Users/maxx/.ansible/tmp/ansible-local-15580PMYGtK/tmpfMiYXk TO /Users/maxx/.ansible/tmp/ansible-tmp-1524570742.49-132600049626147/dellos10_config.py
<sw-06.us01.textkernel.net> EXEC /bin/sh -c 'chmod u+x /Users/maxx/.ansible/tmp/ansible-tmp-1524570742.49-132600049626147/ /Users/maxx/.ansible/tmp/ansible-tmp-1524570742.49-132600049626147/dellos10_config.py && sleep 0'
<sw-06.us01.textkernel.net> EXEC /bin/sh -c '/usr/bin/python /Users/maxx/.ansible/tmp/ansible-tmp-1524570742.49-132600049626147/dellos10_config.py && sleep 0'
<sw-06.us01.textkernel.net> EXEC /bin/sh -c 'rm -f -r /Users/maxx/.ansible/tmp/ansible-tmp-1524570742.49-132600049626147/ > /dev/null 2>&1 && sleep 0'
failed: [sw-06.us01] (item=2) => {
"changed": false,
"err": "socket_path does not exist or cannot be found",
"invocation": {
"module_args": {
"after": null,
"auth_pass": null,
"authorize": null,
"backup": false,
"before": null,
"config": null,
"host": null,
"lines": [
"interface port-channel 2",
"no shutdown",
"switchport mode trunk",
"switchport access vlan 1",
"vlt-port-channel 2"
],
"match": "line",
"parents": null,
"password": null,
"port": null,
"provider": null,
"replace": "line",
"save": false,
"src": null,
"ssh_keyfile": null,
"timeout": null,
"update": "merge",
"username": null
}
},
"item": 2
}
MSG:
unable to enter configuration mode
The full traceback is:
Traceback (most recent call last):
File "/usr/local/Cellar/ansible/2.5.0/libexec/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 104, in run
item_results = self._run_loop(items)
File "/usr/local/Cellar/ansible/2.5.0/libexec/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 322, in _run_loop
res = self._execute(variables=task_vars)
File "/usr/local/Cellar/ansible/2.5.0/libexec/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 554, in _execute
result = self._handler.run(task_vars=variables)
File "/usr/local/Cellar/ansible/2.5.0/libexec/lib/python2.7/site-packages/ansible/plugins/action/dellos10_config.py", line 47, in run
result = super(ActionModule, self).run(tmp, task_vars)
File "/usr/local/Cellar/ansible/2.5.0/libexec/lib/python2.7/site-packages/ansible/plugins/action/dellos10.py", line 86, in run
out = conn.get_prompt()
File "/usr/local/Cellar/ansible/2.5.0/libexec/lib/python2.7/site-packages/ansible/module_utils/connection.py", line 140, in __rpc__
response = self._exec_jsonrpc(name, *args, **kwargs)
File "/usr/local/Cellar/ansible/2.5.0/libexec/lib/python2.7/site-packages/ansible/module_utils/connection.py", line 115, in _exec_jsonrpc
raise ConnectionError('socket_path does not exist or cannot be found')
ConnectionError: socket_path does not exist or cannot be found
fatal: [sw-06.us01]: FAILED! => {}
MSG:
Unexpected failure during module execution.
to retry, use: --limit @/Users/maxx/TK/ansible/dell-switches/mve-pre-bonding.retry
PLAY RECAP *******************************************************************************************************************************************************************************************************************************************************************
sw-06.us01 : ok=2 changed=1 unreachable=0 failed=1
# maxx @ MacBook-Pro-2 in ~/TK/ansible/dell-switches on git:master x [13:52:32] C:2
Switch details:
sw-06# show version
Dell EMC Networking OS10 Enterprise
Copyright (c) 1999-2018 by Dell Inc. All Rights Reserved.
OS Version: 10.4.0E(R3)
Build Version: 10.4.0E(R3.233)
Build Time: 2018-03-30T18:05:41-0700
System Type: S4148F-ON
Architecture: x86_64
Up Time: 1 week 5 days 21:01:55
What could be the cause of this, and how could I fix it?
Thank you for your help in this!
The following problem is probably because of my inexperience with ansible, but maybe it's not so posting here:
# maxx @ MacBook-Pro in ~/TK/ansible/ansible-dellos-examples on git:master x [9:16:00] C:2
$ ansible --version
ansible 2.4.3.0
config file = None
configured module search path = [u'/Users/maxx/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/2.4.3.0_4/libexec/lib/python2.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.14 (default, Sep 25 2017, 09:54:19) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]
# maxx @ MacBook-Pro in ~/TK/ansible/ansible-dellos-examples on git:master x [9:17:07]
$ ansible-playbook -i inventory.yaml getfacts_os10.yaml
PLAY [dellos10] **************************************************************************************************************************************************************************************************************************************************************
TASK [Gather Dell EMC OS10 Device Facts] *************************************************************************************************************************************************************************************************************************************
fatal: [dellos10_sw1]: FAILED! => {"changed": false, "msg": "invalid connection specified, expected connection=local, got network_cli"}
fatal: [dellos10_sw6]: FAILED! => {"changed": false, "msg": "invalid connection specified, expected connection=local, got network_cli"}
to retry, use: --limit @/Users/maxx/TK/ansible/ansible-dellos-examples/getfacts_os10.retry
PLAY RECAP *******************************************************************************************************************************************************************************************************************************************************************
dellos10_sw1 : ok=0 changed=0 unreachable=0 failed=1
dellos10_sw6 : ok=0 changed=0 unreachable=0 failed=1
# maxx @ MacBook-Pro in ~/TK/ansible/ansible-dellos-examples on git:master x [9:17:12] C:2
$
I modified the inventory to reflect my local setup. I'm not sure why I'm getting this error, I did not make any other changes and simply ran the example. Is this a bug, or did I skip some step that I need to do?
Getting the error:
ansible-playbook -i inventory.yaml getfacts_os9.yaml
PLAY [dellos9] *****************************************************************
TASK [Gather Dell EMC OS9 Device Facts] ****************************************
fatal: [hq-3f-sw1]: FAILED! => {"changed": false, "failed": true, "msg": "paramiko is required but does not appear to be installed. It can be installed using `pip install paramiko`"}
Paramiko is installed, this appears to be coming from the switch.
getfacts_os9.yaml is giving me error on test S4048 with 9.11.0.0, other playbooks are working OK
PLAY [test0-s4048] *************************************************************
TASK [Gather Dell EMC OS9 Device Facts] ****************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: expected string or buffer
fatal: [test0-s4048]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n File "/tmp/ansible_tEhMBW/ansible_module_dellos9_facts.py", line 563, in \n main()\n File "/tmp/ansible_tEhMBW/ansible_module_dellos9_facts.py", line 552, in main\n module.exit_json(out=module.from_json(runner.items))\n File "/tmp/ansible_tEhMBW/ansible_modlib.zip/ansible/module_utils/basic.py", line 1782, in from_json\n File "/usr/lib64/python2.7/json/init.py", line 338, in loads\n return _default_decoder.decode(s)\n File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode\n obj, end = self.raw_decode(s, idx=_w(s, 0).end())\nTypeError: expected string or buffer\n", "module_stdout": "", "msg": "MODULE FAILURE"}
to retry, use: --limit @/home/zidek/dev/ansible/ansible-dellos-examples/getfacts_os9.retry
PLAY RECAP *********************************************************************
test0-s4048 : ok=0 changed=0 unreachable=0 failed=1
We have 13 s3038 and 1 s4048 switch here. All but one of the s3048 will allow dellos9_config to actually run and apply changes. On all other hosts with the same Switch OS software and the module runs into a python syntax error.
You can see the errors in the below output, sn-hpcf-rcswe4-1 is the host that does accept the dellos9_config changes, sn-hpcf-rcswe4-2 is an example of a switch that encounters python syntax errors.
# ssh admin@sn-hpcf-rcswe4-2
sn-hpcf-rcswe4-2>show version
Dell Real Time Operating System Software
Dell Operating System Version: 2.0
Dell Application Software Version: 9.10(0.1P3)
Copyright (c) 1999-2016 by Dell Inc. All Rights Reserved.
Build Time: Tue Jun 14 15:00:23 2016
Build Path: /sites/eqx/work/swbuild01_1/build06/E9-10-0/SW/SRC
Dell Networking OS uptime is 6 week(s), 5 day(s), 3 hour(s), 15 minute(s)
System image file is "system://A"
System Type: S3048-ON
Control Processor: Intel Rangeley with 2 Gbytes (2127654912 bytes) of memory, core(s) 2.
8G bytes of boot flash memory.
1 52-port GE/TE (SG-ON)
48 GigabitEthernet/IEEE 802.3 interface(s)
4 Ten GigabitEthernet/IEEE 802.3 interface(s)
sn-hpcf-rcswe4-2>show version
# ssh admin@sn-hpcf-rcswe4-1
The SupportAssist EULA acceptance option has not been selected. SupportAssist
can be enabled once the SupportAssist EULA has been accepted. Use the:
'support-assist activate' command to accept EULA and enable SupportAssist.
sn-hpcf-rcswe4-1#show version
Dell Real Time Operating System Software
Dell Operating System Version: 2.0
Dell Application Software Version: 9.10(0.1P3)
Copyright (c) 1999-2016 by Dell Inc. All Rights Reserved.
Build Time: Tue Jun 14 15:00:23 2016
Build Path: /sites/eqx/work/swbuild01_1/build06/E9-10-0/SW/SRC
Dell Networking OS uptime is 6 week(s), 5 day(s), 3 hour(s), 16 minute(s)
System image file is "system://A"
System Type: S3048-ON
Control Processor: Intel Rangeley with 2 Gbytes (2127654912 bytes) of memory, core(s) 2.
8G bytes of boot flash memory.
1 52-port GE/TE (SG-ON)
48 GigabitEthernet/IEEE 802.3 interface(s)
4 Ten GigabitEthernet/IEEE 802.3 interface(s)
sn-hpcf-rcswe4-1#
Working host sn-hpcf-rcswe4-1 dellos9_config output
# ansible-playbook -i Summit-switches summit-configure.yaml -e 'ansible_python_interpreter="/usr/bin/env python"' -vvv --ask-vault-pass --tags switch-config-check --limit test
Using /home/jobl6604/dev/ansible-networking/ansible.cfg as config file
Vault password:
PLAYBOOK: summit-configure.yaml ************************************************
1 plays in summit-configure.yaml
PLAY [summit-switches] *********************************************************
/home/jobl6604/ansible_venv/python-2.7.13/lib/python2.7/site-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.
_warn("Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning)
TASK [check configuration] *****************************************************
task path: /home/jobl6604/dev/ansible-networking/summit-configure.yaml:16
Using module file /home/jobl6604/ansible_venv/python-2.7.13/lib/python2.7/site-packages/ansible/modules/core/network/dellos9/dellos9_config.py
<192.168.224.70> ESTABLISH LOCAL CONNECTION FOR USER: root
<192.168.224.70> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1487621769.39-57146327494722 `" && echo ansible-tmp-1487621769.39-57146327494722="` echo $HOME/.ansible/tmp/ansible-tmp-1487621769.39-57146327494722 `" ) && sleep 0'
<192.168.224.70> PUT /tmp/tmpCxzygi TO /root/.ansible/tmp/ansible-tmp-1487621769.39-57146327494722/dellos9_config.py
<192.168.224.70> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1487621769.39-57146327494722/ /root/.ansible/tmp/ansible-tmp-1487621769.39-57146327494722/dellos9_config.py && sleep 0'
<192.168.224.70> EXEC /bin/sh -c '/usr/bin/env python /root/.ansible/tmp/ansible-tmp-1487621769.39-57146327494722/dellos9_config.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1487621769.39-57146327494722/" > /dev/null 2>&1 && sleep 0'
changed: [sn-hpcf-rcswe4-1] => {
"changed": true,
"invocation": {
"module_args": {
"after": null,
"auth_pass": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"authorize": false,
"backup": false,
"before": null,
"config": [
"Current Configuration ...\n! Version 9.10(0.1P3)\n! Last configuration change at Sat Feb 18 05:30:10 2017 by rcops\n! Startup-config last updated at Sat Feb 18 05:30:16 2017 by rcops\n!\nboot system stack-unit 1 primary system://A\nboot system stack-unit 1 secondary system://B\n!\nhostname sn-hpcf-rcswe4-1\n!\nprotocol lldp \n!\nredundancy auto-synchronize full\n!\nusername rcops password 7 381e189bf323bdf2 privilege 15 \nusername admin nopassword privilege 15\n!\ndefault vlan-id 3100\n!\nstack-unit 1 provision S3048-ON\n!\ninterface GigabitEthernet 1/1\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/2\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/3\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/4\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/5\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/6\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/7\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/8\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/9\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/10\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/11\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/12\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/13\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/14\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/15\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/16\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/17\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/18\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/19\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/20\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/21\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/22\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/23\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/24\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/25\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/26\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/27\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/28\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/29\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/30\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/31\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/32\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/33\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/34\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/35\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/36\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/37\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/38\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/39\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/40\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/41\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/42\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/43\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/44\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/45\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/46\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/47\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface GigabitEthernet 1/48\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface TenGigabitEthernet 1/49\n no ip address\n! \n port-channel-protocol LACP \n port-channel 2 mode active \n no shutdown\n!\ninterface TenGigabitEthernet 1/50\n no ip address\n! \n port-channel-protocol LACP \n port-channel 2 mode active \n no shutdown\n!\ninterface TenGigabitEthernet 1/51\n no ip address\n shutdown\n!\ninterface TenGigabitEthernet 1/52\n no ip address\n shutdown\n!\ninterface ManagementEthernet 1/1\n ip address 172.16.42.70/20\n no shutdown\n!\ninterface ManagementEthernet 2/1\n no shutdown\n!\ninterface ManagementEthernet 3/1\n no shutdown\n!\ninterface ManagementEthernet 4/1\n shutdown\n!\ninterface ManagementEthernet 5/1\n shutdown\n!\ninterface ManagementEthernet 6/1\n shutdown\n!\ninterface Port-channel 2\n no ip address\n portmode hybrid\n switchport\n no shutdown\n!\ninterface Vlan 224\n ip address 192.168.224.70/26\n tagged Port-channel 2\n no shutdown\n!\ninterface Vlan 3100\n!untagged GigabitEthernet 1/1-1/48\n!untagged Port-channel 2\n!\ninterface Vlan 3108\n ip address 10.225.40.13/20\n tagged GigabitEthernet 1/1-1/48\n tagged Port-channel 2\n no shutdown\n!\nip route 0.0.0.0/0 192.168.224.65 \n!\nsnmp-server community private rw \nsnmp-server community public rw \n!\nno ip telnet server enable\n!\nip ssh server enable\n!\nline console 0\nline vty 0\nline vty 1\nline vty 2\nline vty 3\nline vty 4\nline vty 5\nline vty 6\nline vty 7\nline vty 8\nline vty 9\n!\nreload-type\n boot-type normal-reload\n config-scr-download enable\n!\nend"
],
"host": "192.168.224.70",
"lines": [
"no ip telnet server enable",
"clock timezone MDT -13",
"ntp server 10.225.0.1"
],
"match": "line",
"parents": null,
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"port": null,
"provider": {
"auth_pass": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"host": "192.168.224.70",
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"timeout": 30,
"transport": "cli",
"username": "admin"
},
"replace": "line",
"save": false,
"src": null,
"ssh_keyfile": null,
"timeout": 30,
"transport": "cli",
"update": "merge",
"username": "admin"
}
},
"responses": [
"",
"",
""
],
"saved": false,
"updates": [
"clock timezone MDT -13",
"ntp server 10.225.0.1"
]
}
PLAY RECAP *********************************************************************
sn-hpcf-rcswe4-1 : ok=1 changed=1 unreachable=0 failed=0
Failing output from sn-hpcf-rcswe-4-2
# ansible-playbook -i Summit-switches summit-configure.yaml -e 'ansible_python_interpreter="/usr/bin/env python"' -vvv --ask-vault-pass --tags switch-config-check --limit sn-hpcf-rcswe4-2
Using /home/jobl6604/dev/ansible-networking/ansible.cfg as config file
Vault password:
PLAYBOOK: summit-configure.yaml ************************************************
1 plays in summit-configure.yaml
PLAY [summit-switches] *********************************************************
/home/jobl6604/ansible_venv/python-2.7.13/lib/python2.7/site-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.
_warn("Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning)
TASK [check configuration] *****************************************************
task path: /home/jobl6604/dev/ansible-networking/summit-configure.yaml:16
Using module file /home/jobl6604/ansible_venv/python-2.7.13/lib/python2.7/site-packages/ansible/modules/core/network/dellos9/dellos9_config.py
<192.168.224.71> ESTABLISH LOCAL CONNECTION FOR USER: root
<192.168.224.71> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1487623204.97-11743101553464 `" && echo ansible-tmp-1487623204.97-11743101553464="` echo $HOME/.ansible/tmp/ansible-tmp-1487623204.97-11743101553464 `" ) && sleep 0'
<192.168.224.71> PUT /tmp/tmp3mLbBz TO /root/.ansible/tmp/ansible-tmp-1487623204.97-11743101553464/dellos9_config.py
<192.168.224.71> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1487623204.97-11743101553464/ /root/.ansible/tmp/ansible-tmp-1487623204.97-11743101553464/dellos9_config.py && sleep 0'
<192.168.224.71> EXEC /bin/sh -c '/usr/bin/env python /root/.ansible/tmp/ansible-tmp-1487623204.97-11743101553464/dellos9_config.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1487623204.97-11743101553464/" > /dev/null 2>&1 && sleep 0'
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_uA11Kd/ansible_module_dellos9_config.py", line 293, in <module>
main()
File "/tmp/ansible_uA11Kd/ansible_module_dellos9_config.py", line 255, in main
config = get_config(module)
File "/tmp/ansible_uA11Kd/ansible_modlib.zip/ansible/module_utils/dellos9.py", line 43, in get_config
File "/tmp/ansible_uA11Kd/ansible_modlib.zip/ansible/module_utils/netcfg.py", line 61, in get_config
File "/tmp/ansible_uA11Kd/ansible_modlib.zip/ansible/module_utils/dellos9.py", line 121, in get_config
File "/tmp/ansible_uA11Kd/ansible_modlib.zip/ansible/module_utils/shell.py", line 250, in execute
ansible.module_utils.network.NetworkError: matched error in response: show running-config
^
% Error: Invalid input at "^" marker.
fatal: [sn-hpcf-rcswe4-2]: FAILED! => {
"changed": false,
"failed": true,
"invocation": {
"module_args": {
"lines": [
"no ip telnet server enable",
"clock timezone MDT -13",
"ntp server 10.225.0.1"
],
"match": "line",
"provider": {
"auth_pass": "BrcpwE23!",
"host": "192.168.224.71",
"password": "BrcpwE23!",
"timeout": 30,
"transport": "cli",
"username": "admin"
},
"update": "merge"
},
"module_name": "dellos9_config"
},
"module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_uA11Kd/ansible_module_dellos9_config.py\", line 293, in <module>\n main()\n File \"/tmp/ansible_uA11Kd/ansible_module_dellos9_config.py\", line 255, in main\n config = get_config(module)\n File \"/tmp/ansible_uA11Kd/ansible_modlib.zip/ansible/module_utils/dellos9.py\", line 43, in get_config\n File \"/tmp/ansible_uA11Kd/ansible_modlib.zip/ansible/module_utils/netcfg.py\", line 61, in get_config\n File \"/tmp/ansible_uA11Kd/ansible_modlib.zip/ansible/module_utils/dellos9.py\", line 121, in get_config\n File \"/tmp/ansible_uA11Kd/ansible_modlib.zip/ansible/module_utils/shell.py\", line 250, in execute\nansible.module_utils.network.NetworkError: matched error in response: show running-config\r\n ^\r\n% Error: Invalid input at \"^\" marker.\r\n\n",
"module_stdout": "",
"msg": "MODULE FAILURE"
}
to retry, use: --limit @/home/jobl6604/dev/ansible-networking/summit-configure.retry
PLAY RECAP *********************************************************************
sn-hpcf-rcswe4-2 : ok=0 changed=0 unreachable=0 failed=1
Python version is 2.7.13
ansible 2.2.1.0
config file = /home/jobl6604/dev/ansible-networking/ansible.cfg
configured module search path = Default w/o overrides
Nothing changed in ansible.cfg from the default except ssh timeout was increased to 60 seconds.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.