-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix nxos action plugin for nxos_install_os #53768
Fix nxos action plugin for nxos_install_os #53768
Conversation
connection = self._connection | ||
if connection.get_option('persistent_command_timeout') < 600 or connection.get_option('persistent_connect_timeout') < 600: | ||
if connection.transport == 'local': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikewiebe Can you update the module docs which states, if someone wants to set the timeouts as config task variable network_cli/httpapi connection plugin is required. local
only supports these timeout values with ansible.cfg or env var.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I can do that.
7e1bd7c
to
ffa85c1
Compare
@trishnaguha Can we go ahead and merge this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mikewiebe
* Fix nxos action plugin for nxos_install_os * Update module docs (cherry picked from commit 4c2a3bf)
* Fix nxos action plugin for nxos_install_os * Update module docs (cherry picked from commit 4c2a3bf)
Which version of Ansible this fix is available? |
I just copied this file alone, it fails like this TASK [Install OS on N6k] *************************************************************************************************************************************************** fatal: [10.9.8.115]: FAILED! => { |
@fcam-naveen It will be available in 2.7.11 version, not released yet.
|
@trishnaguha so there is no way to get this working on 2.7.10? i have to upgrade 60 + switches and would love to automate this. I am getting the same error as in this post and looking for a fix :) |
@Sulemanaaa We don't backport fixes to the version that is already released. For a stable release you will have to wait for 2.7.11 to release. Your patience will be much appreciated :-). However you can still pull
This will enable stable-2.7 version of ansible on your local environment for that specific terminal session. Hope this helps! |
Thank you @trishnaguha tried the steps and getting: self.local_index = Environment(self.shadow_path + sys.path) Setting up Ansible to run out of checkout... PATH=/Users/sushahid/ansible/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Users/sushahid/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/bin/jamf:/usr/local/git/bin Remember, you may wish to specify your host file with -i Done! You have mail in /var/mail/sushahid |
SUMMARY
Fixes #52206
PERSISTENT_COMMAND_TIMEOUT
andPERSISTENT_CONNECT_TIMEOUT
-vvvv
output.NOTE: For connection:
local (cli) or (nxapi)
setting vars in the playbook task or passing via the-e
argument have no effect. Setting environment variables or setting ansible.cfg however, do work.I am open to suggestions about how we get playbook task vars to take effect for connection:
local (cli) or (nxapi)
.ISSUE TYPE
COMPONENT NAME
nxos_install_os
ADDITIONAL INFORMATION
The following tests were run to validate this fix.
CONNECTION: network_cli
$cat /etc/ansible/ansible.cfg [persistent_connection] connect_timeout=800 command_timeout=800
ansible-playbook
using-e
optionansible-playbook nxos.yaml -e "ansible_command_timeout=1000 ansible_connect_timeout=900"
CONNECTION: httpapi
$cat /etc/ansible/ansible.cfg [persistent_connection] connect_timeout=800 command_timeout=800
ansible-playbook
using-e
optionansible-playbook nxos.yaml -e "ansible_command_timeout=1000 ansible_connect_timeout=900"
CONNECTION: local (cli)
$cat /etc/ansible/ansible.cfg [persistent_connection] connect_timeout=800 command_timeout=800
ansible-playbook
using-e
option - FAILEDansible-playbook nxos.yaml -e "ansible_command_timeout=1000 ansible_connect_timeout=900"
CONNECTION: local (nxapi)