Skip to content

Commit

Permalink
Type options of connection plugins (ansible-collections#8627)
Browse files Browse the repository at this point in the history
Type options of connection plugins.
  • Loading branch information
felixfontein authored Jul 21, 2024
1 parent f9a56b9 commit ce65eb8
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 4 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/8627-connection-types.yml
Original file line number Diff line number Diff line change
@@ -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)."
3 changes: 3 additions & 0 deletions plugins/connection/chroot.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@
remote_addr:
description:
- The path of the chroot you want to access.
type: string
default: inventory_hostname
vars:
- name: inventory_hostname
- name: ansible_host
executable:
description:
- User specified executable shell
type: string
ini:
- section: defaults
key: executable
Expand All @@ -38,6 +40,7 @@
chroot_exe:
description:
- User specified chroot binary
type: string
ini:
- section: chroot_connection
key: exe
Expand Down
1 change: 1 addition & 0 deletions plugins/connection/funcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
remote_addr:
description:
- The path of the chroot you want to access.
type: string
default: inventory_hostname
vars:
- name: ansible_host
Expand Down
4 changes: 4 additions & 0 deletions plugins/connection/incus.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
remote_addr:
description:
- The instance identifier.
type: string
default: inventory_hostname
vars:
- name: inventory_hostname
Expand All @@ -27,6 +28,7 @@
executable:
description:
- The shell to use for execution inside the instance.
type: string
default: /bin/sh
vars:
- name: ansible_executable
Expand All @@ -35,13 +37,15 @@
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
project:
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
Expand Down
2 changes: 2 additions & 0 deletions plugins/connection/iocage.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@
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
Expand Down
2 changes: 2 additions & 0 deletions plugins/connection/jail.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
remote_addr:
description:
- Path to the jail
type: string
default: inventory_hostname
vars:
- name: inventory_hostname
Expand All @@ -28,6 +29,7 @@
remote_user:
description:
- User to execute as inside the jail
type: string
vars:
- name: ansible_user
- name: ansible_jail_user
Expand Down
2 changes: 2 additions & 0 deletions plugins/connection/lxc.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
remote_addr:
description:
- Container identifier
type: string
default: inventory_hostname
vars:
- name: inventory_hostname
Expand All @@ -26,6 +27,7 @@
default: /bin/sh
description:
- Shell executable
type: string
vars:
- name: ansible_executable
- name: ansible_lxc_executable
Expand Down
4 changes: 4 additions & 0 deletions plugins/connection/lxd.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- 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
Expand All @@ -27,20 +28,23 @@
executable:
description:
- Shell to use for execution inside instance.
type: string
default: /bin/sh
vars:
- name: ansible_executable
- name: ansible_lxd_executable
remote:
description:
- Name of the LXD remote to use.
type: string
default: local
vars:
- name: ansible_lxd_remote
version_added: 2.0.0
project:
description:
- Name of the LXD project to use.
type: string
vars:
- name: ansible_lxd_project
version_added: 2.0.0
Expand Down
8 changes: 5 additions & 3 deletions plugins/connection/qubes.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@
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:
Expand Down
3 changes: 2 additions & 1 deletion plugins/connection/zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
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
Expand Down

0 comments on commit ce65eb8

Please sign in to comment.