Hi,
I am using ansible 2.1.0.0
Module using: ios_config 

It seems that replace: block is not working.
Whenever changing one of my ntp_server ip addresses, only this ntp server 
is configured on my device.
All other NTS servers are deleted in config. 
For me it looks like, "replace block" is ignored.

variable: 


ntp_server_1: 78.46.40.125
ntp_server_2: 86.59.113.113
ntp_server_3: 93.185.134.30


playbook: 
- name: enable NTP
  ios_config:
    host: "{{ inventory_hostname }}"
    username: cisco
    password: cisco
    lines:
      - ntp server {{ntp_server_1}}
      - ntp server {{ntp_server_2}}
      - ntp server {{ntp_server_3}}
    replace: block
    before: ['no ntp']
    match: line

Best regards
Markus

-- 
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/cd361ca5-a345-4787-ba14-4120ecff90a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to