mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
added diff as new keyword (#28581)
added diff to fake options in ec2_vpc_nat_gateway test
This commit is contained in:
@@ -164,6 +164,7 @@ class Base(with_metaclass(BaseMeta, object)):
|
||||
_run_once = FieldAttribute(isa='bool')
|
||||
_ignore_errors = 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)
|
||||
|
||||
# param names which have been deprecated/removed
|
||||
|
||||
@@ -242,11 +242,9 @@ class PlayContext(Base):
|
||||
_verbosity = FieldAttribute(isa='int', default=0)
|
||||
_only_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)
|
||||
_start_at_task = FieldAttribute(isa='string')
|
||||
_step = FieldAttribute(isa='bool', default=False)
|
||||
_diff = FieldAttribute(isa='bool')
|
||||
|
||||
# Fact gathering settings
|
||||
_gather_subset = FieldAttribute(isa='string', default=C.DEFAULT_GATHER_SUBSET)
|
||||
@@ -336,6 +334,7 @@ class PlayContext(Base):
|
||||
self.become_user = options.become_user
|
||||
|
||||
self.check_mode = boolean(options.check, strict=False)
|
||||
self.diff = boolean(options.diff, strict=False)
|
||||
|
||||
# general flags (should we move out?)
|
||||
# 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:
|
||||
new_info.check_mode = task.check_mode
|
||||
|
||||
if task.diff is not None:
|
||||
new_info.diff = task.diff
|
||||
|
||||
return new_info
|
||||
|
||||
def make_become_cmd(self, cmd, executable=None):
|
||||
|
||||
Reference in New Issue
Block a user