summaryrefslogtreecommitdiff
path: root/ansible/roles
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2020-01-06 15:39:29 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2020-01-06 15:39:29 +0100
commitc40ec1512b5a92f134d66de9c7a0fe8e1c523a11 (patch)
treea07fe1729bdd4c1328c8bf5ceb02137a84fadea8 /ansible/roles
parentfcd051d2caa1b478d4ee4b871c7bfce6e803a6dc (diff)
downloadinfra-c40ec1512b5a92f134d66de9c7a0fe8e1c523a11.tar.gz
infra-c40ec1512b5a92f134d66de9c7a0fe8e1c523a11.tar.bz2
infra-c40ec1512b5a92f134d66de9c7a0fe8e1c523a11.tar.xz
infra-c40ec1512b5a92f134d66de9c7a0fe8e1c523a11.zip
ansible/apt-repos: Adding dart.
* Adding example of better way to add repositories.
Diffstat (limited to 'ansible/roles')
-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 }}"