1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

corrected playbook path, reformated options help

the last just to make the help consistent and readable
This commit is contained in:
Brian Coca 2015-12-03 18:23:08 -08:00
parent 8f69ba0933
commit a1f516824e

View file

@ -74,8 +74,10 @@ class PullCLI(CLI):
help='sleep for random interval (between 0 and n number of seconds) before starting. This is a useful way to disperse git requests') help='sleep for random interval (between 0 and n number of seconds) before starting. This is a useful way to disperse git requests')
self.parser.add_option('-f', '--force', dest='force', default=False, action='store_true', self.parser.add_option('-f', '--force', dest='force', default=False, action='store_true',
help='run the playbook even if the repository could not be updated') help='run the playbook even if the repository could not be updated')
self.parser.add_option('-d', '--directory', dest='dest', default='~/.ansible/pull', help='directory to checkout repository to') self.parser.add_option('-d', '--directory', dest='dest', default='~/.ansible/pull',
self.parser.add_option('-U', '--url', dest='url', default=None, help='URL of the playbook repository') help='directory to checkout repository to')
self.parser.add_option('-U', '--url', dest='url', default=None,
help='URL of the playbook repository')
self.parser.add_option('-C', '--checkout', dest='checkout', self.parser.add_option('-C', '--checkout', dest='checkout',
help='branch/tag/commit to checkout. ' 'Defaults to behavior of repository module.') help='branch/tag/commit to checkout. ' 'Defaults to behavior of repository module.')
self.parser.add_option('--accept-host-key', default=False, dest='accept_host_key', action='store_true', self.parser.add_option('--accept-host-key', default=False, dest='accept_host_key', action='store_true',
@ -174,8 +176,7 @@ class PullCLI(CLI):
display.display("Repository has not changed, quitting.") display.display("Repository has not changed, quitting.")
return 0 return 0
playbook = self.select_playbook(path) playbook = self.select_playbook(self.options.dest)
if playbook is None: if playbook is None:
raise AnsibleOptionsError("Could not find a playbook to run.") raise AnsibleOptionsError("Could not find a playbook to run.")