85 lines
1.8 KiB
YAML
85 lines
1.8 KiB
YAML
# 2023-09-26
|
|
# Subtasks: common
|
|
---
|
|
|
|
- name: "[{{ stack_name }}]: Copy configurations"
|
|
ansible.builtin.copy:
|
|
backup: true
|
|
src: "{{ local_folder_conf }}"
|
|
dest: "{{ folder_remote_conf }}"
|
|
owner: "{{ puid }}"
|
|
group: "{{ guid }}"
|
|
mode: u=rw,g=r,o=r
|
|
when: stack_switch_conf |default(false)|bool == true
|
|
tags:
|
|
- stasks
|
|
- task
|
|
- conf
|
|
- copy
|
|
|
|
- name: "[{{ stack_name }}]: Copy envs"
|
|
ansible.builtin.copy:
|
|
backup: true
|
|
src: "{{ local_folder_envs }}"
|
|
dest: "{{ folder_remote_envs }}"
|
|
owner: "{{ puid }}"
|
|
group: "{{ guid }}"
|
|
mode: u=rw,g=r,o=r
|
|
when: stack_switch_envs |default(false)|bool == true
|
|
tags:
|
|
- stasks
|
|
- task
|
|
- envs
|
|
- copy
|
|
|
|
- name: "[{{ stack_name }}]: Copy datas"
|
|
ansible.builtin.copy:
|
|
backup: true
|
|
src: "{{ local_folder_datas }}"
|
|
dest: "{{ folder_remote_datas }}"
|
|
owner: "{{ puid }}"
|
|
group: "{{ guid }}"
|
|
mode: u=rw,g=r,o=r
|
|
when: stack_switch_datas |default(false)|bool == true
|
|
tags:
|
|
- stasks
|
|
- task
|
|
- datas
|
|
- copy
|
|
|
|
- name: "[{{ stack_name }}]: Copy secrets"
|
|
ansible.builtin.copy:
|
|
backup: true
|
|
src: "{{ local_folder_secrets }}"
|
|
dest: "{{ folder_remote_secrets }}"
|
|
owner: "{{ puid }}"
|
|
group: "{{ guid }}"
|
|
mode: u=rw,g=r,o=r
|
|
when: stack_switch_secrets |default(false)|bool == true
|
|
tags:
|
|
- stasks
|
|
- task
|
|
- secrets
|
|
- copy
|
|
|
|
- name: "[{{ stack_name }}]: Process templates"
|
|
ansible.builtin.template:
|
|
lstrip_blocks: true
|
|
trim_blocks: true
|
|
backup: yes
|
|
src: "{{ templates.local }}"
|
|
dest: "{{ templates.remote }}"
|
|
owner: "{{ puid }}"
|
|
group: "{{ guid }}"
|
|
mode: u=rw,g=r,o=r
|
|
with_items:
|
|
- "{{ stack_templates }}"
|
|
loop_control:
|
|
loop_var: templates
|
|
when: stack_switch_templates |default(false)|bool == true
|
|
tags:
|
|
- stasks
|
|
- task
|
|
- templates
|
|
- process
|