Module alternatives: support check mode
This commit is contained in:
parent
d2d0ed2259
commit
b645dd330c
1 changed files with 4 additions and 1 deletions
|
@ -62,7 +62,8 @@ def main():
|
||||||
name = dict(required=True),
|
name = dict(required=True),
|
||||||
path = dict(required=True),
|
path = dict(required=True),
|
||||||
link = dict(required=False),
|
link = dict(required=False),
|
||||||
)
|
),
|
||||||
|
supports_check_mode=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
params = module.params
|
params = module.params
|
||||||
|
@ -114,6 +115,8 @@ def main():
|
||||||
link = value
|
link = value
|
||||||
|
|
||||||
if current_path != path:
|
if current_path != path:
|
||||||
|
if module.check_mode:
|
||||||
|
module.exit_json(changed=True, current_path=current_path)
|
||||||
try:
|
try:
|
||||||
# install the requested path if necessary
|
# install the requested path if necessary
|
||||||
if path not in all_alternatives:
|
if path not in all_alternatives:
|
||||||
|
|
Loading…
Reference in a new issue