---
extends: default

ignore: |
  .git/
  .idea/
  server/

rules:
  # Ansible convention: every file opens with ---
  document-start:
    present: true
  line-length:
    max: 120
    allow-non-breakable-words: true
  indentation:
    spaces: 2
    indent-sequences: true
  comments:
    min-spaces-from-content: 1
  # Both required by ansible-lint's embedded yamllint; it refuses to use a
  # custom config that disagrees, and disables fix mode.
  comments-indentation: false
  braces:
    max-spaces-inside: 1
  # File modes must be quoted strings ("0755"), never bare octal. An unquoted
  # 0644 is the integer 420 in YAML, and Ansible applies it as such.
  octal-values:
    forbid-implicit-octal: true
    forbid-explicit-octal: true
  truthy:
    allowed-values: ["true", "false"]
    # GitHub Actions workflows are keyed on `on:`, which YAML 1.1 reads as the
    # boolean true. Without this every workflow file fails the truthy rule on a
    # key it is not allowed to spell any other way.
    check-keys: false
