ansible-pull
pulls playbooks from a VCS repo and executes them for the local host
Synopsis
- ansible-pull -U <repository> [options] [<playbook.yml>]
Description
is used to up a remote copy of ansible on each managed node,each set to run via cron and update playbook source via a source repository.This inverts the default push architecture of ansible into a pull architecture,which has near-limitless scaling potential.
The setup playbook can be tuned to change the cron frequency, logging locations, and parameters to ansible-pull.This is useful both for extreme scale-out as well as periodic remediation.Usage of the ‘fetch’ module to retrieve logs from ansible-pull runs would be anexcellent way to gather and analyze remote logs from ansible-pull.
Common Options
—diff
- when changing (small) files and templates, show the differences in those files; works great with –check
—ssh-common-args
<SSH_COMMON_ARGS>
- specify common arguments to pass to sftp/scp/ssh (e.g. ProxyCommand)
—track-subs
- submodules will track the latest changes. This is equivalent to specifying the –remote flag to git submodule update
—verify-commit
- verify GPG signature of checked out commit, if it fails abort running the playbook. This needs the corresponding VCS module to support such an operation
-C
<CHECKOUT>
,
—checkout
<CHECKOUT>
- branch/tag/commit to checkout. Defaults to behavior of repository module.
-M
,
—module-path
- prepend colon-separated path(s) to module library (default=[‘/home/jenkins/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’])
-i
,
—inventory
,
—inventory-file
- specify inventory host path or comma separated host list. –inventory-file is deprecated
-m
<MODULE_NAME>
,
—module-name
<MODULE_NAME>
- Repository module name, which ansible will use to check out the repo. Choices are (‘git’, ‘subversion’, ‘hg’, ‘bzr’). Default is git.
-s
<SLEEP>
,
—sleep
<SLEEP>
- sleep for random interval (between 0 and n number of seconds) before starting. This is a useful way to disperse git requests
Environment
The following environment variables may be specified.
ANSIBLE_CONFIG
– Override the default ansible config file
Many more are available for most options in ansible.cfg
Files
/etc/ansible/ansible.cfg
– Config file, used if present
~/.ansible.cfg
– User config file, overrides the default config if present
Author
Ansible was originally written by Michael DeHaan.
See the AUTHORS file for a complete list of contributors.
Copyright
Copyright © 2017 Red Hat, Inc | Ansible.
Ansible is released under the terms of the GPLv3 License.
See also
ansible(1), ansible-config(1), ansible-console(1), ansible-doc(1), ansible-galaxy(1), ansible-inventory(1), ansible-playbook(1), ansible-pull(1), ansible-vault(1),