mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Added usage info to bin/ansible-playbook, now shows options on bare command line. NOTE: bin/ansible outputs usage to stdout, bin/ansible-playbook to stderr. Should they be consistent?
This commit is contained in:
parent
74b26da9ac
commit
5a4d4bc051
1 changed files with 4 additions and 2 deletions
|
@ -32,7 +32,7 @@ def main(args):
|
|||
''' run ansible-playbook operations '''
|
||||
|
||||
# create parser for CLI options
|
||||
usage = "%prog playbook.yml [options]"
|
||||
usage = "%prog <playbook-file1 [playbook-file2...]> [options]"
|
||||
options = {
|
||||
'-e' : dict(long='--extra-vars', dest='extra_vars',
|
||||
help='pass in extra key=value variables from outside the playbook'),
|
||||
|
@ -43,7 +43,9 @@ def main(args):
|
|||
options, args = parser.parse_args(args)
|
||||
|
||||
if len(args) == 0:
|
||||
print >> sys.stderr, "playbook path is a required argument"
|
||||
parser.print_help(file=sys.stderr)
|
||||
#QUESTION for M.D. This would match bin/ansible's behavior. Do we want them consistent?
|
||||
#parser.print_help()
|
||||
return 1
|
||||
|
||||
sshpass = None
|
||||
|
|
Loading…
Reference in a new issue