2024-05-27 13:50:47 +02:00
|
|
|
- hosts: nas
|
|
|
|
name: Build tasmota
|
|
|
|
ignore_unreachable: false
|
2024-05-27 14:28:09 +02:00
|
|
|
# vars:
|
|
|
|
# DOCKER_IMAGE: docker-tasmota
|
|
|
|
# FWS: tasmota
|
2024-05-27 13:50:47 +02:00
|
|
|
tasks:
|
|
|
|
- name: Build tasmota
|
|
|
|
ansible.builtin.shell:
|
2024-05-27 14:39:37 +02:00
|
|
|
cmd: 'git fetch https://github.com/arendst/Tasmota.git {{ BRANCH }}'
|
2024-05-27 13:50:47 +02:00
|
|
|
chdir: /share/docker_data/docker-tasmota/Tasmota
|
2024-05-27 14:01:21 +02:00
|
|
|
when: inventory_hostname in groups['nas']
|
|
|
|
|
2024-05-27 14:12:51 +02:00
|
|
|
- name: Copy platformio_override
|
|
|
|
ansible.builtin.shell:
|
|
|
|
cmd: 'cp platformio_override.ini Tasmota/platformio_override.ini'
|
|
|
|
chdir: /share/docker_data/docker-tasmota/
|
|
|
|
when: inventory_hostname in groups['nas']
|
|
|
|
- name: Copy user_config_override
|
|
|
|
ansible.builtin.shell:
|
|
|
|
cmd: 'cp user_config_override.h Tasmota/tasmota/user_config_override.h'
|
|
|
|
chdir: /share/docker_data/docker-tasmota/
|
|
|
|
when: inventory_hostname in groups['nas']
|
2024-05-27 14:01:21 +02:00
|
|
|
- name: Build tasmota
|
|
|
|
ansible.builtin.shell:
|
2024-05-27 14:19:06 +02:00
|
|
|
cmd: '/share/ZFS530_DATA/.qpkg/container-station/bin/docker run --rm -v /share/docker_data/docker-tasmota/Tasmota:/tasmota -u $UID:$GID {{ DOCKER_IMAGE }} -e {{ FWS }}'
|
2024-05-27 14:01:21 +02:00
|
|
|
chdir: /share/docker_data/docker-tasmota/
|
2024-05-27 14:39:37 +02:00
|
|
|
when: FWS != "all"
|
|
|
|
- name: Build tasmota
|
|
|
|
ansible.builtin.shell:
|
|
|
|
cmd: '/share/ZFS530_DATA/.qpkg/container-station/bin/docker run --rm -v /share/docker_data/docker-tasmota/Tasmota:/tasmota -u $UID:$GID {{ DOCKER_IMAGE }}'
|
|
|
|
chdir: /share/docker_data/docker-tasmota/
|
|
|
|
when: FWS == "all"
|
2024-05-27 14:44:10 +02:00
|
|
|
- name: Create a directory if it does not exist
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: /share/docker_data/webhub/fw/{{ BRANCH }}
|
|
|
|
state: directory
|
|
|
|
mode: '0755'
|
|
|
|
- name: Build tasmota
|
|
|
|
ansible.builtin.shell:
|
2024-05-27 14:49:20 +02:00
|
|
|
cmd: 'mv /share/docker_data/docker-tasmota/Tasmota/build_output/firmware/* /share/docker_data/webhub/fw/{{ BRANCH }}'
|
2024-05-27 14:44:10 +02:00
|
|
|
when: inventory_hostname in groups['nas']
|