Skip to content

Commit b7d9bd2

Browse files
committed
refactor(roles): add meta/argument_specs.yml to nine more roles
CONTRIBUTING requires every role to ship a `meta/argument_specs.yml`. Add it for these nine roles whose `tasks/main.yml` is otherwise already correct. No behaviour change. Roles touched: `alternatives`, `elastic_agent`, `elastic_agent_fleet_server`, `icinga_kubernetes_web`, `icingaweb2_module_reporting`, `kernel_settings`, `lvm`, `mastodon`, `proxysql`. The specs cover the user-facing variables (those without the `__` prefix) as documented in each role's README. Internal combine-pattern slots (`__role_var`, `__dependent_var`, `__combined_var`) are not declared, in line with the convention.
1 parent 18f7257 commit b7d9bd2

10 files changed

Lines changed: 751 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7474
* **role:hostname, role:kdump, role:timezone**: Add `meta/argument_specs.yml` so Ansible validates the role variables (types, choices) at role entry. No behaviour change.
7575
* **role:libmaxminddb, role:mod_maxminddb**: Add `meta/argument_specs.yml`. No behaviour change.
7676
* **role:apps, role:grafana_grizzly, role:mailto_root, role:motd**: Add `meta/argument_specs.yml`. No behaviour change.
77+
* **role:alternatives, role:elastic_agent, role:elastic_agent_fleet_server, role:icinga_kubernetes_web, role:icingaweb2_module_reporting, role:kernel_settings, role:lvm, role:mastodon, role:proxysql**: Add `meta/argument_specs.yml`. No behaviour change.
7778
* **role:icingaweb2_module_businessprocess**: README now documents the install behaviour (controller-side download, every-run-overwrite, idempotent module enable). Add `meta/argument_specs.yml`.
7879
* **role:icingaweb2_module_cube**: README now documents the install behaviour. Add `meta/argument_specs.yml`.
7980
* **role:icingaweb2_module_fileshipper**: README now documents the install behaviour and the `php-xml`/`php-yaml`/`php-zip` runtime dependency. Add `meta/argument_specs.yml`.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
argument_specs:
2+
main:
3+
options:
4+
5+
alternatives__alternatives:
6+
type: 'list'
7+
elements: 'dict'
8+
required: true
9+
description: >-
10+
List of `update-alternatives` entries to manage.
11+
options:
12+
13+
link:
14+
type: 'str'
15+
required: false
16+
description: >-
17+
Path to the symlink that should point at the real
18+
executable. Mandatory on Red Hat-family. On Debian only
19+
required when the alternative `name` is unknown to the
20+
system.
21+
22+
name:
23+
type: 'str'
24+
required: true
25+
description: 'The generic name of the alternative.'
26+
27+
path:
28+
type: 'str'
29+
required: false
30+
description: 'Path to the real executable.'
31+
32+
priority:
33+
type: 'int'
34+
required: false
35+
description: >-
36+
Priority weight for `auto` mode (default fallback for
37+
creation: 50).
38+
39+
state:
40+
type: 'str'
41+
required: false
42+
default: 'selected'
43+
choices:
44+
- 'absent'
45+
- 'auto'
46+
- 'present'
47+
- 'selected'
48+
description: >-
49+
`selected` (default), `present`, `auto`, or `absent`.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
argument_specs:
2+
main:
3+
options:
4+
5+
elastic_agent__enrollment_token:
6+
type: 'str'
7+
required: true
8+
description: >-
9+
Enrollment token from the Kibana Fleet UI / API used to
10+
register this agent with Fleet Server.
11+
12+
elastic_agent__insecure:
13+
type: 'bool'
14+
required: false
15+
default: false
16+
description: >-
17+
If `true`, skip TLS verification when enrolling against the
18+
Fleet Server.
19+
20+
elastic_agent__service_enabled:
21+
type: 'bool'
22+
required: false
23+
default: true
24+
description: 'Whether elastic-agent.service is enabled at boot.'
25+
26+
elastic_agent__service_state:
27+
type: 'str'
28+
required: false
29+
default: 'started'
30+
choices:
31+
- 'reloaded'
32+
- 'restarted'
33+
- 'started'
34+
- 'stopped'
35+
description: 'State of elastic-agent.service.'
36+
37+
elastic_agent__tags:
38+
type: 'list'
39+
elements: 'str'
40+
required: false
41+
default: []
42+
description: >-
43+
Optional list of tags attached to this agent (used for
44+
policy assignment / filtering in Fleet).
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
argument_specs:
2+
main:
3+
options:
4+
5+
elastic_agent_fleet_server__insecure:
6+
type: 'bool'
7+
required: false
8+
default: false
9+
description: >-
10+
If `true`, skip TLS verification when enrolling against the
11+
Elasticsearch / Kibana endpoint.
12+
13+
elastic_agent_fleet_server__policy_id:
14+
type: 'str'
15+
required: false
16+
default: 'fleet-server-policy'
17+
description: 'The Fleet Server policy ID to attach the agent to.'
18+
19+
elastic_agent_fleet_server__service_enabled:
20+
type: 'bool'
21+
required: false
22+
default: true
23+
description: 'Whether elastic-agent.service is enabled at boot.'
24+
25+
elastic_agent_fleet_server__service_state:
26+
type: 'str'
27+
required: false
28+
default: 'started'
29+
choices:
30+
- 'reloaded'
31+
- 'restarted'
32+
- 'started'
33+
- 'stopped'
34+
description: 'State of elastic-agent.service.'
35+
36+
elastic_agent_fleet_server__service_token:
37+
type: 'str'
38+
required: true
39+
description: >-
40+
Service token created via the Elasticsearch API or Kibana
41+
Fleet UI. Used to enroll this host as a Fleet Server.
42+
43+
elastic_agent_fleet_server__url:
44+
type: 'str'
45+
required: false
46+
description: >-
47+
Externally reachable URL of this Fleet Server. Defaults to
48+
`https://{{ ansible_facts["nodename"] }}:8220`.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
argument_specs:
2+
main:
3+
options:
4+
5+
icinga_kubernetes_web__database_host:
6+
type: 'str'
7+
required: false
8+
description: >-
9+
Hostname of the SQL database. Defaults to
10+
`{{ icinga_kubernetes__database_host }}`.
11+
12+
icinga_kubernetes_web__database_login:
13+
type: 'dict'
14+
required: false
15+
description: >-
16+
Login credentials for the SQL database. Defaults to
17+
`{{ icinga_kubernetes__database_login }}`.
18+
19+
icinga_kubernetes_web__database_name:
20+
type: 'str'
21+
required: false
22+
description: >-
23+
Name of the SQL database. Defaults to
24+
`{{ icinga_kubernetes__database_name }}`.
25+
26+
icinga_kubernetes_web__url:
27+
type: 'str'
28+
required: false
29+
description: >-
30+
URL from which the module tarball is downloaded. Defaults to
31+
`https://github.com/Icinga/icinga-kubernetes-web/archive/{{ icinga_kubernetes_web__version }}.tar.gz`.
32+
33+
icinga_kubernetes_web__version:
34+
type: 'str'
35+
required: true
36+
description: >-
37+
The module version to install. Possible options:
38+
https://github.com/Icinga/icinga-kubernetes-web/releases.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
argument_specs:
2+
main:
3+
options:
4+
5+
icingaweb2_module_reporting__database_host:
6+
type: 'str'
7+
required: false
8+
default: 'localhost'
9+
description: 'Host of the SQL database server.'
10+
11+
icingaweb2_module_reporting__database_login:
12+
type: 'dict'
13+
required: true
14+
description: >-
15+
User account used by the Reporting module to access its SQL
16+
database (currently MySQL).
17+
options:
18+
19+
password:
20+
type: 'str'
21+
required: true
22+
description: 'Password for the database user.'
23+
24+
username:
25+
type: 'str'
26+
required: true
27+
description: 'Database username.'
28+
29+
icingaweb2_module_reporting__database_name:
30+
type: 'str'
31+
required: false
32+
default: 'icinga_reporting'
33+
description: 'Name of the SQL database.'
34+
35+
icingaweb2_module_reporting__service_enabled:
36+
type: 'bool'
37+
required: false
38+
default: true
39+
description: >-
40+
Whether the icinga-reporting timer / cron is enabled at
41+
boot.
42+
43+
icingaweb2_module_reporting__version:
44+
type: 'str'
45+
required: true
46+
description: >-
47+
The module version to install. Possible options:
48+
https://github.com/Icinga/icingaweb2-module-reporting/releases.
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
argument_specs:
2+
main:
3+
options:
4+
5+
kernel_settings__sysctl__group_var:
6+
type: 'list'
7+
elements: 'dict'
8+
required: false
9+
default: []
10+
description: >-
11+
Sysctl entries to apply (`name`/`value`). Group-level
12+
override.
13+
14+
kernel_settings__sysctl__host_var:
15+
type: 'list'
16+
elements: 'dict'
17+
required: false
18+
default: []
19+
description: >-
20+
Sysctl entries to apply (`name`/`value`). Host-level
21+
override.
22+
23+
kernel_settings__sysfs__group_var:
24+
type: 'list'
25+
elements: 'dict'
26+
required: false
27+
default: []
28+
description: 'sysfs entries to apply. Group-level override.'
29+
30+
kernel_settings__sysfs__host_var:
31+
type: 'list'
32+
elements: 'dict'
33+
required: false
34+
default: []
35+
description: 'sysfs entries to apply. Host-level override.'
36+
37+
kernel_settings__systemd_cpu_affinity__group_var:
38+
type: 'str'
39+
required: false
40+
default: ''
41+
description: >-
42+
Comma-separated CPU list for systemd `CPUAffinity=`.
43+
Group-level override.
44+
45+
kernel_settings__systemd_cpu_affinity__host_var:
46+
type: 'str'
47+
required: false
48+
default: ''
49+
description: >-
50+
Comma-separated CPU list for systemd `CPUAffinity=`.
51+
Host-level override.
52+
53+
kernel_settings__transparent_hugepages__group_var:
54+
type: 'str'
55+
required: false
56+
default: ''
57+
description: >-
58+
Value for `transparent_hugepage/enabled`
59+
(`always`/`madvise`/`never`). Group-level override.
60+
61+
kernel_settings__transparent_hugepages__host_var:
62+
type: 'str'
63+
required: false
64+
default: ''
65+
description: >-
66+
Value for `transparent_hugepage/enabled`. Host-level override.
67+
68+
kernel_settings__transparent_hugepages_defrag__group_var:
69+
type: 'str'
70+
required: false
71+
default: ''
72+
description: >-
73+
Value for `transparent_hugepage/defrag` (`always`, `defer`,
74+
`defer+madvise`, `madvise`, `never`). Group-level override.
75+
76+
kernel_settings__transparent_hugepages_defrag__host_var:
77+
type: 'str'
78+
required: false
79+
default: ''
80+
description: >-
81+
Value for `transparent_hugepage/defrag`. Host-level override.

roles/lvm/meta/argument_specs.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
argument_specs:
2+
main:
3+
options:
4+
5+
lvm__lvs__group_var:
6+
type: 'list'
7+
elements: 'dict'
8+
required: false
9+
default: []
10+
description: >-
11+
List of logical volumes to manage. Group-level override. See
12+
README for the full subkey schema (`name`, `vg`, `size`,
13+
`filesystem`, `mount_path`, ...).
14+
15+
lvm__lvs__host_var:
16+
type: 'list'
17+
elements: 'dict'
18+
required: false
19+
default: []
20+
description: 'List of logical volumes to manage. Host-level override.'
21+
22+
lvm__vgs__group_var:
23+
type: 'list'
24+
elements: 'dict'
25+
required: false
26+
default: []
27+
description: >-
28+
List of volume groups to manage. Group-level override. See
29+
README for the full subkey schema (`name`, `pvs`, `growpart`,
30+
...).
31+
32+
lvm__vgs__host_var:
33+
type: 'list'
34+
elements: 'dict'
35+
required: false
36+
default: []
37+
description: 'List of volume groups to manage. Host-level override.'

0 commit comments

Comments
 (0)