{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/46810","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/46810/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/46810/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/46810/events","html_url":"https://github.com/ansible/ansible/issues/46810","id":369113036,"node_id":"MDU6SXNzdWUzNjkxMTMwMzY=","number":46810,"title":"Could not find imported module support code for nxos_command.  Looked for either *.py or shell.py","user":{"login":"ro8harp","id":30417283,"node_id":"MDQ6VXNlcjMwNDE3Mjgz","avatar_url":"https://avatars0.githubusercontent.com/u/30417283?v=4","gravatar_id":"","url":"https://api.github.com/users/ro8harp","html_url":"https://github.com/ro8harp","followers_url":"https://api.github.com/users/ro8harp/followers","following_url":"https://api.github.com/users/ro8harp/following{/other_user}","gists_url":"https://api.github.com/users/ro8harp/gists{/gist_id}","starred_url":"https://api.github.com/users/ro8harp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ro8harp/subscriptions","organizations_url":"https://api.github.com/users/ro8harp/orgs","repos_url":"https://api.github.com/users/ro8harp/repos","events_url":"https://api.github.com/users/ro8harp/events{/privacy}","received_events_url":"https://api.github.com/users/ro8harp/received_events","type":"User","site_admin":false},"labels":[{"id":835286067,"node_id":"MDU6TGFiZWw4MzUyODYwNjc=","url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.6","name":"affects_2.6","color":"ededed","default":false},{"id":785271699,"node_id":"MDU6TGFiZWw3ODUyNzE2OTk=","url":"https://api.github.com/repos/ansible/ansible/labels/bug","name":"bug","color":"fbca04","default":true},{"id":503572087,"node_id":"MDU6TGFiZWw1MDM1NzIwODc=","url":"https://api.github.com/repos/ansible/ansible/labels/needs_triage","name":"needs_triage","color":"0e8a16","default":false},{"id":339653091,"node_id":"MDU6TGFiZWwzMzk2NTMwOTE=","url":"https://api.github.com/repos/ansible/ansible/labels/networking","name":"networking","color":"c7def8","default":false},{"id":731809659,"node_id":"MDU6TGFiZWw3MzE4MDk2NTk=","url":"https://api.github.com/repos/ansible/ansible/labels/nxos","name":"nxos","color":"c7def8","default":false},{"id":636327968,"node_id":"MDU6TGFiZWw2MzYzMjc5Njg=","url":"https://api.github.com/repos/ansible/ansible/labels/support:community","name":"support:community","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-11T13:08:30Z","updated_at":"2018-10-11T15:33:34Z","closed_at":null,"author_association":"NONE","body":"<!--- Verify first that your issue is not already reported on GitHub -->\r\n<!--- Also test if the latest release and devel branch are affected too -->\r\n<!--- Complete *all* sections as described, this form is processed automatically -->\r\n\r\n##### SUMMARY\r\n<!--- Explain the problem briefly below -->\r\nUpgraded Ansible from 2.4 to 2.5.5 and not NXOS playbooks no longer work. I see the connection: local has been deprecated and to use network_cli. Ive also tested this on Ansible 2.6.1 with same issue. It may be that I have something not set up right so it may not be a bug. \r\n\r\n##### ISSUE TYPE\r\n- Bug Report\r\n\r\n##### COMPONENT NAME\r\n<!--- Write the short name of the module, plugin, task or feature below -->\r\nnxos\r\n\r\n##### ANSIBLE VERSION\r\n<!--- Paste verbatim output from \"ansible --version\" between quotes -->\r\n```paste below\r\nansible 2.6.1\r\n  config file = /Users/testuser/.ansible.cfg\r\n  configured module search path = [u'/Users/testuser/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /Library/Python/2.7/site-packages/ansible\r\n  executable location = /usr/local/bin/ansible\r\n  python version = 2.7.10 (default, Oct  6 2017, 22:29:07) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]\r\n```\r\n\r\n##### CONFIGURATION\r\n<!--- Paste verbatim output from \"ansible-config dump --only-changed\" between quotes -->\r\n```paste below\r\nDEFAULT_HOST_LIST(/Users/rharp/.ansible.cfg) = [u'/etc/ansible/hosts']\r\nDEFAULT_TIMEOUT(/Users/rharp/.ansible.cfg) = 60\r\nHOST_KEY_CHECKING(/Users/rharp/.ansible.cfg) = False\r\n```\r\n\r\n##### OS / ENVIRONMENT\r\n<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->\r\nNexus 7018 version 6.2(20) CLI\r\n\r\n##### STEPS TO REPRODUCE\r\n<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->\r\nCreate Ansible playbook listed below. Run playbook with username and password parameters.\r\ntestuser@OSX:/etc/ansible$ cat hosts\r\n[nxos]\r\nnxos-core-1 ansible_host=10.10.10.10\r\n\r\n[nxos:vars]\r\nansible_network_os=nxos\r\n\r\n<!--- Paste example playbooks or commands between quotes below -->\r\n```yaml\r\n---\r\n\r\n#NXOS Gathering Admin Local Users\r\n- hosts: nxos-core-1\r\n  connection: network_cli\r\n  gather_facts: no\r\n\r\n  tasks:\r\n\r\n    - name: Importing Secret Variables\r\n      include_vars: secrets.yml\r\n\r\n    - name: NXOS Show Admin Local Users\r\n      register: NXOSShowAdminLocalUsers\r\n      nxos_command:\r\n        commands:\r\n          - \"sh run | inc username\"\r\n\r\n    - debug: msg={{NXOSShowAdminLocalUsers.stdout_lines}}\r\n\r\n    - name: NXOS Storing Admin Local Users\r\n      copy:\r\n        content: \"{{ NXOSShowAdminLocalUsers.stdout[0] }}\"\r\n        dest: \"/etc/ansible/configs/users/nxos-admin-local-users.cfg\"\r\n```\r\n\r\n<!--- HINT: You can paste gist.github.com links for larger files -->\r\n\r\n##### EXPECTED RESULTS\r\n<!--- Describe what you expected to happen when running the steps above -->\r\nI would expect to see output of the usernames.\r\n\r\n##### ACTUAL RESULTS\r\n<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->\r\ntestuser@OSX:/etc/ansible$ sudo ansible-playbook nxos-test.yml -vvvv -u test_user -k\r\nansible-playbook 2.6.1\r\n  config file = /Users/testuser/.ansible.cfg\r\n  configured module search path = [u'/Users/testuser/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /Library/Python/2.7/site-packages/ansible\r\n  executable location = /usr/local/bin/ansible-playbook\r\n  python version = 2.7.10 (default, Oct  6 2017, 22:29:07) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]\r\nUsing /Users/testuser/.ansible.cfg as config file\r\nSSH password:\r\nsetting up inventory plugins\r\nSet default localhost to localhost\r\nParsed /etc/ansible/hosts inventory source with ini plugin\r\n\r\n\r\n\r\nLoading callback plugin default of type stdout, v2.0 from /Library/Python/2.7/site-packages/ansible/plugins/callback/default.pyc\r\n\r\nPLAYBOOK: nxos-test.yml ****************************************************************************************************************\r\n1 plays in nxos-test.yml\r\n\r\nPLAY [nxos-core-1] *********************************************************************************************************\r\nMETA: ran handlers\r\n\r\nTASK [Importing Secret Variables] ******************************************************************************************************\r\ntask path: /private/etc/ansible/nxos-test.yml:10\r\n<10.10.10.10> attempting to start connection\r\n<10.10.10.10> using connection plugin network_cli\r\n<10.10.10.10> local domain socket does not exist, starting it\r\n<10.10.10.10> control socket path is /Users/testuser/.ansible/pc/baf5c39e3d\r\n<10.10.10.10> <10.10.10.10> ESTABLISH CONNECTION FOR USER: test_user on PORT 22 TO 10.10.10.10\r\n<10.10.10.10> <10.10.10.10> ssh connection done, setting terminal\r\n<10.10.10.10> <10.10.10.10> loaded terminal plugin for network_os nxos\r\n<10.10.10.10> <10.10.10.10> loaded cliconf plugin for network_os nxos\r\n<10.10.10.10> <10.10.10.10> firing event: on_open_shell()\r\n<10.10.10.10> <10.10.10.10> ssh connection has completed successfully\r\n<10.10.10.10> connection to remote device started successfully\r\n<10.10.10.10> local domain socket listeners started successfully\r\n<10.10.10.10>\r\n<10.10.10.10> local domain socket path is /Users/testuser/.ansible/pc/baf5c39e3d\r\nok: [nxos-core-1] => {\r\n    \"ansible_facts\": {\r\n        \"password\": \"testing\",\r\n        \"username\": \"test_user\"\r\n    },\r\n    \"ansible_included_var_files\": [\r\n        \"/private/etc/ansible/secrets.yml\"\r\n    ],\r\n    \"changed\": false\r\n}\r\n\r\nTASK [NXOS Show Admin Local Users] *****************************************************************************************************\r\ntask path: /private/etc/ansible/nxos-test.yml:13\r\n<10.10.10.10> attempting to start connection\r\n<10.10.10.10> using connection plugin network_cli\r\n<10.10.10.10> found existing local domain socket, using it!\r\n<10.10.10.10> updating play_context for connection\r\n<10.10.10.10>\r\n<10.10.10.10> local domain socket path is /Users/testuser/.ansible/pc/baf5c39e3d\r\n<10.10.10.10> ESTABLISH LOCAL CONNECTION FOR USER: root\r\n<10.10.10.10> EXEC /bin/sh -c '( umask 77 && mkdir -p \"` echo /Users/testuser/.ansible/tmp/ansible-local-66754KFKGrB/ansible-tmp-1539260805.6-67445272786497 `\" && echo ansible-tmp-1539260805.6-67445272786497=\"` echo /Users/testuser/.ansible/tmp/ansible-local-66754KFKGrB/ansible-tmp-1539260805.6-67445272786497 `\" ) && sleep 0'\r\nfatal: [nxos-core-1]: FAILED! => {\r\n    \"msg\": \"Could not find imported module support code for nxos_command.  Looked for either *.py or shell.py\"\r\n}\r\n\tto retry, use: --limit @/private/etc/ansible/nxos-test.retry\r\n\r\nPLAY RECAP *****************************************************************************************************************************\r\nnxos-core-1    : ok=1    changed=0    unreachable=0    failed=1\r\n<!--- Paste verbatim command output between quotes -->\r\n```paste below\r\nn/a\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/429001622","html_url":"https://github.com/ansible/ansible/issues/46810#issuecomment-429001622","issue_url":"https://api.github.com/repos/ansible/ansible/issues/46810","id":429001622,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTAwMTYyMg==","user":{"login":"trishnaguha","id":13337039,"node_id":"MDQ6VXNlcjEzMzM3MDM5","avatar_url":"https://avatars2.githubusercontent.com/u/13337039?v=4","gravatar_id":"","url":"https://api.github.com/users/trishnaguha","html_url":"https://github.com/trishnaguha","followers_url":"https://api.github.com/users/trishnaguha/followers","following_url":"https://api.github.com/users/trishnaguha/following{/other_user}","gists_url":"https://api.github.com/users/trishnaguha/gists{/gist_id}","starred_url":"https://api.github.com/users/trishnaguha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trishnaguha/subscriptions","organizations_url":"https://api.github.com/users/trishnaguha/orgs","repos_url":"https://api.github.com/users/trishnaguha/repos","events_url":"https://api.github.com/users/trishnaguha/events{/privacy}","received_events_url":"https://api.github.com/users/trishnaguha/received_events","type":"User","site_admin":false},"created_at":"2018-10-11T15:33:34Z","updated_at":"2018-10-11T15:33:34Z","author_association":"MEMBER","body":"@ro8harp Hi, this bug has been fixed in Ansible 2.6.5 and 2.7.0. https://github.com/ansible/ansible/pull/45271. Can you please check the versions?"}}
{"actor":{"display_login":"trishnaguha"}}