Essentially, what is going on here is that the user account that ansible is running under is present on both the control node, and the target client.
However, on the target client, as part of the server remediation process, one of the steps is to change where the home directory of that account lives from /home/voltron/ to /opt/home/voltron/ (No, the account can't be created using that directory on server creation sadly.)
The problem in doing this with ansible is that it "loses access" to it's working tmp directory in ~/.ansible/tmp on the target client (in this case the server t-rex). This causes the playbook to fail out on any following play with the following error message:
fatal: [t-rex]: UNREACHABLE! => {"changed": false, "msg": "Authentication or permission failure. In some cases, you may have been able to authenticate and did not have permissions on the remote directory. Consider changing the remote temp path in ansible.cfg to a path rooted in \"/tmp\". Failed command was: ( umask 77 && mkdir -p \"` echo /home/volton/.ansible/tmp/ansible-tmp-1507231978.66-123682989430617 `\" && echo ansible-tmp-1507231978.66-123682989430617=\"` echo /home/volton/.ansible/tmp/ansible-tmp-1507231978.66-123682989430617 `\" ), exited with result 1", "unreachable": true}
Now, all I need to do is somehow tell ansible that it's working directory on the target client has changed locations during the playbook run by having it re-gather facts, but that does not seem to help. (At least the way I am doing it)
I have tried to immediately call the setup module in the play after the one that changes the location of the ansible account's (voltron) working temp directory, and it "seems" to run, but then when the next "import_playbook" statement is read, the failure described above occurs, a failure is given, and the entire thing blows up forcing me to potentially re-run a fairly long playbook. Obviously, this following run does work because ansible's facts now know that it's working directory has changed.
Anyone have any ideas on how I would inform ansible when it's working temp directory location changes? Let me know, thanks!