Forked from
infrastruktur / ansible-warpzone
646 commits behind the upstream repository.
-
Jannik Berges authoredJannik Berges authored
main.yml 1.86 KiB
---
- include_tasks: ../functions/get_secret.yml
with_items:
- { path: "{{ basedir }}/wlan_pass", length: -1 }
- name: "create folder struct for {{ servicename }}"
file:
path: "{{ item }}"
state: "directory"
with_items:
- "{{ basedir }}/"
- "{{ basedir }}/config/"
- "{{ basedir }}/config/components/"
- "{{ basedir }}/config/components/frekvens_panel/"
- name: "copy files for {{ servicename }}"
copy:
src: "{{ item }}"
dest: "{{ basedir }}/{{ item }}"
with_items:
- config/04B03.ttf
- config/C64_Pro_Mono-STYLE.ttf
- config/tall-pixel-8x3.ttf
- config/tall-pixel-edit.ttf
- config/frekvens-dot.ttf
register: config
- name: "create config files for {{ servicename }}"
template:
src: "{{ item }}"
dest: "{{ basedir }}/{{ item }}"
with_items:
- docker-compose.yml
- compile.sh
- config/esphome_alarm.yaml
- config/esphome_dach.yaml
- config/esphome_display01.yaml
- config/esphome_display02.yaml
- config/esphome_display03.yaml
- config/esphome_feinstaub01.yaml
- config/esphome_hauptraum.yaml
- config/esphome_holzwerkstatt.yaml
- config/esphome_kamin.yaml
- config/esphome_kuehlschrank.yaml
- config/esphome_lounge.yaml
- config/esphome_luftfilter01.yaml
- config/esphome_status.yaml
- config/esphome_vortragsraum.yaml
- config/esphome_plug01.yaml
- config/esphome_plug02.yaml
- config/esphome_plug03.yaml
- config/esphome_plug04.yaml
- config/esphome_plug05.yaml
- config/esphome_plug06.yaml
- config/esphome_plug07.yaml
- config/esphome_plug08.yaml
register: config
- name: "stop {{ servicename }} docker"
docker_compose:
project_src: "{{ basedir }}"
state: absent
when: config.changed
- name: "start {{ servicename }} docker"
docker_compose:
project_src: "{{ basedir }}"
state: present