blob: 24f23d125ca2b9200993afdc29df9dc660f91e90 [file] [log] [blame]
---
# Common ONOS setup
- hosts: onos-cord-1:onos-fabric-1
remote_user: ubuntu
tasks:
- name: Include configuration vars
include_vars: onos-setup-vars.yml
- name: Create CORD directory
file:
path={{ ansible_user_dir }}/cord
state=directory
- name: Pull docker image for ONOS
become: yes
command: docker pull onosproject/onos:1.6
# Setup specific for onos-cord VM
- hosts: onos-cord-1
remote_user: ubuntu
tasks:
- name: Copy over SSH keys
copy:
src=~/.ssh/{{ item }}
dest={{ ansible_user_dir }}/cord/{{ item }}
owner={{ ansible_user_id }} mode=0600
with_items:
- id_rsa
- id_rsa.pub
- name: Copy over files to build XOS variant of ONOS
copy:
src="~/{{ item }}"
dest="{{ ansible_user_dir }}/cord/{{ item }}"
with_items:
- Dockerfile.xos-onos
- onos-service
- name: Copy over & rename docker-compose file
copy:
src=~/onos-docker-compose.yml
dest={{ ansible_user_dir }}/cord/docker-compose.yml
- hosts: onos-fabric-1
remote_user: ubuntu
tasks:
- name: Copy over & rename docker-compose file
copy:
src=~/fabric-docker-compose.yml
dest={{ ansible_user_dir }}/cord/docker-compose.yml