From 21cc52e300a50520f21ea11f7710a6bc132bef89 Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Fri, 13 Jan 2023 21:10:50 -0800 Subject: ansible: install cloudflared as a service --- clarkzjw.cc/config/atlas/ansible/roles/cloudflared/defaults/main.yaml | 1 + clarkzjw.cc/config/atlas/ansible/roles/cloudflared/tasks/main.yaml | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 clarkzjw.cc/config/atlas/ansible/roles/cloudflared/defaults/main.yaml (limited to 'clarkzjw.cc/config') diff --git a/clarkzjw.cc/config/atlas/ansible/roles/cloudflared/defaults/main.yaml b/clarkzjw.cc/config/atlas/ansible/roles/cloudflared/defaults/main.yaml new file mode 100644 index 0000000..6a7efc4 --- /dev/null +++ b/clarkzjw.cc/config/atlas/ansible/roles/cloudflared/defaults/main.yaml @@ -0,0 +1 @@ +cloudflare_atlas_tunnel_token: "{{ lookup('env', 'CLOUDFLARE_ATLAS_TUNNEL_TOKEN') }}" diff --git a/clarkzjw.cc/config/atlas/ansible/roles/cloudflared/tasks/main.yaml b/clarkzjw.cc/config/atlas/ansible/roles/cloudflared/tasks/main.yaml index 4d36b58..1648bc6 100644 --- a/clarkzjw.cc/config/atlas/ansible/roles/cloudflared/tasks/main.yaml +++ b/clarkzjw.cc/config/atlas/ansible/roles/cloudflared/tasks/main.yaml @@ -14,3 +14,7 @@ name: - cloudflared update_cache: true + +- name: Install Cloudflared as system service + shell: | + sudo cloudflared service install {{ cloudflare_atlas_tunnel_token }} -- cgit v1.2.3