diff options
author | Ingmar Hupp <commits@sdfjkl.org> | 2014-02-05 18:53:37 +0000 |
---|---|---|
committer | Ingmar Hupp <commits@sdfjkl.org> | 2014-02-05 18:53:37 +0000 |
commit | 1f0cdc5ec81dd205d6582310f3303f1eb8624e26 (patch) | |
tree | 31ba8a61185b5ccaf15b229621d3e577bf83b55e /bin/ansible-pull | |
parent | 77d5a1839250956ba6b3c2b69946d1867773de10 (diff) | |
download | ansible-1f0cdc5ec81dd205d6582310f3303f1eb8624e26.tar.gz |
ansible-pull support for -e (--extra-vars) option (same as ansible-playbook) #5707
Diffstat (limited to 'bin/ansible-pull')
-rwxr-xr-x | bin/ansible-pull | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/ansible-pull b/bin/ansible-pull index 3253ced80c..65bb894833 100755 --- a/bin/ansible-pull +++ b/bin/ansible-pull @@ -116,6 +116,8 @@ def main(args): 'Defaults to behavior of repository module.') parser.add_option('-i', '--inventory-file', dest='inventory', help="location of the inventory host file") + parser.add_option('-e', '--extra-vars', dest="extra_vars", action="append", + help="set additional variables as key=value or YAML/JSON", default=[]) parser.add_option('-v', '--verbose', default=False, action="callback", callback=increment_debug, help='Pass -vvvv to ansible-playbook') @@ -180,6 +182,8 @@ def main(args): cmd = 'ansible-playbook %s %s' % (base_opts, playbook) if options.inventory: cmd += ' -i "%s"' % options.inventory + for ev in options.extra_vars: + cmd += ' -e "%s"' % ev os.chdir(options.dest) # RUN THE PLAYBOOK COMMAND |