blob: 124a719473117ef0c419221eafb3135e10ede19c [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
18 - python-novaclient
19 - python-neutronclient
20 - python-keystoneclient
21 - python-glanceclient
22
Zack Williams363bc852016-04-12 13:58:29 -070023 - name: Clone XOS repo
24 git:
25 repo={{ xos_repo_url }}
26 dest={{ xos_repo_dest }}
27 version={{ xos_repo_branch }}
Zack Williams9b3c3612016-04-14 07:05:30 -070028 force=yes
Zack Williams363bc852016-04-12 13:58:29 -070029
30 - name: Make XOS prerequisites
31 command: make -f {{ xos_repo_dest }}/xos/configurations/common/Makefile.prereqs
32
33 - name: Copy over SSH keys
34 copy:
35 src=~/.ssh/{{ item }}
36 dest={{ xos_repo_dest }}/xos/configurations/{{ xos_configuration }}/
37 owner={{ ansible_user_id }} mode=0600
38 with_items:
39 - id_rsa
40 - id_rsa.pub
41
Zack Williams363bc852016-04-12 13:58:29 -070042 - name: download software image
43 get_url:
44 url=http://www.vicci.org/opencloud/trusty-server-cloudimg-amd64-disk1.img
45 checksum=sha256:5fb160ea09649f9cebe5cfd7aaf3d1a341e8e0f9eca6e52e46eb6271155c48b0
46 dest={{ xos_repo_dest }}/xos/configurations/{{ xos_configuration }}/images/trusty-server-multi-nic.img
47
Zack Williamsd31bbc92016-05-20 11:43:18 -070048 - name: copy over SSH key as node_key
49 copy:
50 src=~/.ssh/id_rsa
51 dest={{ xos_repo_dest }}/xos/configurations/{{ xos_configuration }}/node_key
52
53 - name: Pull docker images for XOS
54 command: docker-compose pull chdir={{ xos_repo_dest }}/xos/configurations/{{ xos_configuration }}
Zack Williams363bc852016-04-12 13:58:29 -070055