summaryrefslogtreecommitdiff
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
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.
-rw-r--r--ansible/group_vars/all/apt-repos.yml8
-rw-r--r--ansible/group_vars/workstation/apt-repos.yml1
-rw-r--r--ansible/requirements.txt2
-rw-r--r--ansible/roles/apt-repos/tasks/repo.yml30
4 files changed, 40 insertions, 1 deletions
diff --git a/ansible/group_vars/all/apt-repos.yml b/ansible/group_vars/all/apt-repos.yml
index 4ce968a..bf820d8 100644
--- a/ansible/group_vars/all/apt-repos.yml
+++ b/ansible/group_vars/all/apt-repos.yml
@@ -135,3 +135,11 @@ apt_repos:
keyserver: hkp://keyserver.ubuntu.com:80
filename: apt_postgresql_org_pub_repos_apt.list
state: "{{ apt_repos_postgresql_state | default('absent') }}"
+
+ dart_stable:
+ url: https://storage.googleapis.com/download.dartlang.org/linux/debian
+ distro: stable
+ sections: main
+ key_id: EB4C1BFD4F042F6DDDCCEC917721F63BD38B4796
+ key_url: https://dl.google.com/linux/linux_signing_key.pub
+ state: "{{ apt_repos_dart_state | default('absent') }}"
diff --git a/ansible/group_vars/workstation/apt-repos.yml b/ansible/group_vars/workstation/apt-repos.yml
index d686f05..1d7285f 100644
--- a/ansible/group_vars/workstation/apt-repos.yml
+++ b/ansible/group_vars/workstation/apt-repos.yml
@@ -1,4 +1,5 @@
apt_repos_atom_state: present
+apt_repos_dart_state: present
apt_repos_docker_state: present
apt_repos_dropbox_state: present
apt_repos_google_cloud_sdk_state: present
diff --git a/ansible/requirements.txt b/ansible/requirements.txt
index 0aa1f77..4375bc0 100644
--- a/ansible/requirements.txt
+++ b/ansible/requirements.txt
@@ -1 +1 @@
-mitogen==0.2.8
+mitogen==0.2.9
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 }}"