linux_wiki:ansible-pull

This is an old revision of the document!


Ansible-Pull

General Information

The command ansible-pull, inverts the way that ansible works. Instead of sending commands from a central location, a client can pull down a playbook from a version controlled repository and run it locally.

Checklist

  • A software repo setup that can be reached by the client system (such as git or svn)

Pre-Req: The VCS Repo

You will need access to a software repo in order to commit/push your ansible-pull playbook into.

This repo will be used by the clients to pull from.

The repo visibility (public/private) doesn't matter, as long as there is a way for the client to access it over https or ssh.


Playbook: About

The ansible-pull playbook file will be the only part that looks different than a normal playbook/role setup.

The entire role directory structure/files can remain the same as if it were being deployed via normal ansible-playbook commands.

Example of a playbook tailored for pulling.

 

Example of a role that can be used with either a pull playbook or normal playbook.

 

The Client: Putting It All Together


  • linux_wiki/ansible-pull.1532143860.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)