blob: 515c3c44f16b56809237d84fa364926b9d7e7514 [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'"
Zack Williams35624562016-08-28 17:12:26 -07007 tags:
8 - skip_ansible_lint # running a sub-job
Andy Bavierc2335122016-06-25 09:59:22 -04009
Zack Williams2b946292016-08-22 15:32:29 -070010- name: Create directory for CORD apps and load script
11 file:
12 state: directory
13 dest: "{{ ansible_user_dir }}/cord_apps/"
14
15- name: Create cord_app_loader.sh script to load CORD apps
16 template:
17 src: "{{ item }}.j2"
18 dest: "{{ ansible_user_dir }}/cord_apps/{{ item }}"
19 mode: 0755
20 with_items:
21 - cord_app_loader.sh
22
23- name: Copy onos-app REST API app loader tool
24 copy:
25 src: "{{ item }}"
26 dest: "{{ ansible_user_dir }}/cord_apps/{{ item }}"
27 mode: 0755
28 with_items:
29 - onos-app
30
Zack Williams35624562016-08-28 17:12:26 -070031- name: Wait for ONOS to be ready
32 wait_for:
33 host: "{{ onos_cord_vm_hostname }}"
34 port: 8181
35
Zack Williams2b946292016-08-22 15:32:29 -070036- name: Download CORD apps from maven repo
37 maven_artifact:
38 repository_url: "{{ cord_apps_repo_url }}"
39 group_id: "org.opencord"
40 artifact_id: "{{ item.name }}"
41 version: "{{ cord_apps_version }}"
42 extension: "oar"
43 dest: "{{ ansible_user_dir }}/cord_apps/{{ item.name }}.oar"
Andy Bavierc2977cf2016-06-25 11:16:23 -040044 with_items: "{{ cord_apps }}"
Zack Williams35624562016-08-28 17:12:26 -070045 register: maven_artifact_dl
Zack Williams4b7682b2016-06-29 18:52:08 -070046
Zack Williams35624562016-08-28 17:12:26 -070047# assumes no interruption between this and previous steps...
Zack Williams2b946292016-08-22 15:32:29 -070048- name: Install CORD apps
Zack Williams35624562016-08-28 17:12:26 -070049 when: maven_artifact_dl.changed
Zack Williams2b946292016-08-22 15:32:29 -070050 command: "{{ ansible_user_dir }}/cord_apps/cord_app_loader.sh"
Zack Williams4b7682b2016-06-29 18:52:08 -070051