mirror of
https://github.com/davestephens/ansible-nas
synced 2024-11-15 16:28:03 +00:00
ce21999f46
NOTE: The majority of traefik ports were totally broken and would never have worked. It should be the external port there, not the internal container port!. Port conflicts were fixed.
29 lines
895 B
YAML
29 lines
895 B
YAML
- name: Create Mosquitto Directories
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
mode: 0777
|
|
with_items:
|
|
- "{{ mosquitto_data_directory }}/config"
|
|
- "{{ mosquitto_data_directory }}/data"
|
|
- "{{ mosquitto_data_directory }}/log"
|
|
|
|
- name: Template mosquitto.conf
|
|
copy:
|
|
src: mosquitto/mosquitto.conf
|
|
dest: "{{ mosquitto_data_directory }}/config/mosquitto.conf"
|
|
|
|
- name: Create Mosquitto container
|
|
docker_container:
|
|
name: mosquitto
|
|
image: eclipse-mosquitto:latest
|
|
pull: true
|
|
volumes:
|
|
- "{{ mosquitto_data_directory }}/config/mosquitto.conf:/mosquitto/config/mosquitto.conf:rw"
|
|
- "{{ mosquitto_data_directory }}/data:/mosquitto/data:rw"
|
|
- "{{ mosquitto_data_directory }}/log:/mosquitto/log:rw"
|
|
ports:
|
|
- "{{ mosquitto_port_a }}:1883"
|
|
- "{{ mosquitto_port_b }}:9001"
|
|
restart_policy: unless-stopped
|
|
memory: 1g
|