|
|
@ -73,6 +73,16 @@ options:
|
|
|
|
- Register the ISO to be bootable. Only used if C(state) is present.
|
|
|
|
- Register the ISO to be bootable. Only used if C(state) is present.
|
|
|
|
required: false
|
|
|
|
required: false
|
|
|
|
default: true
|
|
|
|
default: true
|
|
|
|
|
|
|
|
domain:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Domain the ISO is related to.
|
|
|
|
|
|
|
|
required: false
|
|
|
|
|
|
|
|
default: null
|
|
|
|
|
|
|
|
account:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Account the ISO is related to.
|
|
|
|
|
|
|
|
required: false
|
|
|
|
|
|
|
|
default: null
|
|
|
|
project:
|
|
|
|
project:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Name of the project the ISO to be registered in.
|
|
|
|
- Name of the project the ISO to be registered in.
|
|
|
@ -168,6 +178,21 @@ created:
|
|
|
|
returned: success
|
|
|
|
returned: success
|
|
|
|
type: string
|
|
|
|
type: string
|
|
|
|
sample: 2015-03-29T14:57:06+0200
|
|
|
|
sample: 2015-03-29T14:57:06+0200
|
|
|
|
|
|
|
|
domain:
|
|
|
|
|
|
|
|
description: Domain the ISO is related to.
|
|
|
|
|
|
|
|
returned: success
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
sample: example domain
|
|
|
|
|
|
|
|
account:
|
|
|
|
|
|
|
|
description: Account the ISO is related to.
|
|
|
|
|
|
|
|
returned: success
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
sample: example account
|
|
|
|
|
|
|
|
project:
|
|
|
|
|
|
|
|
description: Project the ISO is related to.
|
|
|
|
|
|
|
|
returned: success
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
sample: example project
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
@ -191,8 +216,9 @@ class AnsibleCloudStackIso(AnsibleCloudStack):
|
|
|
|
if not iso:
|
|
|
|
if not iso:
|
|
|
|
args = {}
|
|
|
|
args = {}
|
|
|
|
args['zoneid'] = self.get_zone('id')
|
|
|
|
args['zoneid'] = self.get_zone('id')
|
|
|
|
|
|
|
|
args['domainid'] = self.get_domain('id')
|
|
|
|
|
|
|
|
args['account'] = self.get_account('name')
|
|
|
|
args['projectid'] = self.get_project('id')
|
|
|
|
args['projectid'] = self.get_project('id')
|
|
|
|
|
|
|
|
|
|
|
|
args['bootable'] = self.module.params.get('bootable')
|
|
|
|
args['bootable'] = self.module.params.get('bootable')
|
|
|
|
args['ostypeid'] = self.get_os_type('id')
|
|
|
|
args['ostypeid'] = self.get_os_type('id')
|
|
|
|
if args['bootable'] and not args['ostypeid']:
|
|
|
|
if args['bootable'] and not args['ostypeid']:
|
|
|
@ -221,6 +247,8 @@ class AnsibleCloudStackIso(AnsibleCloudStack):
|
|
|
|
args = {}
|
|
|
|
args = {}
|
|
|
|
args['isready'] = self.module.params.get('is_ready')
|
|
|
|
args['isready'] = self.module.params.get('is_ready')
|
|
|
|
args['isofilter'] = self.module.params.get('iso_filter')
|
|
|
|
args['isofilter'] = self.module.params.get('iso_filter')
|
|
|
|
|
|
|
|
args['domainid'] = self.get_domain('id')
|
|
|
|
|
|
|
|
args['account'] = self.get_account('name')
|
|
|
|
args['projectid'] = self.get_project('id')
|
|
|
|
args['projectid'] = self.get_project('id')
|
|
|
|
args['zoneid'] = self.get_zone('id')
|
|
|
|
args['zoneid'] = self.get_zone('id')
|
|
|
|
|
|
|
|
|
|
|
@ -270,6 +298,12 @@ class AnsibleCloudStackIso(AnsibleCloudStack):
|
|
|
|
self.result['is_ready'] = iso['isready']
|
|
|
|
self.result['is_ready'] = iso['isready']
|
|
|
|
if 'created' in iso:
|
|
|
|
if 'created' in iso:
|
|
|
|
self.result['created'] = iso['created']
|
|
|
|
self.result['created'] = iso['created']
|
|
|
|
|
|
|
|
if 'project' in iso:
|
|
|
|
|
|
|
|
self.result['project'] = iso['project']
|
|
|
|
|
|
|
|
if 'domain' in iso:
|
|
|
|
|
|
|
|
self.result['domain'] = iso['domain']
|
|
|
|
|
|
|
|
if 'account' in iso:
|
|
|
|
|
|
|
|
self.result['account'] = iso['account']
|
|
|
|
return self.result
|
|
|
|
return self.result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -281,6 +315,8 @@ def main():
|
|
|
|
os_type = dict(default=None),
|
|
|
|
os_type = dict(default=None),
|
|
|
|
zone = dict(default=None),
|
|
|
|
zone = dict(default=None),
|
|
|
|
iso_filter = dict(default='self', choices=[ 'featured', 'self', 'selfexecutable','sharedexecutable','executable', 'community' ]),
|
|
|
|
iso_filter = dict(default='self', choices=[ 'featured', 'self', 'selfexecutable','sharedexecutable','executable', 'community' ]),
|
|
|
|
|
|
|
|
domain = dict(default=None),
|
|
|
|
|
|
|
|
account = dict(default=None),
|
|
|
|
project = dict(default=None),
|
|
|
|
project = dict(default=None),
|
|
|
|
checksum = dict(default=None),
|
|
|
|
checksum = dict(default=None),
|
|
|
|
is_ready = dict(choices=BOOLEANS, default=False),
|
|
|
|
is_ready = dict(choices=BOOLEANS, default=False),
|
|
|
|