Compare commits

..

3 Commits

Author SHA1 Message Date
jaydee
195e227c69 initial 2024-12-29 22:52:32 +01:00
jaydee
a6b4adb7d1 initial 2024-12-29 22:46:01 +01:00
jaydee
b671f8b37b initial 2024-12-29 22:45:43 +01:00

View File

@ -1,4 +1,4 @@
- hosts: nas - hosts: m-server.home.lan
name: Build tasmota name: Build tasmota
ignore_unreachable: false ignore_unreachable: false
# vars: # vars:
@ -9,47 +9,45 @@
ansible.builtin.shell: ansible.builtin.shell:
cmd: 'git fetch https://github.com/arendst/Tasmota.git {{ BRANCH }}' cmd: 'git fetch https://github.com/arendst/Tasmota.git {{ BRANCH }}'
chdir: /share/docker_data/docker-tasmota/Tasmota chdir: /share/docker_data/docker-tasmota/Tasmota
when: inventory_hostname in groups['nas']
- name: Checkout tasmota branch - name: Checkout tasmota branch
ansible.builtin.shell: ansible.builtin.shell:
cmd: 'git checkout --force {{ BRANCH }}' cmd: 'git checkout --force {{ BRANCH }}'
chdir: /share/docker_data/docker-tasmota/Tasmota chdir: /share/docker_data/docker-tasmota/Tasmota
when: inventory_hostname in groups['nas']
- name: Pull tasmota - name: Pull tasmota
ansible.builtin.shell: ansible.builtin.shell:
cmd: 'git pull' cmd: 'git pull'
chdir: /share/docker_data/docker-tasmota/Tasmota chdir: /share/docker_data/docker-tasmota/Tasmota
when: inventory_hostname in groups['nas']
- name: Copy platformio_override - name: Copy platformio_override
ansible.builtin.shell: ansible.builtin.shell:
cmd: 'cp platformio_override.ini Tasmota/platformio_override.ini' cmd: 'cp platformio_override.ini Tasmota/platformio_override.ini'
chdir: /share/docker_data/docker-tasmota/ chdir: /share/docker_data/docker-tasmota/
when: inventory_hostname in groups['nas']
- name: Copy user_config_override - name: Copy user_config_override
ansible.builtin.shell: ansible.builtin.shell:
cmd: 'cp user_config_override.h Tasmota/tasmota/user_config_override.h' cmd: 'cp user_config_override.h Tasmota/tasmota/user_config_override.h'
chdir: /share/docker_data/docker-tasmota/ chdir: /share/docker_data/docker-tasmota/
when: inventory_hostname in groups['nas']
- name: Build tasmota - name: Build tasmota
ansible.builtin.shell: 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 }}' 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/ chdir: /share/docker_data/docker-tasmota/
when: FWS != "all" when: FWS != "all"
- name: Build tasmota - name: Build tasmota
ansible.builtin.shell: 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 }}' 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/ chdir: /share/docker_data/docker-tasmota/
when: FWS == "all" when: FWS == "all"
- name: Create a directory if it does not exist - name: Create a directory if it does not exist
ansible.builtin.file: ansible.builtin.file:
path: /share/docker_data/webhub/fw/{{ BRANCH }} path: /share/docker_data/webhub/fw/{{ BRANCH }}
state: directory state: directory
mode: '0755' mode: '0755'
- name: Build tasmota - name: Build tasmota
ansible.builtin.shell: ansible.builtin.shell:
cmd: 'mv /share/docker_data/docker-tasmota/Tasmota/build_output/firmware/* /share/docker_data/webhub/fw/{{ BRANCH }}' cmd: 'mv /share/docker_data/docker-tasmota/Tasmota/build_output/firmware/* /share/docker_data/webhub/fw/{{ BRANCH }}'
when: inventory_hostname in groups['nas']