blob: 5f3bcd8731131865b2f9cf42c94a8af0f4ca44d9 [file] [log] [blame]
Zack Williams363bc852016-04-12 13:58:29 -07001---
2- hosts: xos-1
3 remote_user: ubuntu
4
5 tasks:
6 - name: Include configuration vars
7 include_vars: xos-setup-vars.yml
8
9 - name: Install prerequisites
10 apt:
11 name={{ item }}
12 update_cache=yes
13 cache_valid_time=3600
14 become: yes
15 with_items:
16 - git
17 - make
Zack Williamse4fbacc2016-05-21 07:18:43 -070018 - curl
Zack Williams363bc852016-04-12 13:58:29 -070019 - python-novaclient
20 - python-neutronclient
21 - python-keystoneclient
22 - python-glanceclient
23
Zack Williams363bc852016-04-12 13:58:29 -070024 - name: Clone XOS repo
25 git:
26 repo={{ xos_repo_url }}
27 dest={{ xos_repo_dest }}
28 version={{ xos_repo_branch }}
Zack Williams9b3c3612016-04-14 07:05:30 -070029 force=yes
Zack Williams363bc852016-04-12 13:58:29 -070030
Zack Williams363bc852016-04-12 13:58:29 -070031 - name: Copy over SSH keys
32 copy:
33 src=~/.ssh/{{ item }}
34 dest={{ xos_repo_dest }}/xos/configurations/{{ xos_configuration }}/
35 owner={{ ansible_user_id }} mode=0600
36 with_items:
37 - id_rsa
38 - id_rsa.pub
39
Zack Williamse4fbacc2016-05-21 07:18:43 -070040 - name: copy over SSH key as node_key
41 copy:
42 src=~/.ssh/id_rsa
43 dest={{ xos_repo_dest }}/xos/configurations/{{ xos_configuration }}/node_key
44
Zack Williams363bc852016-04-12 13:58:29 -070045 - name: download software image
46 get_url:
Zack Williams62587be2016-05-25 15:56:45 -070047 url={{ item.url }}
48 checksum={{ item.checksum }}
49 dest={{ xos_repo_dest }}/xos/configurations/{{ xos_configuration }}/images/{{ item.name }}.img
50 with_items: "{{ xos_images }}"
Zack Williams363bc852016-04-12 13:58:29 -070051
Zack Williamsd31bbc92016-05-20 11:43:18 -070052 - name: Pull docker images for XOS
Zack Williams09df9d62016-05-27 22:39:38 -070053 become: yes
54 command: docker pull {{ item }}
55 with_items:
56 - xosproject/xos-base
57 - xosproject/xos-postgres
Zack Williams363bc852016-04-12 13:58:29 -070058