--- - name: Remove old configs SolidWall ansible.builtin.file: path: /etc/apt/sources.list.d/solidwall.list state: absent - name: Add SolidWall repo ansible.builtin.shell: | curl -fsSL https://repo.solidwall.io | TOKEN={{ solidwall_token }} sh - args: creates: /etc/apt/sources.list.d/solidwall.list register: repo_result changed_when: repo_result.rc == 0 - name: Update cache ansible.builtin.apt: update_cache: true when: repo_result.changed ...