mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2025-07-01 15:38:33 +02:00
renamed customer user group
This commit is contained in:
@ -4,47 +4,80 @@
|
|||||||
# vars:
|
# vars:
|
||||||
# DOCKER_IMAGE: docker-tasmota
|
# DOCKER_IMAGE: docker-tasmota
|
||||||
# FWS: tasmota
|
# FWS: tasmota
|
||||||
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: Pull tasmota
|
- name: Change conf
|
||||||
ansible.builtin.shell:
|
community.general.git_config:
|
||||||
cmd: 'git config --global --add safe.directory /share/docker_data/docker-tasmota/Tasmota'
|
name: safe.director
|
||||||
|
scope: global
|
||||||
|
value: /share/docker_data/docker-tasmota/Tasmota
|
||||||
|
|
||||||
- name: Fetch tasmota
|
# - name: Pull tasmota
|
||||||
ansible.builtin.shell:
|
# ansible.builtin.shell:
|
||||||
cmd: 'git fetch https://github.com/arendst/Tasmota.git {{ BRANCH }}'
|
# cmd: 'git config --global --add safe.directory /share/docker_data/docker-tasmota/Tasmota'
|
||||||
chdir: /share/docker_data/docker-tasmota/Tasmota
|
|
||||||
|
|
||||||
- name: Checkout tasmota branch
|
- name: Checkout a github repo and use refspec to fetch all pull requests
|
||||||
ansible.builtin.shell:
|
ansible.builtin.git:
|
||||||
cmd: 'git checkout --force {{ BRANCH }}'
|
repo: 'https://github.com/arendst/Tasmota.git'
|
||||||
chdir: /share/docker_data/docker-tasmota/Tasmota
|
dest: /share/docker_data/docker-tasmota/Tasmota
|
||||||
|
version: '{{ BRANCH }}'
|
||||||
|
|
||||||
- name: Pull tasmota
|
# - name: Fetch tasmota
|
||||||
ansible.builtin.shell:
|
# ansible.builtin.shell:
|
||||||
cmd: 'git pull'
|
# cmd: 'git fetch https://github.com/arendst/Tasmota.git {{ BRANCH }}'
|
||||||
chdir: /share/docker_data/docker-tasmota/Tasmota
|
# 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
|
- name: Copy platformio_override
|
||||||
ansible.builtin.shell:
|
ansible.builtin.command:
|
||||||
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/
|
||||||
|
register: my_output
|
||||||
|
changed_when: my_output.rc != 0
|
||||||
|
|
||||||
- name: Copy user_config_override
|
- name: Copy user_config_override
|
||||||
ansible.builtin.shell:
|
ansible.builtin.command:
|
||||||
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/
|
||||||
|
register: my_output
|
||||||
|
changed_when: my_output.rc != 0
|
||||||
|
|
||||||
- name: Build tasmota
|
- name: Build tasmota
|
||||||
ansible.builtin.shell:
|
ansible.builtin.command:
|
||||||
cmd: 'docker run --rm -v /share/docker_data/docker-tasmota/Tasmota:/tasmota -u $UID:$GID {{ DOCKER_IMAGE }} -e {{ FWS }}'
|
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/
|
chdir: /share/docker_data/docker-tasmota/
|
||||||
when: FWS != "all"
|
when: FWS != "all"
|
||||||
|
register: my_output
|
||||||
|
changed_when: my_output.rc != 0
|
||||||
|
|
||||||
- name: Build tasmota
|
- name: Build tasmota
|
||||||
ansible.builtin.shell:
|
ansible.builtin.command:
|
||||||
cmd: 'docker run --rm -v /share/docker_data/docker-tasmota/Tasmota:/tasmota -u $UID:$GID {{ DOCKER_IMAGE }}'
|
cmd: 'docker run --rm -v /share/docker_data/docker-tasmota/Tasmota:/tasmota -u 0:0 {{ DOCKER_IMAGE }}'
|
||||||
chdir: /share/docker_data/docker-tasmota/
|
chdir: /share/docker_data/docker-tasmota/
|
||||||
when: FWS == "all"
|
when: FWS == "all"
|
||||||
|
register: my_output
|
||||||
|
changed_when: my_output.rc != 0
|
||||||
|
|
||||||
- name: Create a directory if it does not exist
|
- name: Create a directory if it does not exist
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@ -54,4 +87,4 @@
|
|||||||
|
|
||||||
- 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 }}/'
|
||||||
|
@ -122,4 +122,3 @@
|
|||||||
poll: 0
|
poll: 0
|
||||||
when: inventory_hostname == 'nas.home.lan'
|
when: inventory_hostname == 'nas.home.lan'
|
||||||
changed_when: my_output.rc != 0
|
changed_when: my_output.rc != 0
|
||||||
|
|
Reference in New Issue
Block a user