July 2017
Intermediate to advanced
402 pages
9h 38m
English
Since ansible-pull relies on Git to clone the repository and execute it locally, we don't need the execution to happen over SSH. Go to the root directory of your Ansible repository to create a new file.
The file should be called localhost and contain the following:
[localhost] localhost ansible_connection=local
Essentially, what we are doing is creating a static inventory and asking ansible to run commands in local (as opposed to using SSH) when the target host is localhost.
We can save the changes and commit the new file to GitHub:
$ git add localhost $ git commit -m "Adding localhost inventory" $ git push
Read now
Unlock full access