Skip to content

chore(roles/apache_httpd): close the two CONTRIBUTING deliverables - #317

Merged
NavidSassan merged 3 commits into
mainfrom
chore/apache-httpd-contributing-deliverables
Aug 19, 2026
Merged

chore(roles/apache_httpd): close the two CONTRIBUTING deliverables#317
NavidSassan merged 3 commits into
mainfrom
chore/apache-httpd-contributing-deliverables

Conversation

@markuslf

Copy link
Copy Markdown
Member

Stacked on #316, review that one first. GitHub retargets this PR to main once #316 is merged.

Two gaps found while reviewing #316 against CONTRIBUTING.md and roles/example.

vars/Ubuntu.yml

CONTRIBUTING: "When a role has a vars/Debian.yml, always create an explicit vars/Ubuntu.yml too, even if it is currently an identical copy." Added as a byte-identical copy, like clamav, sshd and nextcloud have it.

This is why the PR is stacked: a copy taken from main would carry info: enabled: true and, since Ubuntu.yml is loaded on top of Debian.yml, would silently re-enable mod_info on Ubuntu the moment #316 merges.

meta/argument_specs.yml

CONTRIBUTING lists it as a deliverable and roles/example ships one; apache_httpd had no meta/ at all. All 66 user-facing variables are declared with type and default:

  • apache_httpd__conf_server_admin is required: true. httpd.conf.j2 references it bare, so an unset value already failed the run, just later and with a Jinja error.
  • apache_httpd__systemd_state is pinned to its four documented values.
  • Left out on purpose: the __combined_var and __role_var members (role-internal, no other role declares them either) and the two dependent variables this role publishes to the python and selinux roles.

Verified

ansible.builtin.validate_argument_spec on ansible-core 2.16.17:

Input Result
valid passes
no apache_httpd__conf_server_admin missing required arguments: apache_httpd__conf_server_admin
apache_httpd__systemd_state: 'bogus' value of apache_httpd__systemd_state must be one of: reloaded, restarted, started, stopped, got: bogus
apache_httpd__mpm_event_max_request_workers: 'many' ... unable to convert to int

Also measured that role argument-spec defaults are not injected into the play, so the is defined guards on apache_httpd__limit_vhosts and apache_httpd__mod_log_config_custom_log keep working. Both are declared without a default. Every declared default was diffed against defaults/main.yml programmatically; no drift.

Not in this PR

21 further roles are missing their vars/Ubuntu.yml (acme_sh, elasticsearch, mariadb_server, php, postfix, redis, selinux, ...), and 118 of 166 roles have no meta/argument_specs.yml.

CONTRIBUTING requires an explicit vars/Ubuntu.yml next to vars/Debian.yml,
even while it is an identical copy: Ubuntu is loaded on top of its Debian
os_family, so the copy is redundant today, but it keeps Ubuntu visible and
gives later Ubuntu-specific drift a dedicated home.
CONTRIBUTING lists meta/argument_specs.yml as a deliverable; the role had
no meta/ at all. Declares the 66 user-facing variables with their type and
default, marks apache_httpd__conf_server_admin required (httpd.conf.j2
references it bare, so an unset value failed later while templating) and
pins apache_httpd__systemd_state to its four documented values.

Left out on purpose: the __combined_var and __role_var members, which are
role-internal, and the two dependent variables this role publishes to the
python and selinux roles.

Verified with ansible.builtin.validate_argument_spec on ansible-core
2.16.17: valid input passes, a missing apache_httpd__conf_server_admin, an
unknown systemd state and a non-numeric worker count each abort with a
readable message. Role argument-spec defaults are not injected into the
play, so the `is defined` guards on apache_httpd__limit_vhosts and
apache_httpd__mod_log_config_custom_log keep working; both are declared
without a default.
@markuslf
markuslf requested a review from NavidSassan August 18, 2026 13:01
Base automatically changed from fix/apache-httpd-disable-mod-info to main August 19, 2026 14:13
@NavidSassan
NavidSassan merged commit a4e1079 into main Aug 19, 2026
9 checks passed
@NavidSassan
NavidSassan deleted the chore/apache-httpd-contributing-deliverables branch August 19, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants