ansible/ansible — pull request #1039 by copperlight (2012-09-12 21:28:20+00:00)
Title: add parameter to specify playbook; improve option parsing

This branch adds a "-P, --playbook" parameter to ansible-pull, which makes it easier to specify a custom playbook that should run on a pull-based node. The new parameter is optional, and the top-level local.yml file is still the default. This concept behind adding this parameter is intended to help with scale-out so that you can have many nodes that each run against their own custom playbook, so that you can have distinctions between web servers and database servers, for example.

Within a playbook repo, a new directory structure houses the custom playbooks, per node:

nodes/${ansible_fqdn}.yml

ansible-pull is called against it from a cronjob, running every 30m:

ansible-pull -d /var/lib/ansible -U https://:github.com//.git

ansible-pull will now spit out a starting date and time "ansible-pull_started:", to help with reading the log file output over time.

Example playbook updates to support this updated ansible-pull are bundled into a separate pull request.