-
Couldn't load subscription status.
- Fork 167
Description
Tried to upgrade Junos using junos_install_os with Ansible 2.3.1.
If I don't provide the logfile parameter, it fails with following error.
'ansible-playbook junos_upgrade.yaml -vvv
Using /etc/ansible/ansible.cfg as config file
PLAYBOOK: junos_upgrade.yaml **************************************************************************************
1 plays in junos_upgrade.yaml
PLAY [Junos_Upgrade] **********************************************************************************************
META: ran handlers
TASK [Upgrade OS of Router with Single RE] ************************************************************************
task path: /root/junos_upgrade.yaml:13
Using module file /etc/ansible/roles/Juniper.junos/library/junos_install_os
ESTABLISH LOCAL CONNECTION FOR USER: root
EXEC /bin/sh -c '( umask 77 && mkdir -p "echo $HOME/.ansible/tmp/ansible-tmp-1497625164.73-54051248839938" && echo ansible-tmp-1497625164.73-54051248839938="echo $HOME/.ansible/tmp/ansible-tmp-1497625164.73-54051248839938" ) && sleep 0'
PUT /tmp/tmp0Tuztb TO /root/.ansible/tmp/ansible-tmp-1497625164.73-54051248839938/junos_install_os
EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1497625164.73-54051248839938/ /root/.ansible/tmp/ansible-tmp-1497625164.73-54051248839938/junos_install_os && sleep 0'
EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1497625164.73-54051248839938/junos_install_os; rm -rf "/root/.ansible/tmp/ansible-tmp-1497625164.73-54051248839938/" > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_P8KQgN/ansible_module_junos_install_os.py", line 307, in
main()
File "/tmp/ansible_P8KQgN/ansible_module_junos_install_os.py", line 292, in main
results = junos_install_os(module, dev)
File "/tmp/ansible_P8KQgN/ansible_module_junos_install_os.py", line 226, in junos_install_os
do_log(results['msg'], level='error')
TypeError: do_log() got an unexpected keyword argument 'level'
fatal: [ho-pe]: FAILED! => {
"changed": false,
"failed": true,
"module_stderr": "Traceback (most recent call last):\n File "/tmp/ansible_P8KQgN/ansible_module_junos_install_os.py", line 307, in \n main()\n File "/tmp/ansible_P8KQgN/ansible_module_junos_install_os.py", line 292, in main\n results = junos_install_os(module, dev)\n File "/tmp/ansible_P8KQgN/ansible_module_junos_install_os.py", line 226, in junos_install_os\n do_log(results['msg'], level='error')\nTypeError: do_log() got an unexpected keyword argument 'level'\n",
"module_stdout": "",
"msg": "MODULE FAILURE",
"rc": 0
}
to retry, use: --limit @/root/junos_upgrade.retry
PLAY RECAP ********************************************************************************************************
ho-pe : ok=0 changed=0 unreachable=0 failed=1
'
As per the documentation -- logfile is not mandatory