Skip to content

Variable Naming Standards

Convention: a 2–3 letter prefix, an underscore, then a standardized variable name.

Prefix Scope Example
abc_ Example program abc_ntp_servers
xyz_ Example program xyz_ntp_servers
site1_ Example Site site1_ntp_server

Enforcement

Run ansible-lint in CI so contributions follow the standard automatically.

# Example (sanitized)
abc_ntp_servers:
  - ntp1.example.com
  - ntp2.example.com
Here is a little further expansion.

  • Dagobah (dag)
  • Tatooine (tat)
  • Hoth (hot)
  • Alderaan (ald)
Prefix Scope Example
dag_ Dagobah dag_ntp_servers
tat_ Tatooine tat_ntp_servers
hot_ Hoth hot_ntp_server
ald_ Adleraan ald_ntp_server