From c40ec1512b5a92f134d66de9c7a0fe8e1c523a11 Mon Sep 17 00:00:00 2001
From: Trygve Laugstøl <trygvis@inamo.no>
Date: Mon, 6 Jan 2020 15:39:29 +0100
Subject: ansible/apt-repos: Adding dart.

* Adding example of better way to add repositories.
---
 ansible/group_vars/all/apt-repos.yml         |  8 ++++++++
 ansible/group_vars/workstation/apt-repos.yml |  1 +
 ansible/requirements.txt                     |  2 +-
 ansible/roles/apt-repos/tasks/repo.yml       | 30 ++++++++++++++++++++++++++++
 4 files changed, 40 insertions(+), 1 deletion(-)

(limited to 'ansible')

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 }}"
-- 
cgit v1.2.3