summaryrefslogtreecommitdiff
path: root/ansible/roles/apt-repos/tasks/repo.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/apt-repos/tasks/repo.yml')
-rw-r--r--ansible/roles/apt-repos/tasks/repo.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/ansible/roles/apt-repos/tasks/repo.yml b/ansible/roles/apt-repos/tasks/repo.yml
index 9554796..ff9d6e5 100644
--- a/ansible/roles/apt-repos/tasks/repo.yml
+++ b/ansible/roles/apt-repos/tasks/repo.yml
@@ -1,3 +1,33 @@
+# - become: yes
+# name: Check if elasticsearch PGP key is installed
+# command: apt-key export 46095ACC8548582C1A2699A9D27D666CD88E42B4
+# register: elasticsearch_pgp_key
+# failed_when: no
+# changed_when: no
+#
+# - set_fact:
+# pgp_missing: "{{ 'nothing exported' in elasticsearch_pgp_key.stderr }}"
+#
+# - name: Download ES PGP key
+# become: yes
+# get_url:
+# url: https://artifacts.elastic.co/GPG-KEY-elasticsearch
+# dest: /tmp/es.pgp
+# when: pgp_missing
+#
+# - name: Install ES key
+# become: yes
+# command: apt-key add /tmp/es.pgp
+# when: pgp_missing
+# notify: apt update
+#
+# - name: rm /tmp/es.pgp
+# become: yes
+# file:
+# path: /tmp/es.pgp
+# state: absent
+# when: pgp_missing
+
- name: "apt-key add {{ item.key }} (key url)"
apt_key:
id: "{{ item.value.key_id }}"