Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

purefa_phonehome: implement check mode support #57585

Open
wants to merge 1 commit into
base: devel
from
Open
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

purefa_phonehome: implement check mode support

  • Loading branch information...
resmo committed Jun 9, 2019
commit 830c31cb9cc93a618a9c89d39093a15d9eadec7c
@@ -56,7 +56,8 @@ def enable_ph(module, array):
changed = False
if array.get_phonehome()['phonehome'] != 'enabled':
try:
array.enable_phonehome()
if not module.check_mode:
array.enable_phonehome()
changed = True
except Exception:
module.fail_json(msg='Enabling Phonehome failed')
@@ -68,7 +69,8 @@ def disable_ph(module, array):
changed = False
if array.get_phonehome()['phonehome'] == 'enabled':
try:
array.disable_phonehome()
if not module.check_mode:
array.disable_phonehome()
changed = True
except Exception:
module.fail_json(msg='Disabling Remote Assist failed')
@@ -82,7 +84,7 @@ def main():
))

module = AnsibleModule(argument_spec,
supports_check_mode=False)
supports_check_mode=True)

array = get_system(module)

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.