From 1bbe06f92eabbbb5c7148293474dfa133a4f3926 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Sun, 3 Feb 2013 19:46:25 -0500 Subject: [PATCH] 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. --- copy | 2 +- file | 3 ++- ping | 3 ++- setup | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/copy b/copy index 3ba1de781ec..aa5954ddb9d 100644 --- a/copy +++ b/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']) diff --git a/file b/file index 4678edd6658..7b1ac0b8835 100644 --- a/file +++ b/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 diff --git a/ping b/ping index ba697920cf9..e52da3c9e94 100644 --- a/ping +++ b/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') diff --git a/setup b/setup index f4fa950e3ee..fee11af9df8 100644 --- a/setup +++ b/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)