I have been trying to create a playbook to modify system config files–in this case, postifx configs–and, to restart the postfix service when done. While I’ve gotten the script to run without errors (I think), despit the ansible output suggesting everything was done successfully, nothing actually happened on the remote system
After poking around, I discovered that I had a .ansible dir in my home dir, and exploring there I realised that my script was writing the changes I asked for to a directory path under my home dir.
When I compared that odd directory path to my YAML code, I found this:
- name: Limit inet_protocol in postfix/main.cf to IPv4 onlylineinfile:dest: dest=/etc/postfix/main.cf`
`
I had converted a one-line lineinfile syntax to multi-line, and I didn’t notice I forgot to remove the “dest=” after I added the “dest:”.
Well, if it helps anyone in debug code who may not already know: there’s a hidden .ansible dir in the user home dir to look at on the remote host.