we have trouble at times to access a git repository with config files directly from an ansible host.
As workaround we get_url the file to the ansible controler (delegate_to: localhost) and then copy it to the remote target in a second TASK.
There has been some hassle with git tracking those temporary files and we want to gitignore them in the future. Is there any common procedure or best practice for such a scenario?
The first idea we came up with was to add a .temp directory inside the ansible folder and gitignore it’s contents.