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:
parent
25aff521c6
commit
1bbe06f92e
4 changed files with 7 additions and 4 deletions
2
copy
2
copy
|
@ -69,7 +69,7 @@ def main():
|
|||
dest=dict(required=True),
|
||||
backup=dict(default=False, choices=BOOLEANS),
|
||||
),
|
||||
add_file_common_args=True
|
||||
add_file_common_args=True,
|
||||
)
|
||||
|
||||
src = os.path.expanduser(module.params['src'])
|
||||
|
|
3
file
3
file
|
@ -134,7 +134,8 @@ def main():
|
|||
state = dict(choices=['file','directory','link','absent'], default='file'),
|
||||
path = dict(aliases=['dest', 'name'], required=True),
|
||||
),
|
||||
add_file_common_args=True
|
||||
add_file_common_args=True,
|
||||
supports_check_mode=True
|
||||
)
|
||||
|
||||
params = module.params
|
||||
|
|
3
ping
3
ping
|
@ -36,7 +36,8 @@ author: Michael DeHaan
|
|||
|
||||
def main():
|
||||
module = AnsibleModule(
|
||||
argument_spec = dict()
|
||||
argument_spec = dict(),
|
||||
supports_check_mode = True
|
||||
)
|
||||
module.exit_json(ping='pong')
|
||||
|
||||
|
|
3
setup
3
setup
|
@ -914,7 +914,8 @@ def run_setup(module):
|
|||
def main():
|
||||
global module
|
||||
module = AnsibleModule(
|
||||
argument_spec = dict()
|
||||
argument_spec = dict(),
|
||||
supports_check_mode = True,
|
||||
)
|
||||
data = run_setup(module)
|
||||
module.exit_json(**data)
|
||||
|
|
Loading…
Reference in a new issue