mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #9534 from mmicael1/devel
Add tags options [to ansible pull - ed]
This commit is contained in:
commit
8250dba0f1
1 changed files with 4 additions and 0 deletions
|
@ -135,6 +135,8 @@ def main(args):
|
||||||
help="vault password file")
|
help="vault password file")
|
||||||
parser.add_option('-K', '--ask-sudo-pass', default=False, dest='ask_sudo_pass', action='store_true',
|
parser.add_option('-K', '--ask-sudo-pass', default=False, dest='ask_sudo_pass', action='store_true',
|
||||||
help='ask for sudo password')
|
help='ask for sudo password')
|
||||||
|
parser.add_option('-t', '--tags', dest='tags', default=False,
|
||||||
|
help='only run plays and tasks tagged with these values')
|
||||||
options, args = parser.parse_args(args)
|
options, args = parser.parse_args(args)
|
||||||
|
|
||||||
hostname = socket.getfqdn()
|
hostname = socket.getfqdn()
|
||||||
|
@ -214,6 +216,8 @@ def main(args):
|
||||||
cmd += ' -e "%s"' % ev
|
cmd += ' -e "%s"' % ev
|
||||||
if options.ask_sudo_pass:
|
if options.ask_sudo_pass:
|
||||||
cmd += ' -K'
|
cmd += ' -K'
|
||||||
|
if options.tags:
|
||||||
|
cmd += ' -t "%s"' % options.tags
|
||||||
os.chdir(options.dest)
|
os.chdir(options.dest)
|
||||||
|
|
||||||
# RUN THE PLAYBOOK COMMAND
|
# RUN THE PLAYBOOK COMMAND
|
||||||
|
|
Loading…
Reference in a new issue