1ANSIBLE-PULL(1) System administration commands ANSIBLE-PULL(1)
2
3
4
6 ansible-pull - pulls playbooks from a VCS repo and executes them for
7 the local host
8
10 ansible-pull -U <repository> [options] [<playbook.yml>]
11
13 is used to up a remote copy of ansible on each managed node, each set
14 to run via cron and update playbook source via a source repository.
15 This inverts the default push architecture of ansible into a pull
16 architecture, which has near-limitless scaling potential.
17
18 The setup playbook can be tuned to change the cron frequency, logging
19 locations, and parameters to ansible-pull. This is useful both for
20 extreme scale-out as well as periodic remediation. Usage of the
21 'fetch' module to retrieve logs from ansible-pull runs would be an
22 excellent way to gather and analyze remote logs from ansible-pull.
23
25 --accept-host-key
26 adds the hostkey for the repo url if not already added
27
28 --ask-vault-pass
29 ask for vault password
30
31 --check
32 don't make any changes; instead, try to predict some of the changes
33 that may occur
34
35 --clean
36 modified files in the working repository will be discarded
37
38 --diff
39 when changing (small) files and templates, show the differences in
40 those files; works great with --check
41
42 --full
43 Do a full clone, instead of a shallow one.
44
45 --list-hosts
46 outputs a list of matching hosts; does not execute anything else
47
48 --private-key, --key-file
49 use this file to authenticate the connection
50
51 --purge
52 purge checkout after playbook run
53
54 --scp-extra-args 'SCP_EXTRA_ARGS'
55 specify extra arguments to pass to scp only (e.g. -l)
56
57 --sftp-extra-args 'SFTP_EXTRA_ARGS'
58 specify extra arguments to pass to sftp only (e.g. -f, -l)
59
60 --skip-tags
61 only run plays and tasks whose tags do not match these values
62
63 --ssh-common-args 'SSH_COMMON_ARGS'
64 specify common arguments to pass to sftp/scp/ssh (e.g. ProxyCommand)
65
66 --ssh-extra-args 'SSH_EXTRA_ARGS'
67 specify extra arguments to pass to ssh only (e.g. -R)
68
69 --track-subs
70 submodules will track the latest changes. This is equivalent to
71 specifying the --remote flag to git submodule update
72
73 --vault-id
74 the vault identity to use
75
76 --vault-password-file
77 vault password file
78
79 --verify-commit
80 verify GPG signature of checked out commit, if it fails abort run‐
81 ning the playbook. This needs the corresponding VCS module to sup‐
82 port such an operation
83
84 --version
85 show program's version number, config file location, configured mod‐
86 ule search path, module location, executable location and exit
87
88 -C 'CHECKOUT', --checkout 'CHECKOUT'
89 branch/tag/commit to checkout. Defaults to behavior of repository
90 module.
91
92 -K, --ask-become-pass
93 ask for privilege escalation password
94
95 -M, --module-path
96 prepend colon-separated path(s) to module library (default=~/.ansi‐
97 ble/plugins/modules:/usr/share/ansible/plugins/modules)
98
99 -T 'TIMEOUT', --timeout 'TIMEOUT'
100 override the connection timeout in seconds (default=10)
101
102 -U 'URL', --url 'URL'
103 URL of the playbook repository
104
105 -c 'CONNECTION', --connection 'CONNECTION'
106 connection type to use (default=smart)
107
108 -d 'DEST', --directory 'DEST'
109 directory to checkout repository to
110
111 -e, --extra-vars
112 set additional variables as key=value or YAML/JSON, if filename
113 prepend with @
114
115 -f, --force
116 run the playbook even if the repository could not be updated
117
118 -h, --help
119 show this help message and exit
120
121 -i, --inventory, --inventory-file
122 specify inventory host path or comma separated host list. --inven‐
123 tory-file is deprecated
124
125 -k, --ask-pass
126 ask for connection password
127
128 -l 'SUBSET', --limit 'SUBSET'
129 further limit selected hosts to an additional pattern
130
131 -m 'MODULE_NAME', --module-name 'MODULE_NAME'
132 Repository module name, which ansible will use to check out the
133 repo. Choices are ('git', 'subversion', 'hg', 'bzr'). Default is
134 git.
135
136 -o, --only-if-changed
137 only run the playbook if the repository has been updated
138
139 -s 'SLEEP', --sleep 'SLEEP'
140 sleep for random interval (between 0 and n number of seconds) before
141 starting. This is a useful way to disperse git requests
142
143 -t, --tags
144 only run plays and tasks tagged with these values
145
146 -u 'REMOTE_USER', --user 'REMOTE_USER'
147 connect as this user (default=None)
148
149 -v, --verbose
150 verbose mode (-vvv for more, -vvvv to enable connection debugging)
151
153 The following environment variables may be specified.
154
155 ANSIBLE_CONFIG -- Specify override location for the ansible config file
156
157 Many more are available for most options in ansible.cfg
158
159 For a full list check https://docs.ansible.com/. or use the ansi‐
160 ble-config command.
161
163 /etc/ansible/ansible.cfg -- Config file, used if present
164
165 ~/.ansible.cfg -- User config file, overrides the default config if
166 present
167
168 ./ansible.cfg -- Local config file (in current working directory)
169 assumed to be 'project specific' and overrides the rest if present.
170
171 As mentioned above, the ANSIBLE_CONFIG environment variable will over‐
172 ride all others.
173
175 Ansible was originally written by Michael DeHaan.
176
178 Copyright © 2018 Red Hat, Inc | Ansible. Ansible is released under the
179 terms of the GPLv3 license.
180
182 ansible [22m(1), ansible-config (1), ansible-console (1), ansible-doc (1),
183 ansible-galaxy (1), ansible-inventory (1), ansible-playbook (1), ansi‐
184 ble-vault (1)
185
186 Extensive documentation is available in the documentation site: <‐
187 https://docs.ansible.com>. IRC and mailing list info can be found in
188 file CONTRIBUTING.md, available in: <‐
189 https://github.com/ansible/ansible>
190
191
192
193
194Ansible 2.8.1 ANSIBLE-PULL(1)