diff --git a/playbooks/build_tasmota_v2.yml b/playbooks/build_tasmota_v2.yml index 4d02fab..69edf4f 100755 --- a/playbooks/build_tasmota_v2.yml +++ b/playbooks/build_tasmota_v2.yml @@ -9,47 +9,45 @@ ansible.builtin.shell: cmd: 'git fetch https://github.com/arendst/Tasmota.git {{ BRANCH }}' chdir: /share/docker_data/docker-tasmota/Tasmota - when: inventory_hostname in groups['nas'] + - name: Checkout tasmota branch ansible.builtin.shell: cmd: 'git checkout --force {{ BRANCH }}' chdir: /share/docker_data/docker-tasmota/Tasmota - when: inventory_hostname in groups['nas'] - name: Pull tasmota ansible.builtin.shell: cmd: 'git pull' chdir: /share/docker_data/docker-tasmota/Tasmota - when: inventory_hostname in groups['nas'] - - - 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'] + - 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 }} -e {{ FWS }}' chdir: /share/docker_data/docker-tasmota/ 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" + - 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: cmd: 'mv /share/docker_data/docker-tasmota/Tasmota/build_output/firmware/* /share/docker_data/webhub/fw/{{ BRANCH }}' - when: inventory_hostname in groups['nas'] \ No newline at end of file