This seems to still be broken all these years later. I'm hitting the exact 
same issue with "crypto map". Is there a workaround?

ansible --version
ansible [core 2.15.4]
  config file = /home/plrub160/git/isp_link_change/ansible.cfg
  configured module search path = 
['/home/plrub160/.ansible/plugins/modules', 
'/usr/share/ansible/plugins/modules']
  ansible python module location = 
/home/plrub160/VENV/ISP-LINK-CHANGE/lib/python3.11/site-packages/ansible
  ansible collection location = 
/home/plrub160/git/isp_link_change/collections
  executable location = /home/plrub160/VENV/ISP-LINK-CHANGE/bin/ansible
  python version = 3.11.4 (main, Jul  5 2023, 14:15:25) [GCC 11.2.0] 
(/home/plrub160/VENV/ISP-LINK-CHANGE/bin/python)
  jinja version = 3.1.2
  libyaml = True

On Monday, June 5, 2017 at 6:37:30 PM UTC-4 Ian Zhang wrote:

> Is there any update for this issue? i got similar thing need deal but not 
> knowing how to...
> Thanks in advance for any instructions. 
>
> Thanks
> -Ian
>
>
> On Friday, March 25, 2016 at 7:41:29 AM UTC-7, Uroš Bajželj wrote:
>>
>> Hello
>>
>> I am using ios_config module to configure crypto map on the router.
>>
>> When you configure the empty crypto map statement the router display the 
>> following note:
>>
>> HQ(config)#crypto map CMAP 10 ipsec-isakmp 
>>
>> % NOTE: This new crypto map will remain disabled until a peer
>>
>> and a valid access list have been configured.
>>
>>
>> The problem here is that this error fails the task and ansible does not 
>> execute all commands in list. Is there anyway to tell the ansible to ignore 
>> this message?
>>
>>
>> This is my task:
>>
>>
>>     - name: Configure crypto map
>>
>>       ios_config:
>>
>>         host: "{{ ansible_ssh_host }}"
>>
>>         username: "{{ username }}"
>>
>>         password: "{{ password }}"
>>
>>         lines:
>>
>>           - match address GRE-IPSEC
>>
>>         parents: ['crypto map CMAP {{ item.0 + 1 }} ipsec-isakmp']
>>
>>         before: ['no crypto map CMAP {{ item.0 + 1 }} ipsec-isakmp']
>>
>>         match: strict
>>
>>       with_indexed_items: '{{ groups.remote }}'
>>
>>       when: "inventory_hostname in groups.hq"
>>
>>
>> I also tried to add "ignore_errors: yes". But still it does not execute 
>> all commands in the lines.
>>
>>
>> I was reading about failed_when attribute but I was not able to implement 
>> this in the correct way.
>>
>> (failed_when: "'FAILED' in command_result.msg)
>>
>>
>> Any ideas?
>>
>>
>> BR,
>>
>>
>> Uros
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a17b7206-1982-4f00-92e0-458cc49c21dbn%40googlegroups.com.

Reply via email to