users.conf.tmpl 494 B

123456789101112131415161718
  1. {% set users = salt['pillar.get']("monitoring:users", {}) %}
  2. {% for user,params in users.items()|sort %}
  3. object User "{{ user }}" {
  4. import "generic-user"
  5. {%- if "display_name" in params %}
  6. display_name = "{{ params['display_name'] }}"
  7. {%- endif %}
  8. {%- if "email" in params %}
  9. email = "{{ params['email'] }}"
  10. {%- endif %}
  11. {%- if "telegram_chat_id" in params %}
  12. vars.telegram_chat_id = "{{ params['telegram_chat_id'] }}"
  13. {%- endif %}
  14. }
  15. {% endfor %}