-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels