This commit is contained in:
parent
449c347b9d
commit
24fd482fd4
@ -36,7 +36,6 @@ mosquitto_acl_file: "{{ mosquitto_base_dir }}/aclfile"
|
|||||||
# acl_topic: my/devices
|
# acl_topic: my/devices
|
||||||
# acl_policy: readwrite
|
# acl_policy: readwrite
|
||||||
|
|
||||||
|
|
||||||
mosquitto_tls_enabled: False
|
mosquitto_tls_enabled: False
|
||||||
mosquitto_tls_ciphers:
|
mosquitto_tls_ciphers:
|
||||||
- DEFAULT
|
- DEFAULT
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
# Standards: 0.1
|
||||||
---
|
---
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
author: xoxys
|
author: xoxys
|
||||||
@ -5,9 +6,9 @@ galaxy_info:
|
|||||||
license: MIT
|
license: MIT
|
||||||
min_ansible_version: 2.4
|
min_ansible_version: 2.4
|
||||||
platforms:
|
platforms:
|
||||||
- name: EL
|
- name: EL
|
||||||
versions:
|
versions:
|
||||||
- 7
|
- 7
|
||||||
galaxy_tags:
|
galaxy_tags:
|
||||||
- mosquitto
|
- mosquitto
|
||||||
- mqtt
|
- mqtt
|
||||||
|
@ -1,38 +1,38 @@
|
|||||||
---
|
---
|
||||||
- block:
|
- block:
|
||||||
- name: Create tls folder structure
|
- name: Create tls folder structure
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
recurse: True
|
recurse: True
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ mosquitto_tls_cert_path | dirname }}"
|
- "{{ mosquitto_tls_cert_path | dirname }}"
|
||||||
- "{{ mosquitto_tls_key_path | dirname }}"
|
- "{{ mosquitto_tls_key_path | dirname }}"
|
||||||
|
|
||||||
- name: Copy certs and private key (file)
|
- name: Copy certs and private key (file)
|
||||||
copy:
|
copy:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
mode: "{{ item.mode }}"
|
mode: "{{ item.mode }}"
|
||||||
with_items:
|
with_items:
|
||||||
- { src: "{{ mosquitto_tls_key_source }}", dest: '{{ mosquitto_tls_key_path }}', mode: '0600' }
|
- { src: "{{ mosquitto_tls_key_source }}", dest: '{{ mosquitto_tls_key_path }}', mode: '0600' }
|
||||||
- { src: "{{ mosquitto_tls_cert_source }}", dest: '{{ mosquitto_tls_cert_path }}', mode: '0750' }
|
- { src: "{{ mosquitto_tls_cert_source }}", dest: '{{ mosquitto_tls_cert_path }}', mode: '0750' }
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.dest }}"
|
label: "{{ item.dest }}"
|
||||||
when: mosquitto_tls_source_use_files
|
when: mosquitto_tls_source_use_files
|
||||||
|
|
||||||
- name: Copy certs and private key (content)
|
- name: Copy certs and private key (content)
|
||||||
copy:
|
copy:
|
||||||
content: "{{ item.src }}"
|
content: "{{ item.src }}"
|
||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
mode: "{{ item.mode }}"
|
mode: "{{ item.mode }}"
|
||||||
with_items:
|
with_items:
|
||||||
- { src: "{{ mosquitto_tls_key_source }}", dest: '{{ mosquitto_tls_key_path }}', mode: '0600' }
|
- { src: "{{ mosquitto_tls_key_source }}", dest: '{{ mosquitto_tls_key_path }}', mode: '0600' }
|
||||||
- { src: "{{ mosquitto_tls_cert_source }}", dest: '{{ mosquitto_tls_cert_path }}', mode: '0750' }
|
- { src: "{{ mosquitto_tls_cert_source }}", dest: '{{ mosquitto_tls_cert_path }}', mode: '0750' }
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.dest }}"
|
label: "{{ item.dest }}"
|
||||||
when: mosquitto_tls_source_use_content
|
when: mosquitto_tls_source_use_content
|
||||||
become: True
|
become: True
|
||||||
become_user: root
|
become_user: root
|
||||||
|
Loading…
Reference in New Issue
Block a user