added diff as new keyword (#28581)

added diff to fake options in ec2_vpc_nat_gateway test
pull/28601/head
Brian Coca 7 years ago committed by Dag Wieers
parent 46cd8ba7cd
commit 725d4d4bc8

@ -164,6 +164,7 @@ class Base(with_metaclass(BaseMeta, object)):
_run_once = FieldAttribute(isa='bool') _run_once = FieldAttribute(isa='bool')
_ignore_errors = FieldAttribute(isa='bool') _ignore_errors = FieldAttribute(isa='bool')
_check_mode = FieldAttribute(isa='bool') _check_mode = FieldAttribute(isa='bool')
_diff = FieldAttribute(isa='bool')
_any_errors_fatal = FieldAttribute(isa='bool', default=C.ANY_ERRORS_FATAL, always_post_validate=True) _any_errors_fatal = FieldAttribute(isa='bool', default=C.ANY_ERRORS_FATAL, always_post_validate=True)
# param names which have been deprecated/removed # param names which have been deprecated/removed

@ -242,11 +242,9 @@ class PlayContext(Base):
_verbosity = FieldAttribute(isa='int', default=0) _verbosity = FieldAttribute(isa='int', default=0)
_only_tags = FieldAttribute(isa='set', default=set()) _only_tags = FieldAttribute(isa='set', default=set())
_skip_tags = FieldAttribute(isa='set', default=set()) _skip_tags = FieldAttribute(isa='set', default=set())
_check_mode = FieldAttribute(isa='bool', default=False)
_force_handlers = FieldAttribute(isa='bool', default=False) _force_handlers = FieldAttribute(isa='bool', default=False)
_start_at_task = FieldAttribute(isa='string') _start_at_task = FieldAttribute(isa='string')
_step = FieldAttribute(isa='bool', default=False) _step = FieldAttribute(isa='bool', default=False)
_diff = FieldAttribute(isa='bool')
# Fact gathering settings # Fact gathering settings
_gather_subset = FieldAttribute(isa='string', default=C.DEFAULT_GATHER_SUBSET) _gather_subset = FieldAttribute(isa='string', default=C.DEFAULT_GATHER_SUBSET)
@ -336,6 +334,7 @@ class PlayContext(Base):
self.become_user = options.become_user self.become_user = options.become_user
self.check_mode = boolean(options.check, strict=False) self.check_mode = boolean(options.check, strict=False)
self.diff = boolean(options.diff, strict=False)
# general flags (should we move out?) # general flags (should we move out?)
# for flag in ('connection', 'remote_user', 'private_key_file', 'verbosity', 'force_handlers', 'step', 'start_at_task', 'diff'): # for flag in ('connection', 'remote_user', 'private_key_file', 'verbosity', 'force_handlers', 'step', 'start_at_task', 'diff'):
@ -511,6 +510,9 @@ class PlayContext(Base):
if task.check_mode is not None: if task.check_mode is not None:
new_info.check_mode = task.check_mode new_info.check_mode = task.check_mode
if task.diff is not None:
new_info.diff = task.diff
return new_info return new_info
def make_become_cmd(self, cmd, executable=None): def make_become_cmd(self, cmd, executable=None):

@ -20,7 +20,7 @@ Options = (
'connection', 'module_path', 'forks', 'become', 'become_method', 'connection', 'module_path', 'forks', 'become', 'become_method',
'become_user', 'remote_user', 'private_key_file', 'ssh_common_args', 'become_user', 'remote_user', 'private_key_file', 'ssh_common_args',
'sftp_extra_args', 'scp_extra_args', 'ssh_extra_args', 'verbosity', 'sftp_extra_args', 'scp_extra_args', 'ssh_extra_args', 'verbosity',
'check' 'check', 'diff'
] ]
) )
) )
@ -34,7 +34,7 @@ options = (
forks=1, become=None, become_method=None, become_user=None, check=True, forks=1, become=None, become_method=None, become_user=None, check=True,
remote_user=None, private_key_file=None, ssh_common_args=None, remote_user=None, private_key_file=None, ssh_common_args=None,
sftp_extra_args=None, scp_extra_args=None, ssh_extra_args=None, sftp_extra_args=None, scp_extra_args=None, ssh_extra_args=None,
verbosity=3 verbosity=3, diff=False
) )
) )
passwords = dict(vault_pass='') passwords = dict(vault_pass='')

Loading…
Cancel
Save