Hi,
I tried to insert flowing block, but the last </Location> was never
inserted because that line has already existed for other block in the
config file. How can I make it work?
- name: "add test block"
lineinfile: insertafter="{{ item.after }}" line="{{ item.line }}"
dest=/etc/apache2/sites-available/default-ssl.conf state=present
with_items:
- { after: 'EOF', line: '<Location /test>' }
- { after: '^<Location /test>', line: 'ProxyPass
ajp://localhost:9000/api' }
- { after: '^ProxyPass ajp://localhost:9000/api', line: '</Location>' }
sudo: true
Thank you.
- j
--
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/eea5e40a-9788-45a0-b82d-8dcd012954fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.