This implements a basic --check mode which for now is only implemented on template & copy operations. More detail will be shared with the list

shortly.
This commit is contained in:
Michael DeHaan 2013-02-03 19:46:25 -05:00
commit fed82c2188
21 changed files with 125 additions and 24 deletions

View file

@ -46,7 +46,7 @@ class Cli(object):
''' create an options parser for bin/ansible '''
parser = utils.base_parser(constants=C, runas_opts=True, subset_opts=True, async_opts=True,
output_opts=True, connect_opts=True, usage='%prog <host-pattern> [options]')
output_opts=True, connect_opts=True, check_opts=True, usage='%prog <host-pattern> [options]')
parser.add_option('-a', '--args', dest='module_args',
help="module arguments", default=C.DEFAULT_MODULE_ARGS)
parser.add_option('-m', '--module-name', dest='module_name',
@ -109,7 +109,8 @@ class Cli(object):
pattern=pattern,
callbacks=self.callbacks, sudo=options.sudo,
sudo_pass=sudopass,sudo_user=options.sudo_user,
transport=options.connection, subset=options.subset
transport=options.connection, subset=options.subset,
check=options.check
)
if options.seconds: