38 lines
840 B
YAML
38 lines
840 B
YAML
---
|
|
- name: Create Hugo directory
|
|
file:
|
|
path: "{{ hugo_folder_name }}"
|
|
state: directory
|
|
owner: "{{ base_user_name }}"
|
|
group: "{{ base_user_name }}"
|
|
mode: 0755
|
|
|
|
- name: Copy Hugo Compose file
|
|
template:
|
|
src: docker-compose.yml.j2
|
|
# Remove .j2 extension
|
|
dest: "{{ hugo_folder_name }}/docker-compose.yml"
|
|
owner: "{{ base_user_name }}"
|
|
group: "{{ base_user_name }}"
|
|
mode: 0644
|
|
|
|
- name: Clone blog
|
|
ansible.builtin.git:
|
|
repo: "{{ repository_url }}"
|
|
dest: "{{ hugo_website }}"
|
|
force: yes
|
|
ignore_errors: yes
|
|
|
|
- name: Pull new stuff
|
|
shell:
|
|
cmd: git pull
|
|
chdir: "{{ hugo_website }}"
|
|
|
|
- name: Ensure container is up to date
|
|
community.docker.docker_compose:
|
|
project_src: "{{ hugo_folder_name }}"
|
|
remove_orphans: yes
|
|
pull: yes
|
|
recreate: smart
|
|
state: present
|