ansible-roles/newrelic/tasks/sources.yml
Jérémy Lecour 29ec7bdcf2
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
Remove embedded GPG keys only if legacy keyring is present
2021-07-04 22:08:47 +02:00

30 lines
636 B
YAML

---
- name: Look for legacy apt keyring
stat:
path: /etc/apt/trusted.gpg
register: _trusted_gpg_keyring
- name: NewRelic embedded GPG key is absent
apt_key:
id: "548C16BF"
keyring: /etc/apt/trusted.gpg
state: absent
when: _trusted_gpg_keyring.stat.exists
- name: Add NewRelic GPG key
copy:
src: newrelic.asc
dest: /etc/apt/trusted.gpg.d/newrelic.asc
force: yes
mode: "0644"
owner: root
group: root
- name: Install NewRelic repository
apt_repository:
repo: "deb http://apt.newrelic.com/debian/ newrelic non-free"
state: present
filename: newrelic
update_cache: yes