summaryrefslogtreecommitdiff
path: root/tasks/hugo_setup.yaml
diff options
context:
space:
mode:
authorheqnx <root@heqnx.com>2025-07-05 12:21:29 +0300
committerheqnx <root@heqnx.com>2025-07-05 12:21:29 +0300
commit9457306a881cfe476ee0abbdba4f6f1eaa80db9d (patch)
treea0051e68286eb93381a398d2681ec5a14f5c035e /tasks/hugo_setup.yaml
parent730705affa4407a9dee7c52e5deb825020da110d (diff)
downloadansible-icecast2-9457306a881cfe476ee0abbdba4f6f1eaa80db9d.tar.gz
ansible-icecast2-9457306a881cfe476ee0abbdba4f6f1eaa80db9d.zip
initial commit on a working icecast2 setup
Diffstat (limited to 'tasks/hugo_setup.yaml')
-rw-r--r--tasks/hugo_setup.yaml24
1 files changed, 24 insertions, 0 deletions
diff --git a/tasks/hugo_setup.yaml b/tasks/hugo_setup.yaml
new file mode 100644
index 0000000..475dc8c
--- /dev/null
+++ b/tasks/hugo_setup.yaml
@@ -0,0 +1,24 @@
+- name: download latest hugo .deb
+ shell: |
+ curl -sSL https://api.github.com/repos/gohugoio/hugo/releases |
+ awk -F '"' '/browser_download_url/ {print $4}' |
+ grep -i 'extended' |
+ grep -i 'linux-amd64' |
+ head -1
+ register: latest_hugo_url
+
+- name: download hugo .deb package
+ get_url:
+ url: "{{ latest_hugo_url.stdout }}"
+ dest: /tmp/hugo.deb
+ mode: '0644'
+
+- name: install hugo package
+ apt:
+ deb: /tmp/hugo.deb
+ state: present
+
+- name: remove hugo .deb package
+ file:
+ path: /tmp/hugo.deb
+ state: absent