summaryrefslogtreecommitdiffstats
path: root/ansible/roles/docker/tasks/main.yml
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2018-03-06 14:07:16 +0100
committerHarald Welte <laforge@gnumonks.org>2018-03-16 09:18:11 +0000
commit196402ac657f86a94b86a12b07dfeaf7d3a0a273 (patch)
tree01a6a176682f16c1f519cd0573747979860406e1 /ansible/roles/docker/tasks/main.yml
parent07653276019511efe7e188a80c307225ac78230d (diff)
add ansible playbooks
Introduce playbooks to do: - setup-jenkins-slave - setup a usualy or special jenkins-slave - setup-gsm-tester - setup the gsm-tester Change-Id: I7007a4e6c38f73843390ec2b3b91133aff21e36a
Diffstat (limited to 'ansible/roles/docker/tasks/main.yml')
-rw-r--r--ansible/roles/docker/tasks/main.yml28
1 files changed, 28 insertions, 0 deletions
diff --git a/ansible/roles/docker/tasks/main.yml b/ansible/roles/docker/tasks/main.yml
new file mode 100644
index 0000000..1603175
--- /dev/null
+++ b/ansible/roles/docker/tasks/main.yml
@@ -0,0 +1,28 @@
+---
+
+- name: add https support
+ apt:
+ name: apt-transport-https
+ cache_valid_time: 3600
+ update_cache: yes
+
+- name: add docker gpg key to apt keyring
+ apt_key:
+ id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
+ url: https://download.docker.com/linux/debian/gpg
+
+- apt_repository:
+ repo: "deb https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable"
+ state: present
+ update_cache: yes
+ when: ansible_distribution == "Debian"
+
+- name: install docker
+ apt:
+ name: docker-ce
+
+- name: add jenkins to the docker group
+ user:
+ name: "{{ jenkins_user }}"
+ groups: docker
+ append: yes