I'm pretty new to Ansible, but I'm diving in.
My problem is that I need a playbook entry that will set a config value to
a certain value if it's different and return "ok" instead of "changed" if
it's already set.
This example always reports "changed":
- name: set apache ExtendedStatus
lineinfile: dest=/etc/httpd/conf/httpd.conf
regexp=^.ExtendedStatus.Off line="ExtendedStatus On"
register: apache_server_extended_status
I've tried using backrefs, but it seems to duplicate the line at the end
under certain circumstances.
This example always seem to duplicate the line at the bottom of the file:
- name: configure webmin listening port
lineinfile: dest=/etc/webmin/miniserv.conf regexp=^listen=(?!10000).+
line=listen=10000 backrefs=yes
register: webmin_listening_port
Can someone give me some advice on what I'm doing wrong?
Doug
--
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/b2e70fcf-82f5-4055-b8bf-fd5aee5c549e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.