Is lineinfile really  idempotent ?? I am using it to uncomment the 
logrorate option in logrotate.conf. Everytime I run the playbook. This play 
is being executed every single time and add the word compress at the bottom 
after every run. Am I doing something wrong ?? 

 - name: Enabling  the logrotate option for linux servers
   lineinfile: dest=/etc/logrotate.conf
                 backup=yes
                 regexp="^#compress"
                 line="compress"
                 create=yes
  when: ansible_distribution == "RedHat"


Thanks in Advance
 Sagar





-- 
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/884c1247-9e31-4d04-bd23-c264deefb40b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to