adding a update for cloudflare
This commit is contained in:
1 parent
3d1e5e403c
commit
267eecfda9
1 file changed
+28
@@ -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"
|
||||
Reference in new issue
Block a user