Excellent!  Many thanks for the pointer and it is working now.  Is there 
any link that you could provide me regarding the best practices for 
indendations?

On Friday, December 8, 2017 at 4:19:41 PM UTC+8, Kai Stian Olstad wrote:
>
> On Friday, 8 December 2017 09.10.55 CET SK wrote: 
> > 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 
>
> register is a directive for the task and not the module. 
> So the register is indented to spaces to much, it should be on the same 
> level as ios_command, delegate_to and name. 
>
>
> -- 
> Kai Stian Olstad 
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ae6568a4-5f25-4f7a-b213-ba5ced1ac194%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to