Repository navigation
Description
Problem
Variable names in the collection follow no single documented schema. Same concept, different
words (_pass / _pw / _password / _passphrase), mixed boolean forms (_enable 6x vs
_enabled 2x), negative booleans (no_*, disable_*), a typo (indicies), and names that do
not say what the value is (elasticstack_password is the elastic user's password,
elasticstack_initial_passwords is a file path). Without a written schema, every issue that
renames a variable has to re-decide the rules.
Want
Agree on one naming schema and document it in CONTRIBUTING. This issue only defines and
documents the rules; applying them is a separate issue.
Schema (proposed)
- Prefix -
<role>_for role-owned variables,elasticstack_for stack-wide ones (read by= 2 roles). Which variable belongs where is decided in [Feature]: Move single-role variables out of the elasticstack meta role #485 / Adopt an internal-variable naming convention (_ / __) and keep internals out of argument_specs #495, not here.
- Internals -
__<role>_<name>forregister/set_fact,_<role>_<name>forvars/
(see Adopt an internal-variable naming convention (_ / __) and keep internals out of argument_specs #495). - Credentials -
_passwordfor an account credential,_passphrasefor something that
protects a key or keystore. Never_pw, never_pass. - Booleans - positive polarity only, no
no_*/disable_*. - Boolean suffix -
_enableeverywhere. It is an instruction to the role, consistent with
the existingmanage_*family. - Word order -
<prefix>_<subject>_<attribute>, e.g...._repos_enable, not
..._enable_repos. - Paths - the name carries
_file/_dir/_path. - Spelling - correct English (
indices, notindicies). - Units - put a unit in the name only when
type:and the description in
argument_specs.ymldo not already carry it. Example:*_cert_expiration_bufferneeds no
_dayssuffix because the spec declarestype: intand the description says "in days".
Scope
- Agree on the rules above
- Document them in
CONTRIBUTING
Activity