Updateing
This commit is contained in:
1 parent
659d653e90
commit
6236bf6caa
3 files changed
+28
No files matched your search
@@ -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: cloudflaredfile
|
||||
|
||||
- name: Cleanup
|
||||
when: cloudflaredfile.stat.exists
|
||||
ansible.builtin.command:
|
||||
cmd: "rm cloudflared.deb"
|
||||
Reference in new issue
Block a user