diff --git a/changelogs/fragments/8627-connection-types.yml b/changelogs/fragments/8627-connection-types.yml new file mode 100644 index 0000000000..9b92735fb8 --- /dev/null +++ b/changelogs/fragments/8627-connection-types.yml @@ -0,0 +1,2 @@ +minor_changes: + - "chroot, funcd, incus, iocage, jail, lxc, lxd, qubes, zone connection plugins - make sure that all options are typed (https://github.com/ansible-collections/community.general/pull/8627)." diff --git a/plugins/connection/chroot.py b/plugins/connection/chroot.py index 810316aaa5..3567912359 100644 --- a/plugins/connection/chroot.py +++ b/plugins/connection/chroot.py @@ -20,6 +20,7 @@ DOCUMENTATION = ''' remote_addr: description: - The path of the chroot you want to access. + type: string default: inventory_hostname vars: - name: inventory_hostname @@ -27,6 +28,7 @@ DOCUMENTATION = ''' executable: description: - User specified executable shell + type: string ini: - section: defaults key: executable @@ -38,6 +40,7 @@ DOCUMENTATION = ''' chroot_exe: description: - User specified chroot binary + type: string ini: - section: chroot_connection key: exe diff --git a/plugins/connection/funcd.py b/plugins/connection/funcd.py index 219a8cccd3..7765f53110 100644 --- a/plugins/connection/funcd.py +++ b/plugins/connection/funcd.py @@ -21,6 +21,7 @@ DOCUMENTATION = ''' remote_addr: description: - The path of the chroot you want to access. + type: string default: inventory_hostname vars: - name: ansible_host diff --git a/plugins/connection/incus.py b/plugins/connection/incus.py index 81d6f971c7..8adea2d13a 100644 --- a/plugins/connection/incus.py +++ b/plugins/connection/incus.py @@ -19,6 +19,7 @@ DOCUMENTATION = """ remote_addr: description: - The instance identifier. + type: string default: inventory_hostname vars: - name: inventory_hostname @@ -27,6 +28,7 @@ DOCUMENTATION = """ executable: description: - The shell to use for execution inside the instance. + type: string default: /bin/sh vars: - name: ansible_executable @@ -35,6 +37,7 @@ DOCUMENTATION = """ description: - The name of the Incus remote to use (per C(incus remote list)). - Remotes are used to access multiple servers from a single client. + type: string default: local vars: - name: ansible_incus_remote @@ -42,6 +45,7 @@ DOCUMENTATION = """ description: - The name of the Incus project to use (per C(incus project list)). - Projects are used to divide the instances running on a server. + type: string default: default vars: - name: ansible_incus_project diff --git a/plugins/connection/iocage.py b/plugins/connection/iocage.py index 2e2a6f0937..79d4f88594 100644 --- a/plugins/connection/iocage.py +++ b/plugins/connection/iocage.py @@ -20,12 +20,14 @@ DOCUMENTATION = ''' remote_addr: description: - Path to the jail + type: string vars: - name: ansible_host - name: ansible_iocage_host remote_user: description: - User to execute as inside the jail + type: string vars: - name: ansible_user - name: ansible_iocage_user diff --git a/plugins/connection/jail.py b/plugins/connection/jail.py index 3a3edd4b18..7d0abdde3a 100644 --- a/plugins/connection/jail.py +++ b/plugins/connection/jail.py @@ -20,6 +20,7 @@ DOCUMENTATION = ''' remote_addr: description: - Path to the jail + type: string default: inventory_hostname vars: - name: inventory_hostname @@ -28,6 +29,7 @@ DOCUMENTATION = ''' remote_user: description: - User to execute as inside the jail + type: string vars: - name: ansible_user - name: ansible_jail_user diff --git a/plugins/connection/lxc.py b/plugins/connection/lxc.py index 7bb5824fac..2710e6984e 100644 --- a/plugins/connection/lxc.py +++ b/plugins/connection/lxc.py @@ -17,6 +17,7 @@ DOCUMENTATION = ''' remote_addr: description: - Container identifier + type: string default: inventory_hostname vars: - name: inventory_hostname @@ -26,6 +27,7 @@ DOCUMENTATION = ''' default: /bin/sh description: - Shell executable + type: string vars: - name: ansible_executable - name: ansible_lxc_executable diff --git a/plugins/connection/lxd.py b/plugins/connection/lxd.py index 0e784b85fd..d850907182 100644 --- a/plugins/connection/lxd.py +++ b/plugins/connection/lxd.py @@ -19,6 +19,7 @@ DOCUMENTATION = ''' - Instance (container/VM) identifier. - Since community.general 8.0.0, a FQDN can be provided; in that case, the first component (the part before C(.)) is used as the instance identifier. + type: string default: inventory_hostname vars: - name: inventory_hostname @@ -27,6 +28,7 @@ DOCUMENTATION = ''' executable: description: - Shell to use for execution inside instance. + type: string default: /bin/sh vars: - name: ansible_executable @@ -34,6 +36,7 @@ DOCUMENTATION = ''' remote: description: - Name of the LXD remote to use. + type: string default: local vars: - name: ansible_lxd_remote @@ -41,6 +44,7 @@ DOCUMENTATION = ''' project: description: - Name of the LXD project to use. + type: string vars: - name: ansible_lxd_project version_added: 2.0.0 diff --git a/plugins/connection/qubes.py b/plugins/connection/qubes.py index 25594e952b..b54eeb3a84 100644 --- a/plugins/connection/qubes.py +++ b/plugins/connection/qubes.py @@ -25,14 +25,16 @@ DOCUMENTATION = ''' options: remote_addr: description: - - vm name + - VM name. + type: string default: inventory_hostname vars: - name: ansible_host remote_user: description: - - The user to execute as inside the vm. - default: The *user* account as default in Qubes OS. + - The user to execute as inside the VM. + type: string + default: The I(user) account as default in Qubes OS. vars: - name: ansible_user # keyword: diff --git a/plugins/connection/zone.py b/plugins/connection/zone.py index 34827c7e37..0a591143e0 100644 --- a/plugins/connection/zone.py +++ b/plugins/connection/zone.py @@ -16,11 +16,12 @@ DOCUMENTATION = ''' name: zone short_description: Run tasks in a zone instance description: - - Run commands or put/fetch files to an existing zone + - Run commands or put/fetch files to an existing zone. options: remote_addr: description: - Zone identifier + type: string default: inventory_hostname vars: - name: ansible_host