Andy Bavier | c233512 | 2016-06-25 09:59:22 -0400 | [diff] [blame] | 1 | --- |
| 2 | # onos-load-apps/tasks/main.yml |
Andy Bavier | c233512 | 2016-06-25 09:59:22 -0400 | [diff] [blame] | 3 | |
Zack Williams | 2b94629 | 2016-08-22 15:32:29 -0700 | [diff] [blame] | 4 | - name: Disable loading of CORD apps from Maven repo |
Andy Bavier | c233512 | 2016-06-25 09:59:22 -0400 | [diff] [blame] | 5 | command: ansible xos-1 -u ubuntu -m lineinfile \ |
Scott Baker | 333a315 | 2016-06-29 08:58:42 -0700 | [diff] [blame] | 6 | -a "dest=~/service-profile/{{ xos_configuration }}/make-vtn-external-yaml.sh state=absent regexp='install_dependencies'" |
Andy Bavier | c233512 | 2016-06-25 09:59:22 -0400 | [diff] [blame] | 7 | |
Zack Williams | 2b94629 | 2016-08-22 15:32:29 -0700 | [diff] [blame] | 8 | - name: Create directory for CORD apps and load script |
| 9 | file: |
| 10 | state: directory |
| 11 | dest: "{{ ansible_user_dir }}/cord_apps/" |
| 12 | |
| 13 | - name: Create cord_app_loader.sh script to load CORD apps |
| 14 | template: |
| 15 | src: "{{ item }}.j2" |
| 16 | dest: "{{ ansible_user_dir }}/cord_apps/{{ item }}" |
| 17 | mode: 0755 |
| 18 | with_items: |
| 19 | - cord_app_loader.sh |
| 20 | |
| 21 | - name: Copy onos-app REST API app loader tool |
| 22 | copy: |
| 23 | src: "{{ item }}" |
| 24 | dest: "{{ ansible_user_dir }}/cord_apps/{{ item }}" |
| 25 | mode: 0755 |
| 26 | with_items: |
| 27 | - onos-app |
| 28 | |
| 29 | - name: Download CORD apps from maven repo |
| 30 | maven_artifact: |
| 31 | repository_url: "{{ cord_apps_repo_url }}" |
| 32 | group_id: "org.opencord" |
| 33 | artifact_id: "{{ item.name }}" |
| 34 | version: "{{ cord_apps_version }}" |
| 35 | extension: "oar" |
| 36 | dest: "{{ ansible_user_dir }}/cord_apps/{{ item.name }}.oar" |
Andy Bavier | c2977cf | 2016-06-25 11:16:23 -0400 | [diff] [blame] | 37 | with_items: "{{ cord_apps }}" |
Zack Williams | 4b7682b | 2016-06-29 18:52:08 -0700 | [diff] [blame] | 38 | |
Zack Williams | 2b94629 | 2016-08-22 15:32:29 -0700 | [diff] [blame] | 39 | - name: Wait for ONOS to be ready |
| 40 | wait_for: |
| 41 | host: "{{ onos_cord_vm_hostname }}" |
| 42 | port: 8181 |
| 43 | |
| 44 | - name: Install CORD apps |
| 45 | command: "{{ ansible_user_dir }}/cord_apps/cord_app_loader.sh" |
Zack Williams | 4b7682b | 2016-06-29 18:52:08 -0700 | [diff] [blame] | 46 | |