blob: 32a8a21d894ad9fb00a1c3e40b4f8c8162b1fa25 [file] [log] [blame]
Andy Bavierc2335122016-06-25 09:59:22 -04001---
2# onos-load-apps/tasks/main.yml
Andy Bavierc2335122016-06-25 09:59:22 -04003
Zack Williams2b946292016-08-22 15:32:29 -07004- name: Disable loading of CORD apps from Maven repo
Andy Bavierc2335122016-06-25 09:59:22 -04005 command: ansible xos-1 -u ubuntu -m lineinfile \
Scott Baker333a3152016-06-29 08:58:42 -07006 -a "dest=~/service-profile/{{ xos_configuration }}/make-vtn-external-yaml.sh state=absent regexp='install_dependencies'"
Andy Bavierc2335122016-06-25 09:59:22 -04007
Zack Williams2b946292016-08-22 15:32:29 -07008- 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 Bavierc2977cf2016-06-25 11:16:23 -040037 with_items: "{{ cord_apps }}"
Zack Williams4b7682b2016-06-29 18:52:08 -070038
Zack Williams2b946292016-08-22 15:32:29 -070039- 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 Williams4b7682b2016-06-29 18:52:08 -070046