I am just starting with Ansible and how a question on how its best to approach installing (and updating) the CloudFlared Service.
To install CloudFlared, the instructions are:
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb &&
sudo dpkg -i cloudflared.deb &&
sudo cloudflared service install <key>
I have worked out how to download and install CloudFlared…
- name: Install Latest CloudFlared
ansible.builtin.apt:
deb: https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
But I am lost on how to call the cloudflared service install Can anyone help with this?
Also, I am assuming this will always download and install the package. Is this right?
I am trying to work out how to only install if the downloaded version is newer to avoid taking down the CloudFlared Service every time I run the playbook. Appreciate peoples thoughts on how to do this?