cookiecutter-ansible-role-d.../ansible-role-{{cookiecutter.app_name}}/tasks/config.yml

24 lines
1010 B
YAML
Raw Permalink Normal View History

---
- 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:
2023-01-11 21:29:23 +01:00
- "{%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:
2023-01-11 21:29:23 +01:00
src: "{%raw%}{{{%endraw%} item {%raw%}}}{%endraw%}.j2"
2023-02-15 10:47:57 +01:00
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:
2023-01-12 13:31:07 +01:00
- {{ cookiecutter.app_name }}_configure