Skip to content

Commit

Permalink
Remove conflicting options, add missing options.
Browse files Browse the repository at this point in the history
For Ansible 1.9 compatibility.
  • Loading branch information
dochang committed Mar 29, 2015
1 parent bf36206 commit e54ded1
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lib/battleschool/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,13 @@ def main(args, battleschool_dir=None):
constants=AC,
usage=usage,
connect_opts=True,
runas_opts=False,
runas_opts=True,
subset_opts=True,
check_opts=True,
diff_opts=True,
output_opts=True
)
parser.version = "%s %s" % ("battleschool", __version__)
parser.add_option('-e', '--extra-vars', dest="extra_vars", default=None,
help="set additional key=value variables from the CLI")
# parser.add_option('--tags', dest='tags', default='all',
# help="only run plays and tasks tagged with these values")
parser.add_option('--syntax-check', dest='syntax', action='store_true',
Expand All @@ -101,13 +99,11 @@ def main(args, battleschool_dir=None):
help="do list all tasks that would be executed")
parser.add_option('--step', dest='step', action='store_true',
help="one-step-at-a-time: confirm each task before running")
parser.add_option("-s", "--sudo", default=AC.DEFAULT_SUDO, action="store_true",
dest='sudo', help="run operations with sudo (nopasswd)")
parser.add_option('--config-dir', dest='config_dir', default=None,
help="config directory for battleschool (default=%s)" % battleschool_dir)
parser.add_option('--config-file', dest='config_file', default=None,
help="config file for battleschool (default=%s/%s)" % (battleschool_dir, "config.yml"))
parser.add_option('-u', '--update-sources', dest='update_sources', default=False, action='store_true',
parser.add_option('--update-sources', dest='update_sources', default=False, action='store_true',
help="update playbooks from sources(git, url, etc...)")
parser.add_option('--acquire-only', dest='acquire_only', default=False, action='store_true',
help="configure mac_pkg module to only aquire package (ie download only")
Expand All @@ -132,7 +128,7 @@ def main(args, battleschool_dir=None):
if not options.listhosts and not options.syntax and not options.listtasks:
options.ask_pass = AC.DEFAULT_ASK_PASS
options.ask_sudo_pass = options.ask_sudo_pass or AC.DEFAULT_ASK_SUDO_PASS
passwds = utils.ask_passwords(ask_pass=options.ask_pass, ask_sudo_pass=options.ask_sudo_pass)
passwds = utils.ask_passwords(ask_pass=options.ask_pass, become_ask_pass=options.ask_sudo_pass)
sshpass = passwds[0]
sudopass = passwds[1]
# if options.sudo_user or options.ask_sudo_pass:
Expand Down

0 comments on commit e54ded1

Please sign in to comment.