mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Update various modules for check_mode
This updates the following modules to support check_mode: * apt_key * apt_repository * easy_install * pip - will always report changed due to the way it handles state * seboolean * selinux * slurp - since nothing changes, it just adds that it supports check_mode * subversion - reports changed when checking out new repo and when updating. * supervisorctl * svr4pkg See issue #2114.
This commit is contained in:
@@ -160,7 +160,8 @@ def main():
|
||||
name=dict(required=True),
|
||||
persistent=dict(default='no', type='bool'),
|
||||
state=dict(required=True, type='bool')
|
||||
)
|
||||
),
|
||||
supports_check_mode=True
|
||||
)
|
||||
|
||||
if not HAVE_SELINUX:
|
||||
@@ -188,6 +189,8 @@ def main():
|
||||
result['changed'] = False
|
||||
module.exit_json(**result)
|
||||
|
||||
if module.check_mode:
|
||||
module.exit_json(changed=True)
|
||||
if persistent:
|
||||
r = semanage_boolean_value(module, name, state)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user