1
0

flatten hugo role settings dict

This commit is contained in:
cuqmbr 2025-06-24 13:24:52 +03:00
parent 6c1faffb65
commit ba6507e57c
Signed by: cuqmbr
GPG Key ID: 0AA446880C766199
3 changed files with 14 additions and 16 deletions

View File

@ -29,11 +29,10 @@ users:
cuqmbr.xyz_gitea-actions"
opendoas_settings: "permit nopass gitea-actions"
hugo_settings:
hugo_version: 0.147.9
homedir: /opt/hugo
git_repo: https://gitea.cuqmbr.xyz/cuqmbr/cuqmbr.xyz.git
git_commit: 5b894854d47b41996b1901fa257f8c2cad9224f9
hugo_version: 0.147.9
hugo_homedir: /opt/hugo
hugo_git_repo: https://gitea.cuqmbr.xyz/cuqmbr/cuqmbr.xyz.git
hugo_git_commit: 5b894854d47b41996b1901fa257f8c2cad9224f9
nginx_settings:
server_tokens: false

View File

@ -1,7 +1,6 @@
---
hugo_settings:
hugo_version: 0.147.9
homedir: /opt/hugo
git_repo: https://gitea.cuqmbr.xyz/cuqmbr/cuqmbr.xyz.git
git_commit: 5b894854d47b41996b1901fa257f8c2cad9224f9
hugo_version: 0.147.9
hugo_homedir: /opt/hugo
hugo_git_repo: https://gitea.cuqmbr.xyz/cuqmbr/cuqmbr.xyz.git
hugo_git_commit: 5b894854d47b41996b1901fa257f8c2cad9224f9

View File

@ -3,8 +3,8 @@
- name: Install hugo deb package from github.
ansible.builtin.apt:
deb: "https://github.com/gohugoio/hugo/releases/download\
/v{{ hugo_settings.hugo_version}}/\
hugo_{{ hugo_settings.hugo_version }}_linux-amd64.deb"
/v{{ hugo_version}}/\
hugo_{{ hugo_version }}_linux-amd64.deb"
state: present
- name: Install dependencies using apt.
@ -14,20 +14,20 @@
- name: Set hugo_source, hugo_compiled and hugo_deploy variables.
ansible.builtin.set_fact:
hugo_source: "{{ hugo_settings.homedir }}/src"
hugo_compiled: "{{ hugo_settings.homedir }}/compiled"
hugo_source: "{{ hugo_homedir }}/src"
hugo_compiled: "{{ hugo_homedir }}/compiled"
hugo_deploy: /var/www/hugo
- name: Clone hugo site git repository.
ansible.builtin.git:
clone: true
repo: "{{ hugo_settings.git_repo }}"
repo: "{{ hugo_git_repo }}"
force: true
recursive: true
single_branch: true
depth: 1
dest: "{{ hugo_source }}"
version: "{{ hugo_settings.git_commit }}"
version: "{{ hugo_git_commit }}"
- name: Create hugo site build directory.
ansible.builtin.file: