|
|
|
@ -155,6 +155,11 @@ options:
|
|
|
|
|
choices:
|
|
|
|
|
- absent
|
|
|
|
|
- present
|
|
|
|
|
wait:
|
|
|
|
|
description:
|
|
|
|
|
- If the module should wait for the application to be created, deleted or updated.
|
|
|
|
|
type: bool
|
|
|
|
|
default: yes
|
|
|
|
|
extends_documentation_fragment: f5
|
|
|
|
|
author:
|
|
|
|
|
- Tim Rupp (@caphrim007)
|
|
|
|
@ -811,9 +816,10 @@ class ModuleManager(object):
|
|
|
|
|
if self.module.check_mode:
|
|
|
|
|
return True
|
|
|
|
|
self_link = self.remove_from_device()
|
|
|
|
|
self.wait_for_apply_template_task(self_link)
|
|
|
|
|
if self.exists():
|
|
|
|
|
raise F5ModuleError("Failed to delete the resource.")
|
|
|
|
|
if self.want.wait:
|
|
|
|
|
self.wait_for_apply_template_task(self_link)
|
|
|
|
|
if self.exists():
|
|
|
|
|
raise F5ModuleError("Failed to delete the resource.")
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def has_no_service_environment(self):
|
|
|
|
@ -848,11 +854,12 @@ class ModuleManager(object):
|
|
|
|
|
if self.module.check_mode:
|
|
|
|
|
return True
|
|
|
|
|
self_link = self.create_on_device()
|
|
|
|
|
self.wait_for_apply_template_task(self_link)
|
|
|
|
|
if not self.exists():
|
|
|
|
|
raise F5ModuleError(
|
|
|
|
|
"Failed to deploy application."
|
|
|
|
|
)
|
|
|
|
|
if self.want.wait:
|
|
|
|
|
self.wait_for_apply_template_task(self_link)
|
|
|
|
|
if not self.exists():
|
|
|
|
|
raise F5ModuleError(
|
|
|
|
|
"Failed to deploy application."
|
|
|
|
|
)
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def create_on_device(self):
|
|
|
|
@ -974,7 +981,8 @@ class ArgumentSpec(object):
|
|
|
|
|
)
|
|
|
|
|
),
|
|
|
|
|
add_analytics=dict(type='bool', default='no'),
|
|
|
|
|
domain_names=dict(type='list')
|
|
|
|
|
domain_names=dict(type='list'),
|
|
|
|
|
wait=dict(type='bool', default='yes')
|
|
|
|
|
)
|
|
|
|
|
self.argument_spec = {}
|
|
|
|
|
self.argument_spec.update(f5_argument_spec)
|
|
|
|
|