ansible-roles/newrelic/tasks/sources.yml
Jérémy Lecour 83705a48b8
All checks were successful
continuous-integration/drone/push Build is passing
remove key from trusted.gpg only if file is present
2021-05-06 10:42:12 +02:00

27 lines
564 B
YAML

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