Hi,
I'm trying to use juniper.junos modules and I got a message like:
[WARNING]: Ignoring invalid attribute: commands
Script is as simple as it can be:
---
- name: Get Device Facts
hosts: hosts
connection: local
gather_facts: no
roles:
- Juniper.junos
tasks:
- name: Checking NETCONF connectivity
wait_for: host={{ inventory_hostname }} port=830 timeout=5
- name: Execute single show version command.
juniper_junos_command:
commands:
- "show version"
register: response
But the output I receive is:
tomi-v:~/ansible$ ansible-playbook --limit 'test-gw-01' playbooks/request_command.yml
[WARNING]: Ignoring invalid attribute: commands
PLAY [Get Device Facts] ************************************************************************************************************************************************************************************************************************************************
TASK [Checking NETCONF connectivity] ***********************************************************************************************************************************************************************************************************************************
ok: [test-gw-01]
TASK [Execute single show version command.] ****************************************************************************************************************************************************************************************************************************
fatal: [test-gw-01]: FAILED! => {"changed": false, "msg": "missing required arguments: commands"}
to retry, use: --limit @/home/tomi/ansible/playbooks/request_command.retry
PLAY RECAP *************************************************************************************************************************************************************************************************************************************************************
test-gw-01 : ok=1 changed=0 unreachable=0 failed=1
As for ansible and python everything seems to be up to date:
tomi-v:~/ansible$ pip freeze | grep junos
junos-eznc==2.1.7
junos-netconify==1.0.2
tomi-v:~/ansible$ ansible --version
ansible 2.4.2.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/tomi/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
Juniper.junos (2.0.1)
W would be greatefull for any ideas.
--
Tomi.