Refactored use of variables

This commit is contained in:
2023-12-05 18:45:26 +01:00
parent 5ca94d6ecc
commit 3b06b5bcf4
50 changed files with 107 additions and 102 deletions

View File

@@ -8,20 +8,20 @@
- name: register directory
stat:
path: "{{docker_compose_akaunting_path}}"
register: docker_compose_akaunting_path_register
path: "{{docker_compose_instance_directory}}"
register: docker_compose_instance_directory_register
- name: checkout repository
ansible.builtin.shell: git checkout .
become: true
args:
chdir: "{{docker_compose_akaunting_path}}"
when: docker_compose_akaunting_path_register.stat.exists
chdir: "{{docker_compose_instance_directory}}"
when: docker_compose_instance_directory_register.stat.exists
- name: pull docker repository
git:
repo: "https://github.com/akaunting/docker.git"
dest: "{{docker_compose_akaunting_path}}"
dest: "{{docker_compose_instance_directory}}"
update: yes
notify: setup akaunting
become: true
@@ -37,12 +37,12 @@
ansible.builtin.shell: find . -type f -exec sed -i 's/akaunting:latest/akaunting:{{akaunting_version}}/' {} + && find . -type f -exec sed -i 's/version=latest/version={{akaunting_version}}/' {} +
become: true
args:
chdir: "{{docker_compose_akaunting_path}}"
chdir: "{{docker_compose_instance_directory}}"
- name: configure db.env
template: src=db.env.j2 dest={{docker_compose_akaunting_path}}/env/db.env
template: src=db.env.j2 dest={{docker_compose_instance_directory}}/env/db.env
notify: setup akaunting
- name: configure run.env
template: src=run.env.j2 dest={{docker_compose_akaunting_path}}/env/run.env
template: src=run.env.j2 dest={{docker_compose_instance_directory}}/env/run.env
notify: setup akaunting