ansible-junos-stdlib
ansible-junos-stdlib copied to clipboard
junos_shutdown for vsrx fails with "command is not valid on the vsrx" ansible 2.10.8
vSRX (JUNOS 23.4R1-S2.4 ) is running Ubuntu 20.04 KVM
Playbook
---
- name: Reboot Junos devices
hosts: srx-devices
connection: local
gather_facts: no
tasks:
- name: Shutdown all other Routing Engines
juniper.device.system:
action: "shutdown"
other_re: True
Result
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
PLAY [Reboot Junos devices] ********************************************************************************************
TASK [Shutdown all other Routing Engines] ******************************************************************************
fatal: [dal12-pentest-ha]: FAILED! => {"action": "shutdown", "all_re": true, "ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "changed": false, "media": false, "msg": "shutdown failed. Error: RpcError(severity: error, bad_element: None, message: command is not valid on the vsrx)", "other_re": true, "reboot": false, "vmhost": false}
PLAY RECAP *************************************************************************************************************
dal12-pentest-ha : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Wondering how to get this run successfully on the vSRX. Thank you in advance.
Ansible environment
ansible 2.10.8
config file = None
configured module search path = ['/home/ca0d2280/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0]