ansible-pull
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.
- adds the hostkey for the repo url if not already added
—ask-sudo-pass
- ask for sudo password (deprecated, use become)
—check
- don’t make any changes; instead, try to predict some of the changes that may occur
—diff
- when changing (small) files and templates, show the differences in those files; works great with –check
—list-hosts
- outputs a list of matching hosts; does not execute anything else
- purge checkout after playbook run
—scp-extra-args
<SCP_EXTRA_ARGS>
- specify extra arguments to pass to scp only (e.g. -l)
—skip-tags
- only run plays and tasks whose tags do not match these values
—ssh-common-args
<SSH_COMMON_ARGS>
- specify common arguments to pass to sftp/scp/ssh (e.g. ProxyCommand)
—ssh-extra-args
<SSH_EXTRA_ARGS>
- specify extra arguments to pass to ssh only (e.g. -R)
—track-subs
- submodules will track the latest changes. This is equivalent to specifying the –remote flag to git submodule update
—vault-id
- the vault identity to use
—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>
- 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’])
-U
<URL>
,
—url
<URL>
- URL of the playbook repository
-d
<DEST>
,
—directory
<DEST>
- directory to checkout repository to
-f
,
—force
- run the playbook even if the repository could not be updated
-i
,
—inventory
,
—inventory-file
- specify inventory host path or comma separated host list. –inventory-file is deprecated
-l
<SUBSET>
,
—limit
<SUBSET>
- further limit selected hosts to an additional pattern
-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.
-o
,
—only-if-changed
- only run the playbook if the repository has been updated
-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
-t
,
—tags
- only run plays and tasks tagged with these values
- verbose mode (-vvv for more, -vvvv to enable connection debugging)
Environment
The following environment variables may be specified.
Many more are available for most options in ansible.cfg
– Config file, used if present
~/.ansible.cfg
– User config file, overrides the default config if present
Author
See the AUTHORS file for a complete list of contributors.
Copyright © 2017 Red Hat, Inc | Ansible.
Ansible is released under the terms of the GPLv3 License.