Skip to content

Instantly share code, notes, and snippets.

@mrlesmithjr
Last active November 22, 2017 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrlesmithjr/6be767f00191e21bf00bbe6ce784113d to your computer and use it in GitHub Desktop.
Save mrlesmithjr/6be767f00191e21bf00bbe6ce784113d to your computer and use it in GitHub Desktop.
- name: configure loopback interface address
nxos_ip_interface:
addr: 1.1.1.1
host: "{{ ansible_host }}"
interface: loopback 0
mask: 24
password: "{{ ansible_net_password }}"
state: present
transport: cli
username: "{{ ansible_net_username }}"
version: v4
TASK [configure loopback interface address] ********************************************************************************************************************************************************************************************************************************************************************************
fatal: [n9kv1]: FAILED! => {"changed": false, "failed": true, "msg": "ipaddress is required for this module. Run 'pip install ipaddress' for install."}
to retry, use: --limit @/Users/larry/projects/vagrant/nx-os/nxos.retry
pip2 list larry@Larrys-MacBook-Pro
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
ansible (2.4.1.0)
ansible-lint (3.4.17)
asn1crypto (0.23.0)
astroid (1.5.3)
autopep8 (1.3.3)
backports.functools-lru-cache (1.4)
bcrypt (3.1.4)
beautysh (3.7)
certifi (2017.11.5)
cffi (1.11.2)
chardet (3.0.4)
configparser (3.5.0)
cryptography (2.1.3)
enum34 (1.1.6)
idna (2.6)
ipaddress (1.0.18)
isort (4.2.15)
Jinja2 (2.10)
lazy-object-proxy (1.3.1)
MarkupSafe (1.0)
mccabe (0.6.1)
netaddr (0.7.19)
ntlm-auth (1.0.6)
paramiko (2.4.0)
passlib (1.7.1)
pip (9.0.1)
pluggy (0.5.2)
py (1.5.0)
pyasn1 (0.3.7)
pycodestyle (2.3.1)
pycparser (2.18)
pydocstyle (2.1.1)
pyflakes (1.6.0)
pylama (7.4.3)
pylint (1.7.4)
PyNaCl (1.2.0)
pyOpenSSL (17.3.0)
pyvmomi (6.5.0.2017.5.post1)
pywinrm (0.2.2)
PyYAML (3.12)
requests (2.18.4)
requests-ntlm (1.1.0)
setuptools (36.5.0)
singledispatch (3.4.0.3)
six (1.11.0)
snowballstemmer (1.2.1)
tox (2.9.1)
urllib3 (1.22)
virtualenv (15.1.0)
wheel (0.30.0)
wrapt (1.10.11)
xmltodict (0.11.0)
~/projects/vagrant/nx-os » ansible --version larry@Larrys-MacBook-Pro
ansible 2.4.1.0
config file = None
configured module search path = [u'/Users/larry/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.14 (default, Sep 25 2017, 09:53:22) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]
@mrlesmithjr
Copy link
Author

~/projects/vagrant/nx-os » ansible --version                                                                                                           larry@Larrys-MacBook-Pro
ansible 2.3.1.0
  config file =
  configured module search path = Default w/o overrides
  python version = 2.7.14 (default, Sep 25 2017, 09:53:22) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]
(ansible-2.3.1.0) -
~/projects/vagrant/nx-os » pip2 list                                                                                                                   larry@Larrys-MacBook-Pro
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
ansible (2.3.1.0)
ansible-lint (3.4.17)
asn1crypto (0.23.0)
bcrypt (3.1.4)
cffi (1.11.2)
cryptography (2.1.3)
enum34 (1.1.6)
idna (2.6)
ipaddress (1.0.18)
Jinja2 (2.10)
MarkupSafe (1.0)
paramiko (2.4.0)
pip (9.0.1)
pyasn1 (0.3.7)
pycparser (2.18)
pycrypto (2.6.1)
PyNaCl (1.2.0)
PyYAML (3.12)
setuptools (36.7.2)
six (1.11.0)
wheel (0.30.0)
(ansible-2.3.1.0)

Using the above Ansible version 2.3.1.0 it works fine with the same version of ipaddress module installed.

@mrlesmithjr
Copy link
Author

~/projects/vagrant/nx-os » ansible --version                                                                                                           larry@Larrys-MacBook-Pro
ansible 2.4.0.0
  config file = None
  configured module search path = [u'/Users/larry/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/larry/python-virtualenvs/ansible-2.4.0.0/lib/python2.7/site-packages/ansible
  executable location = /Users/larry/python-virtualenvs/ansible-2.4.0.0/bin/ansible
  python version = 2.7.14 (default, Sep 25 2017, 09:53:22) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]

Ansible version 2.4.0.0 results in the same error:

TASK [configure loopback interface address] ************************************************************************************************************************************
fatal: [n9kv1]: FAILED! => {"changed": false, "failed": true, "msg": "ipaddress is required for this module. Run 'pip install ipaddress' for install."}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment