renamed customer user group

This commit is contained in:
ladislav.dusa
2025-04-16 15:27:19 +02:00
parent e6ab9ac621
commit f18365f184
2 changed files with 58 additions and 26 deletions

View File

@ -4,54 +4,87 @@
# vars:
# DOCKER_IMAGE: docker-tasmota
# FWS: tasmota
become: true
tasks:
- name: Pull tasmota
ansible.builtin.shell:
cmd: 'git config --global --add safe.directory /share/docker_data/docker-tasmota/Tasmota'
- name: Fetch tasmota
ansible.builtin.shell:
cmd: 'git fetch https://github.com/arendst/Tasmota.git {{ BRANCH }}'
chdir: /share/docker_data/docker-tasmota/Tasmota
- name: Change conf
community.general.git_config:
name: safe.director
scope: global
value: /share/docker_data/docker-tasmota/Tasmota
- name: Checkout tasmota branch
ansible.builtin.shell:
cmd: 'git checkout --force {{ BRANCH }}'
chdir: /share/docker_data/docker-tasmota/Tasmota
# - name: Pull tasmota
# ansible.builtin.shell:
# cmd: 'git config --global --add safe.directory /share/docker_data/docker-tasmota/Tasmota'
- name: Pull tasmota
ansible.builtin.shell:
cmd: 'git pull'
chdir: /share/docker_data/docker-tasmota/Tasmota
- name: Checkout a github repo and use refspec to fetch all pull requests
ansible.builtin.git:
repo: 'https://github.com/arendst/Tasmota.git'
dest: /share/docker_data/docker-tasmota/Tasmota
version: '{{ BRANCH }}'
# - name: Fetch tasmota
# ansible.builtin.shell:
# cmd: 'git fetch https://github.com/arendst/Tasmota.git {{ BRANCH }}'
# chdir: /share/docker_data/docker-tasmota/Tasmota
- name: Git checkout
ansible.builtin.git:
repo: 'https://github.com/arendst/Tasmota.git'
dest: /share/docker_data/docker-tasmota/Tasmota
version: '{{ BRANCH }}'
# - name: Checkout tasmota branch
# ansible.builtin.shell:
# cmd: 'git checkout --force {{ BRANCH }}'
# chdir: /share/docker_data/docker-tasmota/Tasmota
- name: Just get information about the repository whether or not it has already been cloned locally
ansible.builtin.git:
repo: https://github.com/arendst/Tasmota.git
dest: /share/docker_data/docker-tasmota/Tasmota
update: true
# - name: Pull tasmota
# ansible.builtin.shell:
# cmd: 'git pull'
# chdir: /share/docker_data/docker-tasmota/Tasmota
- name: Copy platformio_override
ansible.builtin.shell:
ansible.builtin.command:
cmd: 'cp platformio_override.ini Tasmota/platformio_override.ini'
chdir: /share/docker_data/docker-tasmota/
register: my_output
changed_when: my_output.rc != 0
- name: Copy user_config_override
ansible.builtin.shell:
ansible.builtin.command:
cmd: 'cp user_config_override.h Tasmota/tasmota/user_config_override.h'
chdir: /share/docker_data/docker-tasmota/
register: my_output
changed_when: my_output.rc != 0
- name: Build tasmota
ansible.builtin.shell:
cmd: 'docker run --rm -v /share/docker_data/docker-tasmota/Tasmota:/tasmota -u $UID:$GID {{ DOCKER_IMAGE }} -e {{ FWS }}'
ansible.builtin.command:
cmd: 'docker run --rm -v /share/docker_data/docker-tasmota/Tasmota:/tasmota -u 0:0 {{ DOCKER_IMAGE }} -e {{ FWS }}'
chdir: /share/docker_data/docker-tasmota/
when: FWS != "all"
register: my_output
changed_when: my_output.rc != 0
- name: Build tasmota
ansible.builtin.shell:
cmd: 'docker run --rm -v /share/docker_data/docker-tasmota/Tasmota:/tasmota -u $UID:$GID {{ DOCKER_IMAGE }}'
ansible.builtin.command:
cmd: 'docker run --rm -v /share/docker_data/docker-tasmota/Tasmota:/tasmota -u 0:0 {{ DOCKER_IMAGE }}'
chdir: /share/docker_data/docker-tasmota/
when: FWS == "all"
register: my_output
changed_when: my_output.rc != 0
- name: Create a directory if it does not exist
ansible.builtin.file:
path: /share/docker_data/webhub/fw/{{ BRANCH }}
state: directory
mode: '0755'
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 }}'
ansible.builtin.shell:
cmd: 'mv /share/docker_data/docker-tasmota/Tasmota/build_output/firmware/* /share/docker_data/webhub/fw/{{ BRANCH }}/'

View File

@ -122,4 +122,3 @@
poll: 0
when: inventory_hostname == 'nas.home.lan'
changed_when: my_output.rc != 0