blob: 2b165e74fbadda73a339049a9dad986a5812f8a6 [file] [log] [blame]
Zack Williams363bc852016-04-12 13:58:29 -07001---
2# xos-vm-install/tasks/main.yml
3#
4# Install XOS on a sub vm by calling ansible
5
6- name: Create a vars file from template
Zack Williams5ae57ef2016-04-12 14:01:58 -07007 template:
Zack Williams363bc852016-04-12 13:58:29 -07008 src=xos-setup-vars.yml.j2
9 dest={{ ansible_user_dir }}/xos-setup-vars.yml
10
Scott Bakerc2cd1b52016-10-26 08:53:15 -070011- name: Check to see if orchestration directory exists
12 local_action: stat path="{{ playbook_dir }}/../../orchestration"
13 register: orchestration
14
15- name: Make xos_install directory
16 file: path="{{ ansible_user_dir }}/xos_install" state=directory
17 when: orchestration.stat.exists == True
18
19- name: Copy repositories to the head node
20 synchronize:
21 src: "{{ playbook_dir }}/../../orchestration"
22 dest: "{{ ansible_user_dir }}/xos_install/"
23 when:
24 orchestration.stat.exists == True
25
Zack Williams363bc852016-04-12 13:58:29 -070026- name: Copy over XOS ansible playbook
27 copy:
28 src=xos-setup-{{ xos_configuration }}-playbook.yml
29 dest={{ ansible_user_dir }}/xos-setup-playbook.yml
30
31- name: Run the XOS ansible playbook
32 command: ansible-playbook {{ ansible_user_dir }}/xos-setup-playbook.yml
Zack Williamsa3e40562016-07-05 12:05:39 -070033 async: 4800
Zack Williamsd31bbc92016-05-20 11:43:18 -070034 poll: 0
35 register: xos_setup_playbook
Zack Williams35624562016-08-28 17:12:26 -070036 tags:
37 - skip_ansible_lint # running a sub-job
Zack Williams5ae57ef2016-04-12 14:01:58 -070038