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: |
Zack Williams | 2b94629 | 2016-08-22 15:32:29 -0700 | [diff] [blame] | 12 | path: "{{ ansible_user_dir }}/cord" |
| 13 | state: directory |
Zack Williams | 9b3c361 | 2016-04-14 07:05:30 -0700 | [diff] [blame] | 14 | |
Andy Bavier | f69e77c | 2016-06-28 17:19:33 -0400 | [diff] [blame] | 15 | - name: Pull docker image for ONOS |
| 16 | become: yes |
Zack Williams | 2b94629 | 2016-08-22 15:32:29 -0700 | [diff] [blame] | 17 | command: "docker pull {{ onos_docker_image }}" |
Zack Williams | 3562456 | 2016-08-28 17:12:26 -0700 | [diff] [blame] | 18 | tags: |
| 19 | - skip_ansible_lint # Should replace with http://docs.ansible.com/ansible/docker_module.html, when replacements are stable |
Andy Bavier | f69e77c | 2016-06-28 17:19:33 -0400 | [diff] [blame] | 20 | |
| 21 | # Setup specific for onos-cord VM |
| 22 | - hosts: onos-cord-1 |
| 23 | remote_user: ubuntu |
| 24 | |
| 25 | tasks: |
Andy Bavier | d39936c | 2016-08-02 17:31:07 -0400 | [diff] [blame] | 26 | - name: Copy over SSH key |
Zack Williams | 363bc85 | 2016-04-12 13:58:29 -0700 | [diff] [blame] | 27 | copy: |
Zack Williams | 2b94629 | 2016-08-22 15:32:29 -0700 | [diff] [blame] | 28 | src: "{{ node_private_key }}" |
| 29 | dest: "{{ ansible_user_dir }}/cord/node_key" |
| 30 | owner: "{{ ansible_user_id }}" |
| 31 | mode: 0600 |
Zack Williams | 363bc85 | 2016-04-12 13:58:29 -0700 | [diff] [blame] | 32 | |
Zack Williams | 2a28709 | 2016-05-18 13:41:31 -0700 | [diff] [blame] | 33 | - name: Copy over files to build XOS variant of ONOS |
| 34 | copy: |
Zack Williams | 2b94629 | 2016-08-22 15:32:29 -0700 | [diff] [blame] | 35 | src: "~/{{ item }}" |
| 36 | dest: "{{ ansible_user_dir }}/cord/{{ item }}" |
Zack Williams | 2a28709 | 2016-05-18 13:41:31 -0700 | [diff] [blame] | 37 | with_items: |
| 38 | - Dockerfile.xos-onos |
| 39 | - onos-service |
| 40 | |
Zack Williams | e4fbacc | 2016-05-21 07:18:43 -0700 | [diff] [blame] | 41 | - name: Copy over & rename docker-compose file |
Zack Williams | 363bc85 | 2016-04-12 13:58:29 -0700 | [diff] [blame] | 42 | copy: |
Zack Williams | 2b94629 | 2016-08-22 15:32:29 -0700 | [diff] [blame] | 43 | src: "~/onos-docker-compose.yml" |
| 44 | dest: "{{ ansible_user_dir }}/cord/docker-compose.yml" |
Zack Williams | 363bc85 | 2016-04-12 13:58:29 -0700 | [diff] [blame] | 45 | |
Andy Bavier | f69e77c | 2016-06-28 17:19:33 -0400 | [diff] [blame] | 46 | - hosts: onos-fabric-1 |
| 47 | remote_user: ubuntu |
Zack Williams | d31bbc9 | 2016-05-20 11:43:18 -0700 | [diff] [blame] | 48 | |
Andy Bavier | f69e77c | 2016-06-28 17:19:33 -0400 | [diff] [blame] | 49 | tasks: |
| 50 | - name: Copy over & rename docker-compose file |
| 51 | copy: |
Zack Williams | 2b94629 | 2016-08-22 15:32:29 -0700 | [diff] [blame] | 52 | src: "~/fabric-docker-compose.yml" |
| 53 | dest: "{{ ansible_user_dir }}/cord/docker-compose.yml" |