blob: 5a2862594cbe90e10d5f756a495a981f70d47b48 [file] [log] [blame]
Zack Williams363bc852016-04-12 13:58:29 -07001---
2- hosts: onos-cord-1
3 remote_user: ubuntu
4
5 tasks:
6 - name: Include configuration vars
7 include_vars: onos-setup-vars.yml
8
9 # https://docs.docker.com/engine/installation/linux/ubuntulinux/
10 - name: Prereqs and SSL support for apt for SSL
11 become: yes
12 apt:
13 name={{ item }}
14 update_cache=yes
15 cache_valid_time=3600
16 with_items:
17 - apt-transport-https
18 - ca-certificates
19 - python-pip
20
21 - name: Trust docker apt key
22 become: yes
23 apt_key:
24 keyserver=pool.sks-keyservers.net
25 id=58118E89F3A912897C070ADBF76221572C52609D
26
27 - name: Add docker apt repo
28 become: yes
29 apt_repository:
30 repo="deb https://apt.dockerproject.org/repo ubuntu-trusty main"
31
32 - name: Install docker
33 become: yes
34 apt:
35 update_cache=yes
36 cache_valid_time=3600
37 name=docker-engine
38
39 - name: Make user part of the Docker group
40 become: yes
41 user:
42 name={{ ansible_user_id }}
43 groups="docker" append=yes
44
45 # https://docs.docker.com/compose/install/#install-using-pip
46 - name: Install docker-compose from PyPi
47 become: yes
48 pip:
49 name=docker-compose
50
Zack Williams9b3c3612016-04-14 07:05:30 -070051 - name: Create CORD directory
52 file:
53 path={{ ansible_user_dir }}/cord
54 state=directory
55
Zack Williams363bc852016-04-12 13:58:29 -070056 - name: Copy over SSH keys
57 copy:
58 src=~/.ssh/{{ item }}
59 dest={{ ansible_user_dir }}/cord/{{ item }}
60 owner={{ ansible_user_id }} mode=0600
61 with_items:
62 - id_rsa
63 - id_rsa.pub
64
Zack Williams363bc852016-04-12 13:58:29 -070065 - name: Copy over docker-compose.yml files
66 copy:
67 src=~/docker-compose.yml
68 dest={{ ansible_user_dir }}/cord/docker-compose.yml
69