From c40ec1512b5a92f134d66de9c7a0fe8e1c523a11 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 6 Jan 2020 15:39:29 +0100 Subject: ansible/apt-repos: Adding dart. * Adding example of better way to add repositories. --- ansible/roles/apt-repos/tasks/repo.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'ansible/roles') 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 }}" -- cgit v1.2.3