Pull a playbook from a VCS, specify hosts file and execute a specific playbook

ansible-pull

  • Pull ansible playbooks from a VCS repo and executes them for the local host.
    More information: <https://docs.ansible.com/ansible/latest/cli/ansible-pull.html>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

ansible-pull -U {{repository_url}} -i {{hosts_file}} {{playbook}}

click the source code to copy install ansible-pull on any operating system with command-not-found.com