Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 1.12 KB

conventions.md

File metadata and controls

30 lines (21 loc) · 1.12 KB

Playbook Conventions

This is a subset of our playbook conventions which are relevant for our customers. When you make changes to our playbooks you must adhere to these conventions or your change will not be approved.

General

  • English is used for all text
  • Use lowercase text (except for comments)
  • Indentation is 2 spaces (no tabs)
  • Booleans use true and false (not yes/no, or True/False)
  • Use double quotes (") instead of single quotes (')
  • Never add sensitive information (passwords, keys, etc.) to the playbook

Variables

  • Use a unique uid when adding a new user
  • Add removed: true when removing users and databases

Tasks

  • Ansible syntax must be compatible with Ansible 2.8 and higher
  • A when should always be last and a become should always be first
  • Software roles should always have a fixed version (or major version) as variable
  • Reload the service with a notify when changing configuration

Templates

  • Template syntax must be compatible with Jinja 2.10 and higher
  • Templates should have the extension .j2
  • Templates should have {{ ansible_managed }} at the top of the file