You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
704B

  1. {% from 'icinga2/map.jinja' import icinga2 with context %}
  2. include:
  3. {% if icinga2.salt_master_ca is True %}
  4. - icinga2.salt_master_ca_cert
  5. {% else %}
  6. - icinga2.pki.cert
  7. # Get master certificate from mine
  8. icinga2_node_master_cert:
  9. x509.pem_managed:
  10. - name: {{icinga2.pki_dir}}/trusted-master.crt
  11. - text: {{ salt['mine.get'](icinga2.master_minion_id, 'icinga2_master_cert')[icinga2.master_minion_id]|replace('\n', '') }}
  12. - require:
  13. - file: icinga2_pki_dir
  14. icinga2_node_master_cert_perms:
  15. file.managed:
  16. - name: {{icinga2.pki_dir}}/trusted-master.crt
  17. - user: {{icinga2.user}}
  18. - group: {{icinga2.group}}
  19. - watch:
  20. - x509: icinga2_node_master_cert
  21. {% endif %}