|
|
@ -57,6 +57,11 @@ options:
|
|
|
|
- Account the affinity group is related to.
|
|
|
|
- Account the affinity group is related to.
|
|
|
|
required: false
|
|
|
|
required: false
|
|
|
|
default: null
|
|
|
|
default: null
|
|
|
|
|
|
|
|
project:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Name of the project the affinity group is related to.
|
|
|
|
|
|
|
|
required: false
|
|
|
|
|
|
|
|
default: null
|
|
|
|
poll_async:
|
|
|
|
poll_async:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Poll async jobs until job has finished.
|
|
|
|
- Poll async jobs until job has finished.
|
|
|
@ -101,6 +106,21 @@ affinity_type:
|
|
|
|
returned: success
|
|
|
|
returned: success
|
|
|
|
type: string
|
|
|
|
type: string
|
|
|
|
sample: host anti-affinity
|
|
|
|
sample: host anti-affinity
|
|
|
|
|
|
|
|
project:
|
|
|
|
|
|
|
|
description: Name of project the affinity group is related to.
|
|
|
|
|
|
|
|
returned: success
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
sample: Production
|
|
|
|
|
|
|
|
domain:
|
|
|
|
|
|
|
|
description: Domain the affinity group is related to.
|
|
|
|
|
|
|
|
returned: success
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
sample: example domain
|
|
|
|
|
|
|
|
account:
|
|
|
|
|
|
|
|
description: Account the affinity group is related to.
|
|
|
|
|
|
|
|
returned: success
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
sample: example account
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
@ -128,6 +148,7 @@ class AnsibleCloudStackAffinityGroup(AnsibleCloudStack):
|
|
|
|
affinity_group = self.module.params.get('name')
|
|
|
|
affinity_group = self.module.params.get('name')
|
|
|
|
|
|
|
|
|
|
|
|
args = {}
|
|
|
|
args = {}
|
|
|
|
|
|
|
|
args['projectid'] = self.get_project(key='id')
|
|
|
|
args['account'] = self.get_account('name')
|
|
|
|
args['account'] = self.get_account('name')
|
|
|
|
args['domainid'] = self.get_domain('id')
|
|
|
|
args['domainid'] = self.get_domain('id')
|
|
|
|
|
|
|
|
|
|
|
@ -163,6 +184,7 @@ class AnsibleCloudStackAffinityGroup(AnsibleCloudStack):
|
|
|
|
args['name'] = self.module.params.get('name')
|
|
|
|
args['name'] = self.module.params.get('name')
|
|
|
|
args['type'] = self.get_affinity_type()
|
|
|
|
args['type'] = self.get_affinity_type()
|
|
|
|
args['description'] = self.module.params.get('description')
|
|
|
|
args['description'] = self.module.params.get('description')
|
|
|
|
|
|
|
|
args['projectid'] = self.get_project(key='id')
|
|
|
|
args['account'] = self.get_account('name')
|
|
|
|
args['account'] = self.get_account('name')
|
|
|
|
args['domainid'] = self.get_domain('id')
|
|
|
|
args['domainid'] = self.get_domain('id')
|
|
|
|
|
|
|
|
|
|
|
@ -185,6 +207,7 @@ class AnsibleCloudStackAffinityGroup(AnsibleCloudStack):
|
|
|
|
|
|
|
|
|
|
|
|
args = {}
|
|
|
|
args = {}
|
|
|
|
args['name'] = self.module.params.get('name')
|
|
|
|
args['name'] = self.module.params.get('name')
|
|
|
|
|
|
|
|
args['projectid'] = self.get_project(key='id')
|
|
|
|
args['account'] = self.get_account('name')
|
|
|
|
args['account'] = self.get_account('name')
|
|
|
|
args['domainid'] = self.get_domain('id')
|
|
|
|
args['domainid'] = self.get_domain('id')
|
|
|
|
|
|
|
|
|
|
|
@ -209,6 +232,7 @@ def main():
|
|
|
|
state = dict(choices=['present', 'absent'], default='present'),
|
|
|
|
state = dict(choices=['present', 'absent'], default='present'),
|
|
|
|
domain = dict(default=None),
|
|
|
|
domain = dict(default=None),
|
|
|
|
account = dict(default=None),
|
|
|
|
account = dict(default=None),
|
|
|
|
|
|
|
|
project = dict(default=None),
|
|
|
|
poll_async = dict(choices=BOOLEANS, default=True),
|
|
|
|
poll_async = dict(choices=BOOLEANS, default=True),
|
|
|
|
))
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|