Laur Ivan
bda1f187c5
Add multiple files copy via variables. Add service skeleton. Add image and port versions.
24 lines
1010 B
YAML
24 lines
1010 B
YAML
---
|
|
- name: "{{ cookiecutter.app_name | upper }} | Set up directories"
|
|
ansible.builtin.file:
|
|
state: directory
|
|
path: "{%raw%}{{{%endraw%} item }}"
|
|
owner: "{%raw%}{{{%endraw%} ansible_effective_user_id {%raw%}}}{%endraw%}"
|
|
group: "{%raw%}{{{%endraw%} ansible_effective_group_id {%raw%}}}{%endraw%}"
|
|
mode: "0750"
|
|
with_items:
|
|
- "{%raw%}{{{%endraw%} {{ cookiecutter.app_name }}_skeleton_paths {%raw%}}}{%endraw%}"
|
|
tags:
|
|
- {{ cookiecutter.app_name }}_configure
|
|
become: true
|
|
|
|
- name: "{{ cookiecutter.app_name | upper }} | Write configuration files"
|
|
ansible.builtin.template:
|
|
src: "{%raw%}{{{%endraw%} item {%raw%}}}{%endraw%}.j2"
|
|
dest: "{%raw%}{{{%endraw%} {{ cookiecutter.app_name }}_config_path | expanduser | realpath {%raw%}}}{%endraw%}/{%raw%}{{{%endraw%} item {%raw%}}}{%endraw%}"
|
|
mode: '0640'
|
|
with_items:
|
|
- "{%raw%}{{{%endraw%} {{ cookiecutter.app_name }}_configuration_files {%raw%}}}{%endraw%}"
|
|
tags:
|
|
- {{ cookiecutter.app_name }}_configure
|
|
|