move docker installation into it's own playbook, run when creating vm's
diff --git a/roles/onos-vm-install/files/onos-setup-playbook.yml b/roles/onos-vm-install/files/onos-setup-playbook.yml
index 94352be..419d52b 100644
--- a/roles/onos-vm-install/files/onos-setup-playbook.yml
+++ b/roles/onos-vm-install/files/onos-setup-playbook.yml
@@ -6,48 +6,6 @@
- name: Include configuration vars
include_vars: onos-setup-vars.yml
- # https://docs.docker.com/engine/installation/linux/ubuntulinux/
- - name: Prereqs and SSL support for apt for SSL
- become: yes
- apt:
- name={{ item }}
- update_cache=yes
- cache_valid_time=3600
- with_items:
- - apt-transport-https
- - ca-certificates
- - python-pip
-
- - name: Trust docker apt key
- become: yes
- apt_key:
- keyserver=pool.sks-keyservers.net
- id=58118E89F3A912897C070ADBF76221572C52609D
-
- - name: Add docker apt repo
- become: yes
- apt_repository:
- repo="deb https://apt.dockerproject.org/repo ubuntu-trusty main"
-
- - name: Install docker
- become: yes
- apt:
- update_cache=yes
- cache_valid_time=3600
- name=docker-engine
-
- - name: Make user part of the Docker group
- become: yes
- user:
- name={{ ansible_user_id }}
- groups="docker" append=yes
-
- # https://docs.docker.com/compose/install/#install-using-pip
- - name: Install docker-compose from PyPi
- become: yes
- pip:
- name=docker-compose
-
- name: Create CORD directory
file:
path={{ ansible_user_dir }}/cord
@@ -70,15 +28,11 @@
- Dockerfile.xos-onos
- onos-service
- - name: Copy over docker-compose.yml files
+ - name: Copy over & rename docker-compose file
copy:
src=~/onos-docker-compose.yml
dest={{ ansible_user_dir }}/cord/docker-compose.yml
- # The become here is to work around user not being in the docker group
- # until the next login, so become it again to reload group membership
- name: Pull docker image for ONOS
- become: yes
- become_user: "{{ ansible_user_id }}"
command: docker pull onosproject/onos