|
|
@ -21,7 +21,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.0',
|
|
|
|
'supported_by': 'community'}
|
|
|
|
'supported_by': 'community'}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DOCUMENTATION='''
|
|
|
|
DOCUMENTATION = '''
|
|
|
|
---
|
|
|
|
---
|
|
|
|
module: atomic_image
|
|
|
|
module: atomic_image
|
|
|
|
short_description: Manage the container images on the atomic host platform
|
|
|
|
short_description: Manage the container images on the atomic host platform
|
|
|
@ -73,6 +73,11 @@ msg:
|
|
|
|
sample: [u'Using default tag: latest ...']
|
|
|
|
sample: [u'Using default tag: latest ...']
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# import module snippets
|
|
|
|
|
|
|
|
from ansible.module_utils.basic import AnsibleModule
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def do_upgrade(module, image):
|
|
|
|
def do_upgrade(module, image):
|
|
|
|
args = ['atomic', 'update', '--force', image]
|
|
|
|
args = ['atomic', 'update', '--force', image]
|
|
|
|
rc, out, err = module.run_command(args, check_rc=False)
|
|
|
|
rc, out, err = module.run_command(args, check_rc=False)
|
|
|
@ -120,10 +125,10 @@ def core(module):
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
def main():
|
|
|
|
module = AnsibleModule(
|
|
|
|
module = AnsibleModule(
|
|
|
|
argument_spec = dict(
|
|
|
|
argument_spec=dict(
|
|
|
|
name = dict(default=None, required=True),
|
|
|
|
name=dict(default=None, required=True),
|
|
|
|
state = dict(default='latest', choices=['present', 'absent', 'latest']),
|
|
|
|
state=dict(default='latest', choices=['present', 'absent', 'latest']),
|
|
|
|
started = dict(default='yes', type='bool'),
|
|
|
|
started=dict(default='yes', type='bool'),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
@ -138,7 +143,5 @@ def main():
|
|
|
|
module.fail_json(msg=str(e))
|
|
|
|
module.fail_json(msg=str(e))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# import module snippets
|
|
|
|
|
|
|
|
from ansible.module_utils.basic import *
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|
|
|
|
main()
|
|
|
|