blob: 1b738d5f1fe791d81aa527bdc551daec306f2a72 [file] [log] [blame]
Zack Williams537bf9c2018-04-02 11:55:04 -07001---
Jonathan Hart93956f52017-08-22 13:12:42 -07002# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
Zack Williams642388d2017-04-12 22:39:15 -070016- name: Prereqs and SSL support for apt for SSL
David K. Bainbridge317e7d72016-05-11 08:31:44 -070017 become: yes
Zack Williams642388d2017-04-12 22:39:15 -070018 apt:
19 name: "{{ item }}"
20 update_cache: yes
21 cache_valid_time: 3600
David K. Bainbridge317e7d72016-05-11 08:31:44 -070022 with_items:
Zack Williams642388d2017-04-12 22:39:15 -070023 - apt-transport-https
24 - ca-certificates
25 - python-pip
David K. Bainbridge317e7d72016-05-11 08:31:44 -070026
27- name: Docker Apt Key
28 become: yes
29 apt_key:
Zack Williams642388d2017-04-12 22:39:15 -070030 data: "{{ lookup('file', 'docker_apt_key.gpg') }}"
David K. Bainbridge317e7d72016-05-11 08:31:44 -070031
32- name: Docker repository
33 become: yes
34 apt_repository:
Zack Williams642388d2017-04-12 22:39:15 -070035 repo: "{{ docker_apt_repo }}"
David K. Bainbridge317e7d72016-05-11 08:31:44 -070036
Zack Williams6fe46372017-06-29 08:30:21 -070037- name: Install docker-ce
David K. Bainbridge317e7d72016-05-11 08:31:44 -070038 become: yes
39 apt:
Zack Williams6fe46372017-06-29 08:30:21 -070040 name: "docker-ce=17.06.*"
Zack Williams642388d2017-04-12 22:39:15 -070041 update_cache: yes
42 cache_valid_time: 3600
David K. Bainbridge317e7d72016-05-11 08:31:44 -070043
Zack Williams642388d2017-04-12 22:39:15 -070044# docker fails without docker-py, docker-compose >1.9 fails with docker-py installed
Andy Bavierad44c162017-06-14 17:28:30 -070045- name: Install docker-compose
Zack Williams642388d2017-04-12 22:39:15 -070046 become: yes
47 pip:
48 name: "{{ item }}"
49 with_items:
Zack Williams537bf9c2018-04-02 11:55:04 -070050 - "docker==3.2.1"
51 - "docker-compose==1.20.1"
Zack Williams642388d2017-04-12 22:39:15 -070052
53- name: Make current user part of the Docker group
David K. Bainbridge2a804222016-05-16 12:36:32 -070054 become: yes
55 user:
Zack Williams642388d2017-04-12 22:39:15 -070056 name: "{{ ansible_user_id }}"
57 groups: "docker"
58 append: yes
David K. Bainbridge2a804222016-05-16 12:36:32 -070059