[FIX] caddy: support raspbian
This commit is contained in:
parent
92e056e341
commit
d49c15f4ef
|
@ -1,6 +1,12 @@
|
||||||
---
|
---
|
||||||
# Server/Caddyserver-Install: Install/Update Caddy Webserver (with some modules)
|
# Server/Caddyserver-Install: Install/Update Caddy Webserver (with some modules)
|
||||||
|
|
||||||
|
# Detect some more host facts
|
||||||
|
- name: caddyserver - Detect debian distributor ID
|
||||||
|
shell: lsb_release -is
|
||||||
|
register: lsb_id
|
||||||
|
|
||||||
|
|
||||||
- name: caddyserver - Stop caddy
|
- name: caddyserver - Stop caddy
|
||||||
become: yes
|
become: yes
|
||||||
service:
|
service:
|
||||||
|
@ -11,16 +17,20 @@
|
||||||
file:
|
file:
|
||||||
path: /tmp/caddy
|
path: /tmp/caddy
|
||||||
state: directory
|
state: directory
|
||||||
- name: caddyserver - Download caddy webserver
|
|
||||||
|
- name: caddyserver - Download caddy webserver (amd64)
|
||||||
get_url:
|
get_url:
|
||||||
url: https://caddyserver.com/download/linux/amd64?plugins=http.ratelimit&license=personal
|
url: "https://caddyserver.com/download/linux/amd64?plugins=http.ratelimit&license=personal"
|
||||||
dest: /tmp/caddy/caddy.tar.gz
|
dest: /tmp/caddy/caddy.tar.gz
|
||||||
|
when: lsb_id.stdout != "Raspbian"
|
||||||
|
- name: caddyserver - Download caddy webserver (raspberry pi)
|
||||||
|
get_url:
|
||||||
|
url: "https://caddyserver.com/download/linux/arm7?plugins=http.ratelimit&license=personal"
|
||||||
|
dest: /tmp/caddy/caddy.tar.gz
|
||||||
|
when: lsb_id.stdout == "Raspbian"
|
||||||
|
|
||||||
- name: caddyserver - Extract caddy
|
- name: caddyserver - Extract caddy
|
||||||
shell: "cd /tmp/caddy && tar -xvf caddy.tar.gz"
|
shell: "cd /tmp/caddy && tar -xvf caddy.tar.gz"
|
||||||
# unarchive:
|
|
||||||
# src: /tmp/caddy/caddy.tar.gz
|
|
||||||
# dest: /tmp/caddy
|
|
||||||
# copy: no
|
|
||||||
- name: caddyserver - Copy caddy to a PATH location
|
- name: caddyserver - Copy caddy to a PATH location
|
||||||
become: yes
|
become: yes
|
||||||
shell: "cp /tmp/caddy/caddy /usr/local/bin"
|
shell: "cp /tmp/caddy/caddy /usr/local/bin"
|
||||||
|
|
Loading…
Reference in a new issue