Queries regarding IOS_CONFIG module

21 views
Skip to first unread message

joharha...@gmail.com

unread,
Oct 12, 2017, 7:12:44 AM10/12/17
to Ansible Project
Hello 

I am aware of parents attribute while defining the configuration. I have queries

1. how to accomplish below scenario: 

archive
  log config
     logging ...
     logging size ..
  path bootflash:zxvf/cfg
  maximum 4
 

2.  It is possible to use same connection for multiple tasks.

Like :

- name: Configure X
      ios_config:
        lines:
             - version 12.2
        provider: "{{ user_credentials }}"

- name: Configure Y
      ios_config:
        lines:
             - login delay 50
        provider: "{{ user_credentials }}"

For above separate SSH connection.

3.  How to make configuration idempotent using 


Best Regards,

Harkanwal

Peter Sprygada

unread,
Oct 12, 2017, 7:39:00 AM10/12/17
to ansible...@googlegroups.com
Hi Harkanwal,

1. example below

ios_config:
  lines:
    - logging ...
    - logging size ..
  parents:
    - archive
    - log config

2. yes, it uses the same connection for multiple tasks by default

3. the configuration lines in ios_config must match the same as the running config, do not use shortened commands or abbreviations.

--
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+unsubscribe@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/c162dc08-c2e1-4df9-9c7d-007ae2b03cf6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Harkanwal Johar

unread,
Oct 12, 2017, 8:36:36 AM10/12/17
to ansible...@googlegroups.com
Thanks for reply .

Regarding first query.
There are more commands with same level as that of log config

"
path bootflash:zxvf/cfg
  maximum 4
"
How to incorporate these .



--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/aCnT0q18Tl4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-project+unsubscribe@googlegroups.com.

To post to this group, send email to ansible-project@googlegroups.com.

Peter Sprygada

unread,
Oct 12, 2017, 8:49:34 AM10/12/17
to ansible...@googlegroups.com
make another task entry in the playbook

ios_config:
  lines:
    - path bootflash:...
    - maximum 4
  parents:
    - archive


Reply all
Reply to author
Forward
0 new messages