I feel like I'm missing something obvious here:

- name: PostgreSQL install prep 1
    lineinfile: dest=/etc/yum.repos.d/CentOS-Base.repo 
insertbefore='{{item}}' line='exclude=postgresql*' state=present
    with_items:
      - '^#additional packages that may be useful'
      - '^#released updates'

*This only executes a change for the first item*.  After much tinkering, 
I've found that the same line cannot be inserted twice even thought the 
"insertbefore" parameter is different in each instance.  I just get an OK 
for the second item without a change being made.

I've found that I can replace the two items with the line if I include a 
regex set equal to the items, but I don't want to do this. I want to insert 
the same line (exclude=postgresql*) before each item.

What am I doing wrong?

-- 
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/adfbfb57-7c0f-4921-988e-e0edd25f0aad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to