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.
reviewable/pr18780/r1
Michael DeHaan 12 years ago
parent 25aff521c6
commit 1bbe06f92e

@ -69,7 +69,7 @@ def main():
dest=dict(required=True), dest=dict(required=True),
backup=dict(default=False, choices=BOOLEANS), backup=dict(default=False, choices=BOOLEANS),
), ),
add_file_common_args=True add_file_common_args=True,
) )
src = os.path.expanduser(module.params['src']) src = os.path.expanduser(module.params['src'])

@ -134,7 +134,8 @@ def main():
state = dict(choices=['file','directory','link','absent'], default='file'), state = dict(choices=['file','directory','link','absent'], default='file'),
path = dict(aliases=['dest', 'name'], required=True), path = dict(aliases=['dest', 'name'], required=True),
), ),
add_file_common_args=True add_file_common_args=True,
supports_check_mode=True
) )
params = module.params params = module.params

@ -36,7 +36,8 @@ author: Michael DeHaan
def main(): def main():
module = AnsibleModule( module = AnsibleModule(
argument_spec = dict() argument_spec = dict(),
supports_check_mode = True
) )
module.exit_json(ping='pong') module.exit_json(ping='pong')

@ -914,7 +914,8 @@ def run_setup(module):
def main(): def main():
global module global module
module = AnsibleModule( module = AnsibleModule(
argument_spec = dict() argument_spec = dict(),
supports_check_mode = True,
) )
data = run_setup(module) data = run_setup(module)
module.exit_json(**data) module.exit_json(**data)

Loading…
Cancel
Save