From 267eecfda9740ebc7bcf4b6e84d5651050ed1e43 Mon Sep 17 00:00:00 2001 From: Justin Date: Sat, 25 Jan 2025 19:11:29 +0000 Subject: [PATCH] adding a update for cloudflare --- update-cloudflace-tunnel.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 update-cloudflace-tunnel.yaml diff --git a/update-cloudflace-tunnel.yaml b/update-cloudflace-tunnel.yaml new file mode 100644 index 0000000..3d1fb6e --- /dev/null +++ b/update-cloudflace-tunnel.yaml @@ -0,0 +1,28 @@ +--- +- name: Update cloud Flare Tunnel + hosts: cloudflare-tunnel.ki5bhv.com + + tasks: + - name: Pull the newest package + ansible.builtin.command: + cmd: "curl --location --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb" + + - name: installing package + become: true + ansible.builtin.command: + cmd: "dpkg -i cloudflared.deb" + + - name: Restart the service + become: true + ansible.builtin.command: + cmd: "systemctl restart cloudflared.service" + + - name: check before cleanup + ansible.builtin.stat: + path: cloudflared.deb + register: cloudflared-file + + - name: Cleanup + when: cloudflared-file.stat.exists + ansible.builtin.command: + cmd: "rm cloudflared.deb" \ No newline at end of file