Hi,
I am looking for a task to find and replace a couple of items from a
template and save it at a new destination. I am not sure how to achieve
that. This is what I tried and it will only replace the contents of the
template and save the same file, which is not serving the purpose. How can
I do this?
- name: Prepare common_vars.sh
replace:
path: "templates/common_vars.sh"
regexp: "{{ item.regexp1 }}"
replace: "{{ item.replace }}"
with_items:
- { regexp1: 'XX', replace: '{{ cust }}'}
- { regexp1: 'xx', replace: '{{ low_cust }}'}
delegate_to: localhost
--
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/82c171bb-28ec-4149-8a27-d931adf88256n%40googlegroups.com.