adding a update for cloudflare

This commit is contained in:
Justin 2025-01-25 19:11:29 +00:00
parent 3d1e5e403c
commit 267eecfda9
1 changed files with 28 additions and 0 deletions

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"