--- - name: Validate the role inputs ansible.builtin.import_tasks: validate.yml tags: [cloudflared, always] # The removal ends the role: none of the tasks below runs, so a removed daemon is not # installed and configured again in the same run. - name: Remove cloudflared (explicit only) ansible.builtin.include_tasks: remove.yml when: cloudflared_remove | bool tags: [cloudflared, remove] - name: Install, configure and update cloudflared when: not (cloudflared_remove | bool) block: - name: Include prerequisites ansible.builtin.include_tasks: prereqs.yml tags: [cloudflared, prereqs, always] - name: Install cloudflared if missing ansible.builtin.include_tasks: install.yml when: not __cloudflared_installed tags: [cloudflared, install] - name: Configure cloudflared ansible.builtin.include_tasks: configure.yml tags: [cloudflared, configure, health] - name: Ensure cloudflared is up-to-date ansible.builtin.include_tasks: update.yml when: cloudflared_update | bool tags: [cloudflared, update]