chore(roles/apache_httpd): close the two CONTRIBUTING deliverables - #317
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #316, review that one first. GitHub retargets this PR to
mainonce #316 is merged.Two gaps found while reviewing #316 against
CONTRIBUTING.mdandroles/example.vars/Ubuntu.ymlCONTRIBUTING: "When a role has a
vars/Debian.yml, always create an explicitvars/Ubuntu.ymltoo, even if it is currently an identical copy." Added as a byte-identical copy, likeclamav,sshdandnextcloudhave it.This is why the PR is stacked: a copy taken from
mainwould carryinfo: enabled: trueand, sinceUbuntu.ymlis loaded on top ofDebian.yml, would silently re-enablemod_infoon Ubuntu the moment #316 merges.meta/argument_specs.ymlCONTRIBUTING lists it as a deliverable and
roles/exampleships one;apache_httpdhad nometa/at all. All 66 user-facing variables are declared with type and default:apache_httpd__conf_server_adminisrequired: true.httpd.conf.j2references it bare, so an unset value already failed the run, just later and with a Jinja error.apache_httpd__systemd_stateis pinned to its four documented values.__combined_varand__role_varmembers (role-internal, no other role declares them either) and the two dependent variables this role publishes to thepythonandselinuxroles.Verified
ansible.builtin.validate_argument_specon ansible-core 2.16.17:apache_httpd__conf_server_adminmissing required arguments: apache_httpd__conf_server_adminapache_httpd__systemd_state: 'bogus'value of apache_httpd__systemd_state must be one of: reloaded, restarted, started, stopped, got: bogusapache_httpd__mpm_event_max_request_workers: 'many'... unable to convert to intAlso measured that role argument-spec defaults are not injected into the play, so the
is definedguards onapache_httpd__limit_vhostsandapache_httpd__mod_log_config_custom_logkeep working. Both are declared without a default. Every declared default was diffed againstdefaults/main.ymlprogrammatically; 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 nometa/argument_specs.yml.