NETWAYS / NETWAYS/ansible-collection-elasticstack
Define the collection-wide variable naming schema
Nobody has claimed this yet.
- Dominant language
- Jinja
- Stars
- 14
- Forks
- 11
- Avg merge
- 1d 47m
- Merged PRs (30d)
- 6
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 #485 / #495, not here.
- Internals -
__<role>_<name>forregister/set_fact,_<role>_<name>forvars/
(see #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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the proposed naming rules in this issue, then read CONTRIBUTING and the referenced issues #485 and #495 for role ownership and internal variable conventions. Document the agreed schema in CONTRIBUTING; done means the rules are agreed and the checklist item is complete, without applying renames.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ansible
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100