Hi,

I am also facing a similar problem.  The output says "register" is not 
supported for ios_command module.  Any idea on this?  I am running the 
latest ansible version 2.4.2.0.  If I don't use the register command, the 
playbook executes successfully, so the error is only caused by 
register/stdout related commands.

Appreciate any help.


---
 - name: Checking running cisco config
   hosts: cisco
   gather_facts: False
   connection: local
   vars_files:
   - creds.yml

   tasks:


      - name: configure provider
        set_fact:
         provider:
           username: "{{username}}"
           password: "{{password}}"
           host: "{{inventory_hostname}}"


      - name: DEPLOY SNMP COMMANDS WITHIN PB
        delegate_to: localhost
        ios_command:
           provider: "{{ provider }}"
           commands:
             - show mod | i c200
           register: showmod

      - debug: "msg='2c31.24a4.c200'"
        when: showmod.stdout | join(" ") | search("/c200/")




PLAY [Checking running cisco config] 
********************************************************************************************************************************************************************************************************

TASK [configure provider] 
*******************************************************************************************************************************************************************************************************************
ok: [sltnrmgmt]

TASK [DEPLOY SNMP COMMANDS WITHIN PB] 
*******************************************************************************************************************************************************************************************************
fatal: [sltnrmgmt -> localhost]: FAILED! => {"changed": false, "msg": 
"Unsupported parameters for (ios_command) module: register Supported 
parameters include: 
auth_pass,authorize,commands,host,interval,match,password,port,provider,retries,ssh_keyfile,timeout,username,wait_for"}
        to retry, use: --limit @/etc/ansible/cisco-test.retry

PLAY RECAP 
**********************************************************************************************************************************************************************************************************************************
sltnrmgmt      : ok=1    changed=0    unreachable=0    failed=1


ansible --version
ansible 2.4.2.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', 
u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Nov  6 2016, 00:28:07) [GCC 4.8.5 
20150623 (Red Hat 4.8.5-11)]

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3e988519-1c07-4c82-8390-ca30657bcf6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to