Very basic --diff option for showing what happens when templates change.

Probably output is not useful if not used with --limit

Works well with --check mode
This commit is contained in:
Michael DeHaan 2013-02-07 22:51:33 -05:00
commit a9162a86f2
8 changed files with 95 additions and 18 deletions

View file

@ -52,8 +52,15 @@ 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, subset_opts=True, check_opts=True)
parser = utils.base_parser(
constants=C,
usage=usage,
connect_opts=True,
runas_opts=True,
subset_opts=True,
check_opts=True,
diff_opts=True
)
parser.add_option('-e', '--extra-vars', dest="extra_vars", default=None,
help="set additional key=value variables from the CLI")
parser.add_option('-t', '--tags', dest='tags', default='all',
@ -122,7 +129,8 @@ def main(args):
extra_vars=extra_vars,
private_key_file=options.private_key_file,
only_tags=only_tags,
check=options.check
check=options.check,
diff=options.diff
)
if options.listhosts: