42 lines
978 B
YAML
42 lines
978 B
YAML
|
---
|
||
|
- name: Create Grav directory
|
||
|
file:
|
||
|
path: "{{ grav_folder_name }}"
|
||
|
state: directory
|
||
|
owner: "{{ base_user_name }}"
|
||
|
group: "{{ base_user_name }}"
|
||
|
mode: 0755
|
||
|
|
||
|
- name: Copy Grav templates
|
||
|
template:
|
||
|
src: "{{ item }}"
|
||
|
# Remove .j2 extension
|
||
|
dest: "{{ grav_folder_name }}/{{ (item | splitext)[0] }}"
|
||
|
owner: "{{ base_user_name }}"
|
||
|
group: "{{ base_user_name }}"
|
||
|
mode: 0644
|
||
|
loop:
|
||
|
- docker-compose.yml.j2
|
||
|
- Dockerfile.j2
|
||
|
|
||
|
- name: Copy Grav entrypoint
|
||
|
copy:
|
||
|
src: entrypoint.sh
|
||
|
dest: "{{ grav_folder_name }}/entrypoint.sh"
|
||
|
owner: "{{ base_user_name }}"
|
||
|
group: "{{ base_user_name }}"
|
||
|
mode: 0644
|
||
|
|
||
|
- name: Build Grav
|
||
|
community.docker.docker_compose:
|
||
|
project_src: "{{ grav_folder_name }}"
|
||
|
build: yes
|
||
|
|
||
|
- name: Ensure container is up to date
|
||
|
community.docker.docker_compose:
|
||
|
project_src: "{{ traefik_folder_name }}"
|
||
|
remove_orphans: yes
|
||
|
pull: yes
|
||
|
recreate: smart
|
||
|
state: present
|