|
|
|
@ -56,6 +56,7 @@ def enable_ph(module, array):
|
|
|
|
changed = False
|
|
|
|
changed = False
|
|
|
|
if array.get_phonehome()['phonehome'] != 'enabled':
|
|
|
|
if array.get_phonehome()['phonehome'] != 'enabled':
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
|
|
|
|
if not module.check_mode:
|
|
|
|
array.enable_phonehome()
|
|
|
|
array.enable_phonehome()
|
|
|
|
changed = True
|
|
|
|
changed = True
|
|
|
|
except Exception:
|
|
|
|
except Exception:
|
|
|
|
@ -68,6 +69,7 @@ def disable_ph(module, array):
|
|
|
|
changed = False
|
|
|
|
changed = False
|
|
|
|
if array.get_phonehome()['phonehome'] == 'enabled':
|
|
|
|
if array.get_phonehome()['phonehome'] == 'enabled':
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
|
|
|
|
if not module.check_mode:
|
|
|
|
array.disable_phonehome()
|
|
|
|
array.disable_phonehome()
|
|
|
|
changed = True
|
|
|
|
changed = True
|
|
|
|
except Exception:
|
|
|
|
except Exception:
|
|
|
|
@ -82,7 +84,7 @@ def main():
|
|
|
|
))
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|
module = AnsibleModule(argument_spec,
|
|
|
|
module = AnsibleModule(argument_spec,
|
|
|
|
supports_check_mode=False)
|
|
|
|
supports_check_mode=True)
|
|
|
|
|
|
|
|
|
|
|
|
array = get_system(module)
|
|
|
|
array = get_system(module)
|
|
|
|
|
|
|
|
|
|
|
|
|