adding a update for cloudflare

This commit is contained in:
Justin committed 2025-01-25 19:11:29 +00:00
1 parent 3d1e5e403c
commit 267eecfda9
1 file changed
+28
+28
View File
@@ -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"