From 60828e82a4e17ccbdc163f4c10195ddd989119a3 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Mon, 10 Nov 2025 14:08:06 +1300 Subject: [PATCH] smartos imgadm man page reference (#11071) --- plugins/modules/imgadm.py | 16 ++++++++++------ plugins/modules/smartos_image_info.py | 6 +++++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/plugins/modules/imgadm.py b/plugins/modules/imgadm.py index ec2d7b1185..1ce1b5212d 100644 --- a/plugins/modules/imgadm.py +++ b/plugins/modules/imgadm.py @@ -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, ) diff --git a/plugins/modules/smartos_image_info.py b/plugins/modules/smartos_image_info.py index 2ccbc4c32f..113066107a 100644 --- a/plugins/modules/smartos_image_info.py +++ b/plugins/modules/smartos_image_info.py @@ -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"""