Getting started

Example inventory

To enable management of the Salt Master service, a given host needs to be added to the [debops_service_salt] Ansible inventory group:

[debops_service_salt]
hostname

Example playbook

If you are using this role without DebOps, here's an example Ansible playbook that uses the debops.salt role:

---

- name: Manage Salt Master service
  hosts: [ 'debops_service_salt' ]
  become: True

  environment: '{{ inventory__environment | d({})
                   | combine(inventory__group_environment | d({}))
                   | combine(inventory__host_environment  | d({})) }}'

  roles:

    - role: debops.keyring
      tags: [ 'role::keyring', 'skip::keyring', 'role::salt' ]
      keyring__dependent_apt_keys:
        - '{{ salt__keyring__dependent_apt_keys }}'

    - role: debops.apt_preferences
      tags: [ 'role::apt_preferences', 'skip::apt_preferences' ]
      apt_preferences__dependent_list:
        - '{{ salt__apt_preferences__dependent_list }}'

    - role: debops.etc_services
      tags: [ 'role::etc_services', 'skip::etc_services' ]
      etc_services__dependent_list:
        - '{{ salt__etc_services__dependent_list }}'

    - role: debops.python
      tags: [ 'role::python', 'skip::python' ]
      python__dependent_packages3:
        - '{{ salt__python__dependent_packages3 }}'
      python__dependent_packages2:
        - '{{ salt__python__dependent_packages2 }}'

    - role: debops.ferm
      tags: [ 'role::ferm', 'skip::ferm' ]
      ferm__dependent_rules:
        - '{{ salt__ferm__dependent_rules }}'

    - role: debops.salt
      tags: [ 'role::salt', 'skip::salt' ]