mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-02-04 07:51:50 +00:00
smartos imgadm man page reference (#11071)
This commit is contained in:
parent
0175d75a7c
commit
60828e82a4
2 changed files with 15 additions and 7 deletions
|
|
@ -11,7 +11,7 @@ DOCUMENTATION = r"""
|
|||
module: imgadm
|
||||
short_description: Manage SmartOS images
|
||||
description:
|
||||
- Manage SmartOS virtual machine images through imgadm(1M).
|
||||
- Manage SmartOS virtual machine images through imgadm(8).
|
||||
author: Jasper Lievisse Adriaanse (@jasperla)
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
|
|
@ -24,7 +24,7 @@ options:
|
|||
force:
|
||||
type: bool
|
||||
description:
|
||||
- Force a given operation (where supported by imgadm(1M)).
|
||||
- Force a given operation (where supported by imgadm(8)).
|
||||
pool:
|
||||
default: zones
|
||||
description:
|
||||
|
|
@ -53,6 +53,10 @@ options:
|
|||
description:
|
||||
- Image UUID. Can either be a full UUID or V(*) for all images.
|
||||
type: str
|
||||
seealso:
|
||||
- name: imgadm(8)
|
||||
description: Complete manual page for the command C(imgadm).
|
||||
link: https://smartos.org/man/8/imgadm
|
||||
"""
|
||||
|
||||
EXAMPLES = r"""
|
||||
|
|
@ -115,7 +119,7 @@ import re
|
|||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
# Shortcut for the imgadm(1M) command. While imgadm(1M) supports a
|
||||
# Shortcut for the imgadm(8) command. While imgadm(8) supports a
|
||||
# -E option to return any errors in JSON, the generated JSON does not play well
|
||||
# with the JSON parsers of Python. The returned message contains '\n' as part of
|
||||
# the stacktrace, which breaks the parsers.
|
||||
|
|
@ -160,7 +164,7 @@ class Imgadm:
|
|||
if rc != 0:
|
||||
self.module.fail_json(msg=f"Failed to update images: {self.errmsg(stderr)}")
|
||||
|
||||
# There is no feedback from imgadm(1M) to determine if anything
|
||||
# There is no feedback from imgadm(8) to determine if anything
|
||||
# was actually changed. So treat this as an 'always-changes' operation.
|
||||
# Note that 'imgadm -v' produces unparsable JSON...
|
||||
self.changed = True
|
||||
|
|
@ -194,7 +198,7 @@ class Imgadm:
|
|||
if re.match(regex, stdout):
|
||||
self.changed = True
|
||||
else:
|
||||
# Type is ignored by imgadm(1M) here
|
||||
# Type is ignored by imgadm(8) here
|
||||
cmd += f" -d {source}"
|
||||
(rc, stdout, stderr) = self.module.run_command(cmd)
|
||||
|
||||
|
|
@ -269,7 +273,7 @@ def main():
|
|||
type=dict(default="imgapi", choices=["imgapi", "docker", "dsapi"]),
|
||||
uuid=dict(),
|
||||
),
|
||||
# This module relies largely on imgadm(1M) to enforce idempotency, which does not
|
||||
# This module relies largely on imgadm(8) to enforce idempotency, which does not
|
||||
# provide a "noop" (or equivalent) mode to do a dry-run.
|
||||
supports_check_mode=False,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -25,8 +25,12 @@ options:
|
|||
description:
|
||||
- Criteria for selecting image. Can be any value from image manifest and V(published_date), V(published), V(source),
|
||||
V(clones), and V(size).
|
||||
- More information can be found at U(https://smartos.org/man/1m/imgadm) under C(imgadm list).
|
||||
- More information can be found at U(https://smartos.org/man/8/imgadm) under C(imgadm list).
|
||||
type: str
|
||||
seealso:
|
||||
- name: imgadm(8)
|
||||
description: Complete manual page for the command C(imgadm).
|
||||
link: https://smartos.org/man/8/imgadm
|
||||
"""
|
||||
|
||||
EXAMPLES = r"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue