Comments (11)
from community.ciscosmb.
yes you can
community.ciscosmb.command:
commands:
- conf
- clock timezone CET +1
...
- end
from community.ciscosmb.
It did not help ...
I can see content of your playbook, but I need to see output of running the playbook...
run this
ansible-playbook -vvvv your_playbook.yml
from community.ciscosmb.
Here is the command output.
ansible-playbook [core 2.13.3]
config file = None
configured module search path = ['/home/tom/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/tom/.local/lib/python3.10/site-packages/ansible
ansible collection location = /home/tom/.ansible/collections:/usr/share/ansible/collections
executable location = /home/tom/.local/bin/ansible-playbook
python version = 3.10.4 (main, Apr 2 2022, 09:04:19) [GCC 11.2.0]
jinja version = 3.0.3
libyaml = True
No config file found; using defaults
setting up inventory plugins
host_list declined parsing /mnt/c/ansible/rzw routers/inventory as it did not pass its verify_file() method
auto declined parsing /mnt/c/ansible/rzw routers/inventory as it did not pass its verify_file() method
Parsed /mnt/c/ansible/rzw routers/inventory inventory source with ini plugin
Loading collection community.ciscosmb from /home/tom/.ansible/collections/ansible_collections/community/ciscosmb
Loading callback plugin default of type stdout, v2.0 from /home/tom/.local/lib/python3.10/site-packages/ansible/plugins/callback/default.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: set ntp smb switches.yaml ************************************************************************************Positional arguments: set ntp smb switches.yaml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/mnt/c/ansible/rzw routers/inventory',)
forks: 5
1 plays in set ntp smb switches.yaml
PLAY [edit ntp config] *************************************************************************************************META: ran handlers
TASK [set ntp] *********************************************************************************************************task path: /mnt/c/ansible/rzw routers/set ntp smb switches.yaml:5
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
Loading collection ansible.netcommon from /home/tom/.ansible/collections/ansible_collections/ansible/netcommon
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
Loading collection ansible.netcommon from /home/tom/.ansible/collections/ansible_collections/ansible/netcommon
redirecting (type: become) ansible.builtin.enable to ansible.netcommon.enable
redirecting (type: become) ansible.builtin.enable to ansible.netcommon.enable
<sw-rzw-7555nb4-01> attempting to start connection
<sw-rzw-7412rv29-01> attempting to start connection
<sw-rzw-7412rv29-01> using connection plugin ansible.netcommon.network_cli
<sw-rzw-7555nb4-01> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /home/tom/.local/bin/ansible-connection
Found ansible-connection at path /home/tom/.local/bin/ansible-connection
<sw-rzw-7555nb4-01> local domain socket does not exist, starting it
<sw-rzw-7412rv29-01> local domain socket does not exist, starting it
<sw-rzw-7555nb4-01> control socket path is /home/tom/.ansible/pc/84b7cffecd
<sw-rzw-7412rv29-01> control socket path is /home/tom/.ansible/pc/56f9959a4c
<sw-rzw-7555nb4-01> redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
<sw-rzw-7555nb4-01> Loading collection ansible.netcommon from /home/tom/.ansible/collections/ansible_collections/ansible/netcommon
<sw-rzw-7555nb4-01> Loading collection community.ciscosmb from /home/tom/.ansible/collections/ansible_collections/community/ciscosmb
<sw-rzw-7412rv29-01> redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
<sw-rzw-7412rv29-01> Loading collection ansible.netcommon from /home/tom/.ansible/collections/ansible_collections/ansible/netcommon
<sw-rzw-7555nb4-01> local domain socket listeners started successfully
<sw-rzw-7555nb4-01> loaded cliconf plugin ansible_collections.community.ciscosmb.plugins.cliconf.ciscosmb from path /home/tom/.ansible/collections/ansible_collections/community/ciscosmb/plugins/cliconf/ciscosmb.py for network_os community.ciscosmb.ciscosmb
<sw-rzw-7412rv29-01> Loading collection community.ciscosmb from /home/tom/.ansible/collections/ansible_collections/community/ciscosmb
<sw-rzw-7412rv29-01> local domain socket listeners started successfully
<sw-rzw-7555nb4-01> ssh type is set to auto
<sw-rzw-7412rv29-01> loaded cliconf plugin ansible_collections.community.ciscosmb.plugins.cliconf.ciscosmb from path /home/tom/.ansible/collections/ansible_collections/community/ciscosmb/plugins/cliconf/ciscosmb.py for network_os community.ciscosmb.ciscosmb
<sw-rzw-7555nb4-01> autodetecting ssh_type
<sw-rzw-7412rv29-01> ssh type is set to auto
<sw-rzw-7555nb4-01> ssh type is now set to libssh
<sw-rzw-7412rv29-01> autodetecting ssh_type
<sw-rzw-7555nb4-01>
<sw-rzw-7555nb4-01> local domain socket path is /home/tom/.ansible/pc/84b7cffecd
<sw-rzw-7412rv29-01> ssh type is now set to libssh
<sw-rzw-7412rv29-01>
<sw-rzw-7412rv29-01> local domain socket path is /home/tom/.ansible/pc/56f9959a4c
<sw-rzw-7412rv29-01> ESTABLISH LOCAL CONNECTION FOR USER: tom
<sw-rzw-7555nb4-01> ESTABLISH LOCAL CONNECTION FOR USER: tom
<sw-rzw-7412rv29-01> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/tom/.ansible/tmp/ansible-local-81zulr_kpe `"&& mkdir "` echo /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118372.4293973-87-205199762984921 `" && echo ansible-tmp-1662118372.4293973-87-205199762984921="` echo /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118372.4293973-87-205199762984921 `" ) && sleep 0'
<sw-rzw-7555nb4-01> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/tom/.ansible/tmp/ansible-local-81zulr_kpe `"&& mkdir "` echo /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118372.4293966-86-74424465014727 `" && echo ansible-tmp-1662118372.4293966-86-74424465014727="` echo /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118372.4293966-86-74424465014727 `" ) && sleep 0'
Using module file /home/tom/.ansible/collections/ansible_collections/community/ciscosmb/plugins/modules/command.py
Using module file /home/tom/.ansible/collections/ansible_collections/community/ciscosmb/plugins/modules/command.py
<sw-rzw-7555nb4-01> PUT /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/tmpyayo5byp TO /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118372.4293966-86-74424465014727/AnsiballZ_command.py
<sw-rzw-7412rv29-01> PUT /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/tmpyrau1ic1 TO /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118372.4293973-87-205199762984921/AnsiballZ_command.py
<sw-rzw-7555nb4-01> EXEC /bin/sh -c 'chmod u+x /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118372.4293966-86-74424465014727/ /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118372.4293966-86-74424465014727/AnsiballZ_command.py && sleep 0'
<sw-rzw-7412rv29-01> EXEC /bin/sh -c 'chmod u+x /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118372.4293973-87-205199762984921/ /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118372.4293973-87-205199762984921/AnsiballZ_command.py && sleep 0'
<sw-rzw-7412rv29-01> EXEC /bin/sh -c '/usr/bin/python3 /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118372.4293973-87-205199762984921/AnsiballZ_command.py && sleep 0'
<sw-rzw-7555nb4-01> EXEC /bin/sh -c '/usr/bin/python3 /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118372.4293966-86-74424465014727/AnsiballZ_command.py && sleep 0'
<sw-rzw-7555nb4-01> EXEC /bin/sh -c 'rm -f -r /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118372.4293966-86-74424465014727/ > /dev/null 2>&1 && sleep 0'
ok: [sw-rzw-7555nb4-01] => {
"changed": false,
"invocation": {
"module_args": {
"commands": [
"clock timezone CET +1",
"clock summer-time CET recurring last sun mar 02:00 last sun oct 03:00",
"clock source sntp",
"sntp unicast client enable",
"sntp unicast client poll",
"sntp server ntp1.root.nl poll",
"sntp server ntp2.root.nl poll",
"sntp server ntp3.root.nl poll",
"sntp source-interface vlan 10"
],
"interval": 1,
"match": "all",
"retries": 10,
"wait_for": null
}
},
"stdout": [
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command"
],
"stdout_lines": [
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
]
]
}
<sw-rzw-7412rv29-01> EXEC /bin/sh -c 'rm -f -r /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118372.4293973-87-205199762984921/ > /dev/null 2>&1 && sleep 0'
ok: [sw-rzw-7412rv29-01] => {
"changed": false,
"invocation": {
"module_args": {
"commands": [
"clock timezone CET +1",
"clock summer-time CET recurring last sun mar 02:00 last sun oct 03:00",
"clock source sntp",
"sntp unicast client enable",
"sntp unicast client poll",
"sntp server ntp1.root.nl poll",
"sntp server ntp2.root.nl poll",
"sntp server ntp3.root.nl poll",
"sntp source-interface vlan 10"
],
"interval": 1,
"match": "all",
"retries": 10,
"wait_for": null
}
},
"stdout": [
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command"
],
"stdout_lines": [
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
]
]
}
TASK [show clock] ******************************************************************************************************task path: /mnt/c/ansible/rzw routers/set ntp smb switches.yaml:17
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
Loading collection ansible.netcommon from /home/tom/.ansible/collections/ansible_collections/ansible/netcommon
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
Loading collection ansible.netcommon from /home/tom/.ansible/collections/ansible_collections/ansible/netcommon
redirecting (type: become) ansible.builtin.enable to ansible.netcommon.enable
<sw-rzw-7555nb4-01> attempting to start connection
<sw-rzw-7555nb4-01> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /home/tom/.local/bin/ansible-connection
redirecting (type: become) ansible.builtin.enable to ansible.netcommon.enable
<sw-rzw-7412rv29-01> attempting to start connection
<sw-rzw-7412rv29-01> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /home/tom/.local/bin/ansible-connection
<sw-rzw-7555nb4-01> found existing local domain socket, using it!
<sw-rzw-7555nb4-01> invoked shell using ssh_type: libssh
<sw-rzw-7555nb4-01> ssh connection done, setting terminal
<sw-rzw-7555nb4-01> loaded terminal plugin for network_os community.ciscosmb.ciscosmb
<sw-rzw-7555nb4-01> firing event: on_become
<sw-rzw-7555nb4-01> firing event: on_open_shell()
<sw-rzw-7555nb4-01> ssh connection has completed successfully
<sw-rzw-7555nb4-01> updating play_context for connection
<sw-rzw-7555nb4-01>
<sw-rzw-7555nb4-01> local domain socket path is /home/tom/.ansible/pc/84b7cffecd
<sw-rzw-7555nb4-01> ESTABLISH LOCAL CONNECTION FOR USER: tom
<sw-rzw-7555nb4-01> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/tom/.ansible/tmp/ansible-local-81zulr_kpe `"&& mkdir "` echo /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118380.2254076-142-136690516237418 `" && echo ansible-tmp-1662118380.2254076-142-136690516237418="` echo /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118380.2254076-142-136690516237418 `" ) && sleep 0'
Using module file /home/tom/.ansible/collections/ansible_collections/community/ciscosmb/plugins/modules/command.py
<sw-rzw-7555nb4-01> PUT /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/tmpkdjcceoy TO /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118380.2254076-142-136690516237418/AnsiballZ_command.py
<sw-rzw-7555nb4-01> EXEC /bin/sh -c 'chmod u+x /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118380.2254076-142-136690516237418/ /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118380.2254076-142-136690516237418/AnsiballZ_command.py && sleep 0'
<sw-rzw-7555nb4-01> EXEC /bin/sh -c '/usr/bin/python3 /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118380.2254076-142-136690516237418/AnsiballZ_command.py && sleep 0'
<sw-rzw-7412rv29-01> found existing local domain socket, using it!
<sw-rzw-7412rv29-01> invoked shell using ssh_type: libssh
<sw-rzw-7412rv29-01> ssh connection done, setting terminal
<sw-rzw-7412rv29-01> loaded terminal plugin for network_os community.ciscosmb.ciscosmb
<sw-rzw-7412rv29-01> firing event: on_become
<sw-rzw-7412rv29-01> firing event: on_open_shell()
<sw-rzw-7412rv29-01> ssh connection has completed successfully
<sw-rzw-7412rv29-01> updating play_context for connection
<sw-rzw-7412rv29-01>
<sw-rzw-7412rv29-01> local domain socket path is /home/tom/.ansible/pc/56f9959a4c
<sw-rzw-7412rv29-01> ESTABLISH LOCAL CONNECTION FOR USER: tom
<sw-rzw-7412rv29-01> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/tom/.ansible/tmp/ansible-local-81zulr_kpe `"&& mkdir "` echo /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118380.2556758-143-265775745423487 `" && echo ansible-tmp-1662118380.2556758-143-265775745423487="` echo /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118380.2556758-143-265775745423487 `" ) && sleep 0'
Using module file /home/tom/.ansible/collections/ansible_collections/community/ciscosmb/plugins/modules/command.py
<sw-rzw-7412rv29-01> PUT /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/tmp_1l6zpwv TO /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118380.2556758-143-265775745423487/AnsiballZ_command.py
<sw-rzw-7412rv29-01> EXEC /bin/sh -c 'chmod u+x /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118380.2556758-143-265775745423487/ /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118380.2556758-143-265775745423487/AnsiballZ_command.py && sleep 0'
<sw-rzw-7412rv29-01> EXEC /bin/sh -c '/usr/bin/python3 /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118380.2556758-143-265775745423487/AnsiballZ_command.py && sleep 0'
<sw-rzw-7555nb4-01> EXEC /bin/sh -c 'rm -f -r /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118380.2254076-142-136690516237418/ > /dev/null 2>&1 && sleep 0'
ok: [sw-rzw-7555nb4-01] => {
"changed": false,
"invocation": {
"module_args": {
"commands": [
"show clock"
],
"interval": 1,
"match": "all",
"retries": 10,
"wait_for": null
}
},
"stdout": [
"13:33:00 CET Sep 2 2022\nTime source is sntp\nTime from Browser is disabled"
],
"stdout_lines": [
[
"13:33:00 CET Sep 2 2022",
"Time source is sntp",
"Time from Browser is disabled"
]
]
}
<sw-rzw-7412rv29-01> EXEC /bin/sh -c 'rm -f -r /home/tom/.ansible/tmp/ansible-local-81zulr_kpe/ansible-tmp-1662118380.2556758-143-265775745423487/ > /dev/null 2>&1 && sleep 0'
ok: [sw-rzw-7412rv29-01] => {
"changed": false,
"invocation": {
"module_args": {
"commands": [
"show clock"
],
"interval": 1,
"match": "all",
"retries": 10,
"wait_for": null
}
},
"stdout": [
"13:28:42 CET Sep 2 2022\nTime source is sntp\nTime from Browser is enabled"
],
"stdout_lines": [
[
"13:28:42 CET Sep 2 2022",
"Time source is sntp",
"Time from Browser is enabled"
]
]
}
TASK [show output] *****************************************************************************************************task path: /mnt/c/ansible/rzw routers/set ntp smb switches.yaml:21
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
Loading collection ansible.netcommon from /home/tom/.ansible/collections/ansible_collections/ansible/netcommon
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
Loading collection ansible.netcommon from /home/tom/.ansible/collections/ansible_collections/ansible/netcommon
redirecting (type: become) ansible.builtin.enable to ansible.netcommon.enable
<sw-rzw-7555nb4-01> attempting to start connection
<sw-rzw-7555nb4-01> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /home/tom/.local/bin/ansible-connection
redirecting (type: become) ansible.builtin.enable to ansible.netcommon.enable
<sw-rzw-7412rv29-01> attempting to start connection
<sw-rzw-7412rv29-01> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /home/tom/.local/bin/ansible-connection
<sw-rzw-7555nb4-01> found existing local domain socket, using it!
<sw-rzw-7555nb4-01> updating play_context for connection
<sw-rzw-7555nb4-01>
<sw-rzw-7555nb4-01> local domain socket path is /home/tom/.ansible/pc/84b7cffecd
<sw-rzw-7412rv29-01> found existing local domain socket, using it!
<sw-rzw-7412rv29-01> updating play_context for connection
<sw-rzw-7412rv29-01>
<sw-rzw-7412rv29-01> local domain socket path is /home/tom/.ansible/pc/56f9959a4c
ok: [sw-rzw-7555nb4-01] => {
"output.stdout": [
"13:33:00 CET Sep 2 2022\nTime source is sntp\nTime from Browser is disabled"
]
}
ok: [sw-rzw-7412rv29-01] => {
"output.stdout": [
"13:28:42 CET Sep 2 2022\nTime source is sntp\nTime from Browser is enabled"
]
}
META: ran handlers
META: ran handlers
PLAY RECAP *************************************************************************************************************sw-rzw-7412rv29-01 : ok=3 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
sw-rzw-7555nb4-01 : ok=3 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
In this output it says: become_method: sudo
. In vars I set ansible_become_method=enable
. Can this be the issue?
from community.ciscosmb.
Thank you, it is definitely something with "become".
can you try
- unset "ansible_become_method"
- unset "ansible_become_method" and add "become: yes" to ciscosmb.command in "set ntp"
from community.ciscosmb.
... and may be
3. set "ansible_become_method" to enable and add "become: yes" to ciscosmb.command in "set ntp"
from community.ciscosmb.
All three options didn't help. Output is the same.
I have edited inventory to:
[switches_smb:vars]
ansible_connection=network_cli
ansible_become=yes
#ansible_become_method=enable
ansible_network_os=community.ciscosmb.ciscosmb
ansible_user=root
ansible_password=***
ansible_become_password= ***
edited playbook to:
- name: "edit ntp config"
hosts: switches_smb
gather_facts: no
tasks:
- name: set ntp
become: yes
become_method: enable
community.ciscosmb.command:
commands:
- clock timezone CET +1
- clock summer-time CET recurring last sun mar 02:00 last sun oct 03:00
- clock source sntp
- sntp unicast client enable
- sntp unicast client poll
- sntp server ntp1.root.nl poll
- sntp server ntp2.root.nl poll
- sntp server ntp3.root.nl poll
- sntp source-interface vlan 10
- name: show clock
community.ciscosmb.command:
commands: show clock
register: output
- name: show output
debug:
var: output.stdout
ansible-playbook [core 2.13.3]
config file = None
configured module search path = ['/home/tom/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/tom/.local/lib/python3.10/site-packages/ansible
ansible collection location = /home/tom/.ansible/collections:/usr/share/ansible/collections
executable location = /home/tom/.local/bin/ansible-playbook
python version = 3.10.4 (main, Apr 2 2022, 09:04:19) [GCC 11.2.0]
jinja version = 3.0.3
libyaml = True
No config file found; using defaults
setting up inventory plugins
host_list declined parsing /mnt/c/ansible/rzw routers/inventory as it did not pass its verify_file() method
auto declined parsing /mnt/c/ansible/rzw routers/inventory as it did not pass its verify_file() method
Parsed /mnt/c/ansible/rzw routers/inventory inventory source with ini plugin
Loading collection community.ciscosmb from /home/tom/.ansible/collections/ansible_collections/community/ciscosmb
Loading callback plugin default of type stdout, v2.0 from /home/tom/.local/lib/python3.10/site-packages/ansible/plugins/callback/default.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: set ntp smb switches.yaml *********************************************************************************************************************************************************************************************************
Positional arguments: set ntp smb switches.yaml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/mnt/c/ansible/rzw routers/inventory',)
forks: 5
1 plays in set ntp smb switches.yaml
PLAY [edit ntp config] **********************************************************************************************************************************************************************************************************************
META: ran handlers
TASK [set ntp] ******************************************************************************************************************************************************************************************************************************
task path: /mnt/c/ansible/rzw routers/set ntp smb switches.yaml:5
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
Loading collection ansible.netcommon from /home/tom/.ansible/collections/ansible_collections/ansible/netcommon
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
Loading collection ansible.netcommon from /home/tom/.ansible/collections/ansible_collections/ansible/netcommon
redirecting (type: become) ansible.builtin.enable to ansible.netcommon.enable
<sw-rzw-7555nb4-01> attempting to start connection
<sw-rzw-7555nb4-01> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /home/tom/.local/bin/ansible-connection
redirecting (type: become) ansible.builtin.enable to ansible.netcommon.enable
<sw-rzw-7412rv29-01> attempting to start connection
<sw-rzw-7412rv29-01> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /home/tom/.local/bin/ansible-connection
<sw-rzw-7555nb4-01> local domain socket does not exist, starting it
<sw-rzw-7555nb4-01> control socket path is /home/tom/.ansible/pc/2859bbe52b
<sw-rzw-7555nb4-01> redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
<sw-rzw-7555nb4-01> Loading collection ansible.netcommon from /home/tom/.ansible/collections/ansible_collections/ansible/netcommon
<sw-rzw-7555nb4-01> Loading collection community.ciscosmb from /home/tom/.ansible/collections/ansible_collections/community/ciscosmb
<sw-rzw-7555nb4-01> local domain socket listeners started successfully
<sw-rzw-7555nb4-01> loaded cliconf plugin ansible_collections.community.ciscosmb.plugins.cliconf.ciscosmb from path /home/tom/.ansible/collections/ansible_collections/community/ciscosmb/plugins/cliconf/ciscosmb.py for network_os community.ciscosmb.ciscosmb
<sw-rzw-7555nb4-01> ssh type is set to auto
<sw-rzw-7555nb4-01> autodetecting ssh_type
<sw-rzw-7555nb4-01> ssh type is now set to libssh
<sw-rzw-7555nb4-01>
<sw-rzw-7555nb4-01> local domain socket path is /home/tom/.ansible/pc/2859bbe52b
<sw-rzw-7555nb4-01> ESTABLISH LOCAL CONNECTION FOR USER: tom
<sw-rzw-7555nb4-01> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7 `"&& mkdir "` echo /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380184.1092775-506-101962182381229 `" && echo ansible-tmp-1662380184.1092775-506-101962182381229="` echo /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380184.1092775-506-101962182381229 `" ) && sleep 0'
<sw-rzw-7412rv29-01> local domain socket does not exist, starting it
<sw-rzw-7412rv29-01> control socket path is /home/tom/.ansible/pc/a89574f2ae
<sw-rzw-7412rv29-01> redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
<sw-rzw-7412rv29-01> Loading collection ansible.netcommon from /home/tom/.ansible/collections/ansible_collections/ansible/netcommon
<sw-rzw-7412rv29-01> Loading collection community.ciscosmb from /home/tom/.ansible/collections/ansible_collections/community/ciscosmb
<sw-rzw-7412rv29-01> local domain socket listeners started successfully
<sw-rzw-7412rv29-01> loaded cliconf plugin ansible_collections.community.ciscosmb.plugins.cliconf.ciscosmb from path /home/tom/.ansible/collections/ansible_collections/community/ciscosmb/plugins/cliconf/ciscosmb.py for network_os community.ciscosmb.ciscosmb
<sw-rzw-7412rv29-01> ssh type is set to auto
<sw-rzw-7412rv29-01> autodetecting ssh_type
<sw-rzw-7412rv29-01> ssh type is now set to libssh
<sw-rzw-7412rv29-01>
<sw-rzw-7412rv29-01> local domain socket path is /home/tom/.ansible/pc/a89574f2ae
<sw-rzw-7412rv29-01> ESTABLISH LOCAL CONNECTION FOR USER: tom
<sw-rzw-7412rv29-01> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7 `"&& mkdir "` echo /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380184.1276405-507-96319228262964 `" && echo ansible-tmp-1662380184.1276405-507-96319228262964="` echo /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380184.1276405-507-96319228262964 `" ) && sleep 0'
Using module file /home/tom/.ansible/collections/ansible_collections/community/ciscosmb/plugins/modules/command.py
Using module file /home/tom/.ansible/collections/ansible_collections/community/ciscosmb/plugins/modules/command.py
<sw-rzw-7555nb4-01> PUT /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/tmpuvqqb41l TO /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380184.1092775-506-101962182381229/AnsiballZ_command.py
<sw-rzw-7412rv29-01> PUT /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/tmp3pghrbcr TO /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380184.1276405-507-96319228262964/AnsiballZ_command.py
<sw-rzw-7412rv29-01> EXEC /bin/sh -c 'chmod u+x /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380184.1276405-507-96319228262964/ /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380184.1276405-507-96319228262964/AnsiballZ_command.py && sleep 0'
<sw-rzw-7555nb4-01> EXEC /bin/sh -c 'chmod u+x /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380184.1092775-506-101962182381229/ /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380184.1092775-506-101962182381229/AnsiballZ_command.py && sleep 0'
<sw-rzw-7555nb4-01> EXEC /bin/sh -c '/usr/bin/python3 /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380184.1092775-506-101962182381229/AnsiballZ_command.py && sleep 0'
<sw-rzw-7412rv29-01> EXEC /bin/sh -c '/usr/bin/python3 /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380184.1276405-507-96319228262964/AnsiballZ_command.py && sleep 0'
<sw-rzw-7555nb4-01> EXEC /bin/sh -c 'rm -f -r /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380184.1092775-506-101962182381229/ > /dev/null 2>&1 && sleep 0'
ok: [sw-rzw-7555nb4-01] => {
"changed": false,
"invocation": {
"module_args": {
"commands": [
"clock timezone CET +1",
"clock summer-time CET recurring last sun mar 02:00 last sun oct 03:00",
"clock source sntp",
"sntp unicast client enable",
"sntp unicast client poll",
"sntp server ntp1.root.nl poll",
"sntp server ntp2.root.nl poll",
"sntp server ntp3.root.nl poll",
"sntp source-interface vlan 10"
],
"interval": 1,
"match": "all",
"retries": 10,
"wait_for": null
}
},
"stdout": [
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command"
],
"stdout_lines": [
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
]
]
}
<sw-rzw-7412rv29-01> EXEC /bin/sh -c 'rm -f -r /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380184.1276405-507-96319228262964/ > /dev/null 2>&1 && sleep 0'
ok: [sw-rzw-7412rv29-01] => {
"changed": false,
"invocation": {
"module_args": {
"commands": [
"clock timezone CET +1",
"clock summer-time CET recurring last sun mar 02:00 last sun oct 03:00",
"clock source sntp",
"sntp unicast client enable",
"sntp unicast client poll",
"sntp server ntp1.root.nl poll",
"sntp server ntp2.root.nl poll",
"sntp server ntp3.root.nl poll",
"sntp source-interface vlan 10"
],
"interval": 1,
"match": "all",
"retries": 10,
"wait_for": null
}
},
"stdout": [
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command",
"% Unrecognized command"
],
"stdout_lines": [
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
],
[
"% Unrecognized command"
]
]
}
TASK [show clock] ***************************************************************************************************************************************************************************************************************************
task path: /mnt/c/ansible/rzw routers/set ntp smb switches.yaml:19
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
Loading collection ansible.netcommon from /home/tom/.ansible/collections/ansible_collections/ansible/netcommon
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
Loading collection ansible.netcommon from /home/tom/.ansible/collections/ansible_collections/ansible/netcommon
<sw-rzw-7555nb4-01> attempting to start connection
<sw-rzw-7555nb4-01> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /home/tom/.local/bin/ansible-connection
<sw-rzw-7412rv29-01> attempting to start connection
<sw-rzw-7412rv29-01> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /home/tom/.local/bin/ansible-connection
<sw-rzw-7555nb4-01> found existing local domain socket, using it!
<sw-rzw-7555nb4-01> invoked shell using ssh_type: libssh
<sw-rzw-7555nb4-01> ssh connection done, setting terminal
<sw-rzw-7555nb4-01> loaded terminal plugin for network_os community.ciscosmb.ciscosmb
<sw-rzw-7555nb4-01> firing event: on_become
<sw-rzw-7555nb4-01> firing event: on_open_shell()
<sw-rzw-7555nb4-01> ssh connection has completed successfully
<sw-rzw-7555nb4-01> updating play_context for connection
<sw-rzw-7555nb4-01>
<sw-rzw-7555nb4-01> local domain socket path is /home/tom/.ansible/pc/2859bbe52b
<sw-rzw-7555nb4-01> ESTABLISH LOCAL CONNECTION FOR USER: tom
<sw-rzw-7555nb4-01> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7 `"&& mkdir "` echo /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380190.6068988-562-124179589788755 `" && echo ansible-tmp-1662380190.6068988-562-124179589788755="` echo /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380190.6068988-562-124179589788755 `" ) && sleep 0'
Using module file /home/tom/.ansible/collections/ansible_collections/community/ciscosmb/plugins/modules/command.py
<sw-rzw-7555nb4-01> PUT /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/tmp4pn75hlj TO /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380190.6068988-562-124179589788755/AnsiballZ_command.py
<sw-rzw-7555nb4-01> EXEC /bin/sh -c 'chmod u+x /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380190.6068988-562-124179589788755/ /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380190.6068988-562-124179589788755/AnsiballZ_command.py && sleep 0'
<sw-rzw-7555nb4-01> EXEC /bin/sh -c '/usr/bin/python3 /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380190.6068988-562-124179589788755/AnsiballZ_command.py && sleep 0'
<sw-rzw-7412rv29-01> found existing local domain socket, using it!
<sw-rzw-7412rv29-01> invoked shell using ssh_type: libssh
<sw-rzw-7412rv29-01> ssh connection done, setting terminal
<sw-rzw-7412rv29-01> loaded terminal plugin for network_os community.ciscosmb.ciscosmb
<sw-rzw-7412rv29-01> firing event: on_become
<sw-rzw-7412rv29-01> firing event: on_open_shell()
<sw-rzw-7412rv29-01> ssh connection has completed successfully
<sw-rzw-7412rv29-01> updating play_context for connection
<sw-rzw-7412rv29-01>
<sw-rzw-7412rv29-01> local domain socket path is /home/tom/.ansible/pc/a89574f2ae
<sw-rzw-7412rv29-01> ESTABLISH LOCAL CONNECTION FOR USER: tom
<sw-rzw-7412rv29-01> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7 `"&& mkdir "` echo /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380190.6439939-563-249605683006756 `" && echo ansible-tmp-1662380190.6439939-563-249605683006756="` echo /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380190.6439939-563-249605683006756 `" ) && sleep 0'
Using module file /home/tom/.ansible/collections/ansible_collections/community/ciscosmb/plugins/modules/command.py
<sw-rzw-7412rv29-01> PUT /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/tmp0nhlitby TO /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380190.6439939-563-249605683006756/AnsiballZ_command.py
<sw-rzw-7412rv29-01> EXEC /bin/sh -c 'chmod u+x /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380190.6439939-563-249605683006756/ /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380190.6439939-563-249605683006756/AnsiballZ_command.py && sleep 0'
<sw-rzw-7412rv29-01> EXEC /bin/sh -c '/usr/bin/python3 /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380190.6439939-563-249605683006756/AnsiballZ_command.py && sleep 0'
<sw-rzw-7555nb4-01> EXEC /bin/sh -c 'rm -f -r /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380190.6068988-562-124179589788755/ > /dev/null 2>&1 && sleep 0'
ok: [sw-rzw-7555nb4-01] => {
"changed": false,
"invocation": {
"module_args": {
"commands": [
"show clock"
],
"interval": 1,
"match": "all",
"retries": 10,
"wait_for": null
}
},
"stdout": [
"14:16:31 CET Sep 5 2022\nTime source is sntp\nTime from Browser is disabled"
],
"stdout_lines": [
[
"14:16:31 CET Sep 5 2022",
"Time source is sntp",
"Time from Browser is disabled"
]
]
}
<sw-rzw-7412rv29-01> EXEC /bin/sh -c 'rm -f -r /home/tom/.ansible/tmp/ansible-local-501ma8ctkm7/ansible-tmp-1662380190.6439939-563-249605683006756/ > /dev/null 2>&1 && sleep 0'
ok: [sw-rzw-7412rv29-01] => {
"changed": false,
"invocation": {
"module_args": {
"commands": [
"show clock"
],
"interval": 1,
"match": "all",
"retries": 10,
"wait_for": null
}
},
"stdout": [
"14:12:10 CET Sep 5 2022\nTime source is sntp\nTime from Browser is enabled"
],
"stdout_lines": [
[
"14:12:10 CET Sep 5 2022",
"Time source is sntp",
"Time from Browser is enabled"
]
]
}
TASK [show output] **************************************************************************************************************************************************************************************************************************
task path: /mnt/c/ansible/rzw routers/set ntp smb switches.yaml:23
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
Loading collection ansible.netcommon from /home/tom/.ansible/collections/ansible_collections/ansible/netcommon
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
Loading collection ansible.netcommon from /home/tom/.ansible/collections/ansible_collections/ansible/netcommon
<sw-rzw-7555nb4-01> attempting to start connection
<sw-rzw-7555nb4-01> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /home/tom/.local/bin/ansible-connection
<sw-rzw-7412rv29-01> attempting to start connection
<sw-rzw-7412rv29-01> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /home/tom/.local/bin/ansible-connection
<sw-rzw-7555nb4-01> found existing local domain socket, using it!
<sw-rzw-7555nb4-01> updating play_context for connection
<sw-rzw-7555nb4-01>
<sw-rzw-7555nb4-01> local domain socket path is /home/tom/.ansible/pc/2859bbe52b
ok: [sw-rzw-7555nb4-01] => {
"output.stdout": [
"14:16:31 CET Sep 5 2022\nTime source is sntp\nTime from Browser is disabled"
]
}
<sw-rzw-7412rv29-01> found existing local domain socket, using it!
<sw-rzw-7412rv29-01> updating play_context for connection
<sw-rzw-7412rv29-01>
<sw-rzw-7412rv29-01> local domain socket path is /home/tom/.ansible/pc/a89574f2ae
ok: [sw-rzw-7412rv29-01] => {
"output.stdout": [
"14:12:10 CET Sep 5 2022\nTime source is sntp\nTime from Browser is enabled"
]
}
META: ran handlers
META: ran handlers
PLAY RECAP **********************************************************************************************************************************************************************************************************************************
sw-rzw-7412rv29-01 : ok=3 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
sw-rzw-7555nb4-01 : ok=3 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
from community.ciscosmb.
Hello,
the first issue I find is that clock timezone CET +1
is configuration command ... so you have to go to configuration mode by configure terminal
, that is the reason of "% Unrecognized command" ...
For example like that.
- name: set ntp
community.ciscosmb.command:
commands:
- configure terminal
- clock timezone CET +1
I am continuing in debugging of ansible_become
... stay tuned
from community.ciscosmb.
Now I test enable mode ...
It works like breeze on FW version 2.4.x ... but on 1.4.x I can not find the bug ...
What is your model a FW version (show inventory
and show version
?
from community.ciscosmb.
With version 2.4.x or version 2.5.x does it work sometimes.
With a sf352-08p at version 2.5.0.83 it seems to work fine
With an sf350-24MP at version 2.5.0.83 it doesn't work. I get an error timeout.
ansible-playbook [core 2.13.3]
config file = None
configured module search path = ['/home/tom/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/tom/.local/lib/python3.10/site-packages/ansible
ansible collection location = /home/tom/.ansible/collections:/usr/share/ansible/collections
executable location = /home/tom/.local/bin/ansible-playbook
python version = 3.10.4 (main, Apr 2 2022, 09:04:19) [GCC 11.2.0]
jinja version = 3.0.3
libyaml = True
No config file found; using defaults
setting up inventory plugins
host_list declined parsing /mnt/c/ansible/rzw routers/inventory as it did not pass its verify_file() method
auto declined parsing /mnt/c/ansible/rzw routers/inventory as it did not pass its verify_file() method
Parsed /mnt/c/ansible/rzw routers/inventory inventory source with ini plugin
Loading collection community.ciscosmb from /home/tom/.ansible/collections/ansible_collections/community/ciscosmb
Loading callback plugin default of type stdout, v2.0 from /home/tom/.local/lib/python3.10/site-packages/ansible/plugins/callback/default.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: set ntp smb switches.yaml *********************************************************************************************************************************************************************************************************
Positional arguments: set ntp smb switches.yaml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/mnt/c/ansible/rzw routers/inventory',)
forks: 5
1 plays in set ntp smb switches.yaml
PLAY [edit ntp config] **********************************************************************************************************************************************************************************************************************
META: ran handlers
TASK [set ntp] ******************************************************************************************************************************************************************************************************************************
task path: /mnt/c/ansible/rzw routers/set ntp smb switches.yaml:5
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
Loading collection ansible.netcommon from /home/tom/.ansible/collections/ansible_collections/ansible/netcommon
redirecting (type: become) ansible.builtin.enable to ansible.netcommon.enable
<sw-rzw-7413av136-n-02> attempting to start connection
<sw-rzw-7413av136-n-02> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /home/tom/.local/bin/ansible-connection
<sw-rzw-7413av136-n-02> local domain socket does not exist, starting it
<sw-rzw-7413av136-n-02> control socket path is /home/tom/.ansible/pc/1508174f0a
<sw-rzw-7413av136-n-02> redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
<sw-rzw-7413av136-n-02> Loading collection ansible.netcommon from /home/tom/.ansible/collections/ansible_collections/ansible/netcommon
<sw-rzw-7413av136-n-02> Loading collection community.ciscosmb from /home/tom/.ansible/collections/ansible_collections/community/ciscosmb
<sw-rzw-7413av136-n-02> local domain socket listeners started successfully
<sw-rzw-7413av136-n-02> loaded cliconf plugin ansible_collections.community.ciscosmb.plugins.cliconf.ciscosmb from path /home/tom/.ansible/collections/ansible_collections/community/ciscosmb/plugins/cliconf/ciscosmb.py for network_os community.ciscosmb.ciscosmb
<sw-rzw-7413av136-n-02> ssh type is set to auto
<sw-rzw-7413av136-n-02> autodetecting ssh_type
<sw-rzw-7413av136-n-02> ssh type is now set to libssh
<sw-rzw-7413av136-n-02>
<sw-rzw-7413av136-n-02> local domain socket path is /home/tom/.ansible/pc/1508174f0a
<sw-rzw-7413av136-n-02> ESTABLISH LOCAL CONNECTION FOR USER: tom
<sw-rzw-7413av136-n-02> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/tom/.ansible/tmp/ansible-local-11523h5y2vge `"&& mkdir "` echo /home/tom/.ansible/tmp/ansible-local-11523h5y2vge/ansible-tmp-1662713817.2960064-1157-145408981825445 `" && echo ansible-tmp-1662713817.2960064-1157-145408981825445="` echo /home/tom/.ansible/tmp/ansible-local-11523h5y2vge/ansible-tmp-1662713817.2960064-1157-145408981825445 `" ) && sleep 0'
Using module file /home/tom/.ansible/collections/ansible_collections/community/ciscosmb/plugins/modules/command.py
<sw-rzw-7413av136-n-02> PUT /home/tom/.ansible/tmp/ansible-local-11523h5y2vge/tmp52hxwa3w TO /home/tom/.ansible/tmp/ansible-local-11523h5y2vge/ansible-tmp-1662713817.2960064-1157-145408981825445/AnsiballZ_command.py
<sw-rzw-7413av136-n-02> EXEC /bin/sh -c 'chmod u+x /home/tom/.ansible/tmp/ansible-local-11523h5y2vge/ansible-tmp-1662713817.2960064-1157-145408981825445/ /home/tom/.ansible/tmp/ansible-local-11523h5y2vge/ansible-tmp-1662713817.2960064-1157-145408981825445/AnsiballZ_command.py && sleep 0'
<sw-rzw-7413av136-n-02> EXEC /bin/sh -c '/usr/bin/python3 /home/tom/.ansible/tmp/ansible-local-11523h5y2vge/ansible-tmp-1662713817.2960064-1157-145408981825445/AnsiballZ_command.py && sleep 0'
<sw-rzw-7413av136-n-02> EXEC /bin/sh -c 'rm -f -r /home/tom/.ansible/tmp/ansible-local-11523h5y2vge/ansible-tmp-1662713817.2960064-1157-145408981825445/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
File "/tmp/ansible_community.ciscosmb.command_payload_zet6ysjk/ansible_community.ciscosmb.command_payload.zip/ansible_collections/community/ciscosmb/plugins/module_utils/ciscosmb.py", line 219, in get_capabilities
capabilities = Connection(module._socket_path).get_capabilities()
File "/tmp/ansible_community.ciscosmb.command_payload_zet6ysjk/ansible_community.ciscosmb.command_payload.zip/ansible/module_utils/connection.py", line 200, in __rpc__
raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
fatal: [sw-rzw-7413av136-n-02]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"commands": [
"configure terminal",
"clock timezone CET +1",
"clock summer-time CET recurring last sun mar 02:00 last sun oct 03:00",
"clock source sntp",
"sntp unicast client enable",
"sntp unicast client poll",
"sntp server ntp1.root.nl poll",
"sntp server ntp2.root.nl poll",
"sntp server ntp3.root.nl poll",
"sntp source-interface vlan 10",
"end"
],
"interval": 1,
"match": "all",
"retries": 10,
"wait_for": null
}
},
"msg": "command timeout triggered, timeout value is 30 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide."
}
PLAY RECAP **********************************************************************************************************************************************************************************************************************************
sw-rzw-7413av136-n-02 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
with version 1.4.x it never works. I get the same error
ansible-playbook [core 2.13.3]
config file = None
configured module search path = ['/home/tom/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/tom/.local/lib/python3.10/site-packages/ansible
ansible collection location = /home/tom/.ansible/collections:/usr/share/ansible/collections
executable location = /home/tom/.local/bin/ansible-playbook
python version = 3.10.4 (main, Apr 2 2022, 09:04:19) [GCC 11.2.0]
jinja version = 3.0.3
libyaml = True
No config file found; using defaults
setting up inventory plugins
host_list declined parsing /mnt/c/ansible/rzw routers/inventory as it did not pass its verify_file() method
auto declined parsing /mnt/c/ansible/rzw routers/inventory as it did not pass its verify_file() method
Parsed /mnt/c/ansible/rzw routers/inventory inventory source with ini plugin
Loading collection community.ciscosmb from /home/tom/.ansible/collections/ansible_collections/community/ciscosmb
Loading callback plugin default of type stdout, v2.0 from /home/tom/.local/lib/python3.10/site-packages/ansible/plugins/callback/default.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: set ntp smb switches.yaml *********************************************************************************************************************************************************************************************************Positional arguments: set ntp smb switches.yaml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/mnt/c/ansible/rzw routers/inventory',)
forks: 5
1 plays in set ntp smb switches.yaml
PLAY [edit ntp config] **********************************************************************************************************************************************************************************************************************META: ran handlers
TASK [set ntp] ******************************************************************************************************************************************************************************************************************************task path: /mnt/c/ansible/rzw routers/set ntp smb switches.yaml:5
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
Loading collection ansible.netcommon from /home/tom/.ansible/collections/ansible_collections/ansible/netcommon
redirecting (type: become) ansible.builtin.enable to ansible.netcommon.enable
<sw-rzw-7555nb4-01> attempting to start connection
<sw-rzw-7555nb4-01> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /home/tom/.local/bin/ansible-connection
<sw-rzw-7555nb4-01> local domain socket does not exist, starting it
<sw-rzw-7555nb4-01> control socket path is /home/tom/.ansible/pc/e21c3c4172
<sw-rzw-7555nb4-01> redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
<sw-rzw-7555nb4-01> Loading collection ansible.netcommon from /home/tom/.ansible/collections/ansible_collections/ansible/netcommon
<sw-rzw-7555nb4-01> Loading collection community.ciscosmb from /home/tom/.ansible/collections/ansible_collections/community/ciscosmb
<sw-rzw-7555nb4-01> local domain socket listeners started successfully
<sw-rzw-7555nb4-01> loaded cliconf plugin ansible_collections.community.ciscosmb.plugins.cliconf.ciscosmb from path /home/tom/.ansible/collections/ansible_collections/community/ciscosmb/plugins/cliconf/ciscosmb.py for network_os community.ciscosmb.ciscosmb
<sw-rzw-7555nb4-01> ssh type is set to auto
<sw-rzw-7555nb4-01> autodetecting ssh_type
<sw-rzw-7555nb4-01> ssh type is now set to libssh
<sw-rzw-7555nb4-01>
<sw-rzw-7555nb4-01> local domain socket path is /home/tom/.ansible/pc/e21c3c4172
<sw-rzw-7555nb4-01> ESTABLISH LOCAL CONNECTION FOR USER: tom
<sw-rzw-7555nb4-01> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/tom/.ansible/tmp/ansible-local-927lzof8flp `"&& mkdir "` echo /home/tom/.ansible/tmp/ansible-local-927lzof8flp/ansible-tmp-1662712742.9212296-932-155643560059539 `" && echo ansible-tmp-1662712742.9212296-932-155643560059539="` echo /home/tom/.ansible/tmp/ansible-local-927lzof8flp/ansible-tmp-1662712742.9212296-932-155643560059539 `" ) && sleep 0'
Using module file /home/tom/.ansible/collections/ansible_collections/community/ciscosmb/plugins/modules/command.py
<sw-rzw-7555nb4-01> PUT /home/tom/.ansible/tmp/ansible-local-927lzof8flp/tmp255fvv7x TO /home/tom/.ansible/tmp/ansible-local-927lzof8flp/ansible-tmp-1662712742.9212296-932-155643560059539/AnsiballZ_command.py
<sw-rzw-7555nb4-01> EXEC /bin/sh -c 'chmod u+x /home/tom/.ansible/tmp/ansible-local-927lzof8flp/ansible-tmp-1662712742.9212296-932-155643560059539/ /home/tom/.ansible/tmp/ansible-local-927lzof8flp/ansible-tmp-1662712742.9212296-932-155643560059539/AnsiballZ_command.py && sleep 0'
<sw-rzw-7555nb4-01> EXEC /bin/sh -c '/usr/bin/python3 /home/tom/.ansible/tmp/ansible-local-927lzof8flp/ansible-tmp-1662712742.9212296-932-155643560059539/AnsiballZ_command.py && sleep 0'
<sw-rzw-7555nb4-01> EXEC /bin/sh -c 'rm -f -r /home/tom/.ansible/tmp/ansible-local-927lzof8flp/ansible-tmp-1662712742.9212296-932-155643560059539/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
File "/tmp/ansible_community.ciscosmb.command_payload_g7k97mxj/ansible_community.ciscosmb.command_payload.zip/ansible_collections/community/ciscosmb/plugins/module_utils/ciscosmb.py", line 290, in run_commands
out = connection.get(command, prompt, answer)
File "/tmp/ansible_community.ciscosmb.command_payload_g7k97mxj/ansible_community.ciscosmb.command_payload.zip/ansible/module_utils/connection.py", line 200, in __rpc__
raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
fatal: [sw-rzw-7555nb4-01]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"commands": [
"configure terminal",
"clock timezone CET +1",
"clock summer-time CET recurring last sun mar 02:00 last sun oct 03:00",
"clock source sntp",
"sntp unicast client enable",
"sntp unicast client poll",
"sntp server ntp1.root.nl poll",
"sntp server ntp2.root.nl poll",
"sntp server ntp3.root.nl poll",
"sntp source-interface vlan 10",
"end"
],
"interval": 1,
"match": "all",
"retries": 10,
"wait_for": null
}
},
"msg": "command timeout triggered, timeout value is 30 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide."
}
PLAY RECAP **********************************************************************************************************************************************************************************************************************************
sw-rzw-7555nb4-01 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
from community.ciscosmb.
Can you compare config of sf352-08p at version 2.5.0.83 and sf350-24MP at version 2.5.0.83, if is there some significant difference in configured accounts, enable commands, authorization or console/vtty settings ?
from community.ciscosmb.
Related Issues (20)
- Rewrite community.ciscosmb.ciscosmb_facts to community.ciscosmb.facts HOT 2
- SX550X-24F issue with parse_inventory HOT 2
- Links at bottom of readme don't work in Galaxy HOT 1
- README Typo and misleading vars HOT 2
- Important information for collection maintainers
- Bad authentication HOT 10
- Ansible Contributor Summit. Tuesday, April 12, 2022.
- Action required: Add stable-2.13 to the test matrix HOT 2
- How to pass STDIN to commands HOT 1
- Not saving all running config HOT 4
- CBS350-24T-4G: "Failed to authenticate: Authentication failed." HOT 4
- Consider using true/false for all booleans in docs
- ConnectionError HOT 9
- Typo in /plugins/cliconf/ciscosmb.py HOT 2
- Add support for netcommon/gather_facts HOT 2
- Cisco CBS350 command Time-Out due to NO newline after command output HOT 4
- bandwith not bandwidth HOT 1
- Enable not working on SG300 HOT 6
- Collection Requirements Violation - Semantic Versioning HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from community.ciscosmb.