new role and FWCNs
This commit is contained in:
37
roles/reverseproxy/tasks/caddy_install.yml
Normal file
37
roles/reverseproxy/tasks/caddy_install.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
- name: Install dependencies
|
||||
apt:
|
||||
name:
|
||||
- curl
|
||||
- unzip
|
||||
- git
|
||||
- build-essential
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
||||
- name: Download xcaddy
|
||||
get_url:
|
||||
url: https://github.com/caddyserver/xcaddy/releases/download/v0.9.5/xcaddy_0.9.5_linux_amd64.tar.gz
|
||||
dest: /tmp/xcaddy.tar.gz
|
||||
|
||||
- name: Extract xcaddy
|
||||
unarchive:
|
||||
src: /tmp/xcaddy.tar.gz
|
||||
dest: /usr/local/bin/
|
||||
mode: 0755
|
||||
remote_src: yes
|
||||
|
||||
- name: Build Caddy with PowerDNS DNS plugin
|
||||
command: >
|
||||
xcaddy build
|
||||
--with github.com/caddy-dns/powerdns
|
||||
args:
|
||||
chdir: /usr/local/bin
|
||||
creates: /usr/local/bin/caddy-custom
|
||||
|
||||
- name: Move custom caddy binary
|
||||
copy:
|
||||
src: /usr/local/bin/caddy
|
||||
dest: /usr/local/bin/caddy
|
||||
mode: 0755
|
||||
remote_src: yes
|
||||
Reference in New Issue
Block a user