Could you please let me know what’s missing in my code?
Requirement: Need to change Domain search order in my ifcfg-eth0 file across multiple servers.
Desired state is just to update the search order one time and don’t change if user executes same playbook multiple times, do let me know if you have any questions.
If the regexp is set to ‘^DOMAIN=’? then its syntax error and I cannot execute the playbook, if its set to ‘^DOMAIN=?’ then its adding appending a line at the end instead of replacing.