diff --git a/playbooks/filesystem/valkyrie/etc/apt/preferences.d/hugo.j2 b/playbooks/filesystem/valkyrie/etc/apt/preferences.d/hugo.j2 new file mode 100644 index 0000000..4b5ea09 --- /dev/null +++ b/playbooks/filesystem/valkyrie/etc/apt/preferences.d/hugo.j2 @@ -0,0 +1,3 @@ +Package: hugo +Pin: version {{ hugo_version }} +Pin-Priority: 999 diff --git a/playbooks/tasks/services/service/03-pod.d/www.yml b/playbooks/tasks/services/service/03-pod.d/www.yml index a0474f4..cb538eb 100644 --- a/playbooks/tasks/services/service/03-pod.d/www.yml +++ b/playbooks/tasks/services/service/03-pod.d/www.yml @@ -7,10 +7,17 @@ - name: Install hugo become_user: root apt: - deb: https://github.com/gohugoio/hugo/releases/download/v0.56.0/hugo_extended_0.56.0_Linux-64bit.deb + deb: https://github.com/gohugoio/hugo/releases/download/v{{ hugo_version }}/hugo_extended_{{ hugo_version }}_Linux-64bit.deb when: not hugo_path.stat.exists + - name: Pin hugo version + become_user: root + template: + src: "./filesystem/{{ ansible_hostname }}/etc/apt/preferences.d/hugo.j2" + dest: "/etc/apt/preferences.d/hugo" + mode: 0644 + - name: Clone website repository git: repo: https://gitlab.wojciechkozlowski.eu/wojtek/wojciechkozlowski.eu.git @@ -26,3 +33,5 @@ wojciechkozlowski_eu_git is changed become_user: "{{ service_user_name }}" + vars: + hugo_version: "0.56.0"