[c] update variables

This commit is contained in:
Sangelo 2024-03-05 09:33:28 +01:00
parent a671b243eb
commit f748900585
2 changed files with 16 additions and 8 deletions

View file

@ -1,7 +1,7 @@
# run compose task?
core_docker_compose: false
# the docker compose service's name
# the docker compose service's name (cosmetic)
core_docker_compose_name: "Docker Compose"
# create directories
@ -10,7 +10,7 @@ core_docker_compose_mkdir: false
core_docker_compose_dirs_mode: '0750'
# copy templates
core_docker_compose_cp_files: false
core_docker_compose_cp_templates: false
# chown templates with this value
core_docker_compose_templates_mode: '0650'
@ -19,4 +19,12 @@ core_docker_compose_mode: '0650'
# docker-compose.yml template source
core_docker_compose_file:
src: docker-compose.yml.j2
src: docker-compose.yml.j2
# compose users
core_docker_compose_dirs_user: "{{ core_docker_compose_user }}"
core_docker_compose_dirs_group: "{{ core_docker_compose_group }}"
core_docker_compose_template_user: "{{ core_docker_compose_user }}"
core_docker_compose_template_group: "{{ core_docker_compose_group }}"
core_docker_compose_compose_user: "{{ core_docker_compose_user }}"
core_docker_compose_compose_group: "{{ core_docker_compose_group }}"

View file

@ -4,8 +4,8 @@
ansible.builtin.file:
path: '{{ core_docker_compose_dirs_loop }}'
state: directory
owner: '{{ core_docker_compose_user }}'
group: '{{ core_docker_compose_group }}'
owner: '{{ core_docker_compose_dirs_user }}'
group: '{{ core_docker_compose_dirs_group }}'
mode: "{{ core_docker_compose_dirs_mode }}"
loop: '{{ core_docker_compose_dirs }}'
loop_control:
@ -16,13 +16,13 @@
ansible.builtin.template:
src: '{{ core_docker_compose_template_loop.src }}'
dest: '{{ core_docker_compose_template_loop.dest }}'
owner: '{{ core_docker_compose_user }}'
group: '{{ core_docker_compose_group }}'
owner: '{{ core_docker_compose_template_user }}'
group: '{{ core_docker_compose_template_group }}'
mode: '{{ core_docker_compose_templates_mode }}'
loop: '{{ core_docker_compose_templates }}'
loop_control:
loop_var: '{{ core_docker_compose_template_loop }}'
when: core_docker_compose_cp_files
when: core_docker_compose_cp_templates
- name: "Create docker-compose.yml for {{ core_docker_compose_name }}"
ansible.builtin.template: