Zack Williams | 363bc85 | 2016-04-12 13:58:29 -0700 | [diff] [blame] | 1 | --- |
Andy Bavier | f69e77c | 2016-06-28 17:19:33 -0400 | [diff] [blame] | 2 | # Common ONOS setup |
| 3 | - hosts: onos-cord-1:onos-fabric-1 |
Zack Williams | 363bc85 | 2016-04-12 13:58:29 -0700 | [diff] [blame] | 4 | remote_user: ubuntu |
| 5 | |
| 6 | tasks: |
| 7 | - name: Include configuration vars |
| 8 | include_vars: onos-setup-vars.yml |
| 9 | |
Zack Williams | 9b3c361 | 2016-04-14 07:05:30 -0700 | [diff] [blame] | 10 | - name: Create CORD directory |
| 11 | file: |
| 12 | path={{ ansible_user_dir }}/cord |
| 13 | state=directory |
| 14 | |
Andy Bavier | f69e77c | 2016-06-28 17:19:33 -0400 | [diff] [blame] | 15 | - name: Pull docker image for ONOS |
| 16 | become: yes |
| 17 | command: docker pull onosproject/onos:1.6 |
| 18 | |
| 19 | # Setup specific for onos-cord VM |
| 20 | - hosts: onos-cord-1 |
| 21 | remote_user: ubuntu |
| 22 | |
| 23 | tasks: |
Andy Bavier | d39936c | 2016-08-02 17:31:07 -0400 | [diff] [blame] | 24 | - name: Copy over SSH key |
Zack Williams | 363bc85 | 2016-04-12 13:58:29 -0700 | [diff] [blame] | 25 | copy: |
Andy Bavier | d39936c | 2016-08-02 17:31:07 -0400 | [diff] [blame] | 26 | src={{ node_private_key }} |
| 27 | dest={{ ansible_user_dir }}/cord/node_key |
Zack Williams | 363bc85 | 2016-04-12 13:58:29 -0700 | [diff] [blame] | 28 | owner={{ ansible_user_id }} mode=0600 |
Zack Williams | 363bc85 | 2016-04-12 13:58:29 -0700 | [diff] [blame] | 29 | |
Zack Williams | 2a28709 | 2016-05-18 13:41:31 -0700 | [diff] [blame] | 30 | - name: Copy over files to build XOS variant of ONOS |
| 31 | copy: |
| 32 | src="~/{{ item }}" |
| 33 | dest="{{ ansible_user_dir }}/cord/{{ item }}" |
| 34 | with_items: |
| 35 | - Dockerfile.xos-onos |
| 36 | - onos-service |
| 37 | |
Zack Williams | e4fbacc | 2016-05-21 07:18:43 -0700 | [diff] [blame] | 38 | - name: Copy over & rename docker-compose file |
Zack Williams | 363bc85 | 2016-04-12 13:58:29 -0700 | [diff] [blame] | 39 | copy: |
Zack Williams | 2a28709 | 2016-05-18 13:41:31 -0700 | [diff] [blame] | 40 | src=~/onos-docker-compose.yml |
Zack Williams | 363bc85 | 2016-04-12 13:58:29 -0700 | [diff] [blame] | 41 | dest={{ ansible_user_dir }}/cord/docker-compose.yml |
| 42 | |
Andy Bavier | f69e77c | 2016-06-28 17:19:33 -0400 | [diff] [blame] | 43 | - hosts: onos-fabric-1 |
| 44 | remote_user: ubuntu |
Zack Williams | d31bbc9 | 2016-05-20 11:43:18 -0700 | [diff] [blame] | 45 | |
Andy Bavier | f69e77c | 2016-06-28 17:19:33 -0400 | [diff] [blame] | 46 | tasks: |
| 47 | - name: Copy over & rename docker-compose file |
| 48 | copy: |
| 49 | src=~/fabric-docker-compose.yml |
| 50 | dest={{ ansible_user_dir }}/cord/docker-compose.yml |