mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-03 23:14:02 -07:00
Since host variables are becoming important, it did not make sense to sustain --override-hosts, with the ability
to create hosts that didn't have inventory information, but also existed, in various groups.
This commit is contained in:
parent
036b779188
commit
07508ad535
4 changed files with 37 additions and 49 deletions
|
@ -33,8 +33,6 @@ def main(args):
|
|||
# create parser for CLI options
|
||||
usage = "%prog playbook.yml"
|
||||
parser = utils.base_parser(constants=C, usage=usage, connect_opts=True, runas_opts=True)
|
||||
parser.add_option('-O', '--override-hosts', dest="override_hosts", default=None,
|
||||
help="run playbook against these hosts regardless of inventory settings")
|
||||
parser.add_option('-e', '--extra-vars', dest="extra_vars", default=None,
|
||||
help="set additional key=value variables from the CLI")
|
||||
|
||||
|
@ -54,9 +52,6 @@ def main(args):
|
|||
if options.sudo_user:
|
||||
options.sudo = True
|
||||
options.sudo_user = options.sudo_user or C.DEFAULT_SUDO_USER
|
||||
override_hosts = None
|
||||
if options.override_hosts:
|
||||
override_hosts = options.override_hosts.split(",")
|
||||
extra_vars = utils.parse_kv(options.extra_vars)
|
||||
|
||||
# run all playbooks specified on the command line
|
||||
|
@ -70,7 +65,6 @@ def main(args):
|
|||
playbook=playbook,
|
||||
module_path=options.module_path,
|
||||
host_list=options.inventory,
|
||||
override_hosts=override_hosts,
|
||||
forks=options.forks,
|
||||
debug=options.debug,
|
||||
remote_user=options.remote_user,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue