2023-05-25 20:02:32 +00:00
|
|
|
---
|
|
|
|
# https://www.jeffgeerling.com/blog/2022/aptkey-deprecated-debianubuntu-how-fix-ansible
|
|
|
|
- name: Add ntfy apt repository key.
|
|
|
|
ansible.builtin.get_url:
|
|
|
|
url: "{{ ntfy_repo_key_url }}"
|
|
|
|
dest: /usr/share/keyrings/archive.heckel.io.asc
|
|
|
|
mode: '0644'
|
|
|
|
# force: true
|
|
|
|
|
|
|
|
- name: Ensure the repository is added with the relevant trusted GPG key
|
|
|
|
ansible.builtin.lineinfile:
|
|
|
|
path: /etc/apt/sources.list.d/ntfy.list
|
|
|
|
line: deb [arch=amd64 signed-by=/usr/share/keyrings/archive.heckel.io.asc] https://archive.heckel.io/apt debian main
|
|
|
|
create: true
|
2023-05-29 16:15:02 +00:00
|
|
|
register: ntfy_repo
|
|
|
|
|
|
|
|
- name: Update the apt repository cache
|
|
|
|
ansible.builtin.apt:
|
|
|
|
update_cache: yes
|
|
|
|
when: ntfy_repo.changed
|
2023-05-25 20:02:32 +00:00
|
|
|
|
|
|
|
- name: Install the ntfy package
|
|
|
|
ansible.builtin.apt:
|
|
|
|
name: ntfy
|
2023-05-29 16:15:02 +00:00
|
|
|
state: latest
|