-
Notifications
You must be signed in to change notification settings - Fork 1
/
dockerEE_ubuntu.yml
60 lines (48 loc) · 1.5 KB
/
dockerEE_ubuntu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
- hosts: ubuntuaws2
gather_facts: no
vars_files:
- dockerEE_creds.yml
tasks:
- name: apt-get update (cache age is checked)
apt:
update_cache: yes
cache_valid_time: 3600
- name: install package apt-transport-https
apt:
name: apt-transport-https
state: present
- name: install package ca-certificates
apt:
name: ca-certificates
state: present
- name: install package curl
apt:
name: curl
state: present
- name: install package software-properties-common
apt:
name: software-properties-common
state: present
- name: add Docker official GPG key using Docker EE repository URL # have to use --become in ansible-playbook as this command does not seem to support become ??
apt_key:
url: "{{ DOCKER_EE_URL }}/ubuntu/gpg"
state: present
- name: check GPG key
command: apt-key fingerprint 6D085F96
become: yes
register: aptkey
- debug: var=aptkey.stdout_lines
## short term - hard coded result of $(lsb_release -cs) = xenial
- name: add stable repository
apt_repository:
repo: deb [arch=amd64] {{ DOCKER_EE_URL }}/ubuntu xenial {{ DOCKER_EE_VERSION }}
state: present
- debug: var=addrepo.stdout_lines
- name: run apt-get update
apt:
update_cache: yes
- name: install docker-ee
apt:
name: docker-ee
state: present