summaryrefslogtreecommitdiff
path: root/roles/mosquitto/client/tasks/main.yml
blob: f7463e2a063ed1da63af38787b147b9a59d5fade (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
---
- name: install mosquitto
  apt:
    name:
    - mosquitto-clients
    state: present

- name: generate/install/fetch TLS certificate
  loop: "{{ mosquitto_client_tls | dict2items }}"
  loop_control:
    label: "{{ item.key }}"
  vars:
    x509_certificate_name: "mosquitto-client-{{ item.key }}"
    x509_certificate_hostnames: []
    x509_certificate_config: "{{ item.value.certificate_config }}"
  include_role:
    name: "x509/{{ item.value.certificate_provider }}/cert"