-
Notifications
You must be signed in to change notification settings - Fork 0
/
openstack-playbook.yml
69 lines (69 loc) · 2.08 KB
/
openstack-playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
- hosts: all
user: vagrant
become: true
tasks:
- name: Install apt packages
apt:
name: "{{ packages }}"
state: present
update_cache: yes
vars:
packages:
- python3-dev
- libffi-dev
- gcc
- libssl-dev
- python3-venv
- name: Create directory
file:
path: /home/vagrant/openstack-env
state: directory
- name: Install ansible
pip:
name: ansible
virtualenv: /home/vagrant/openstack-env
virtualenv_command: /usr/bin/python3 -m venv
- name: Install kolla-ansible
pip:
name: kolla-ansible
virtualenv: /home/vagrant/openstack-env
- name: Install openstack-client
pip:
name: python-openstackclient
virtualenv: /home/vagrant/openstack-env
- name: Create directory
become_method: sudo
file:
path: /etc/kolla
state: directory
- name: User right on kolla directory
become_method: sudo
shell: sudo chown vagrant:vagrant /etc/kolla
- name: Copy globals.yml to /etc/kolla
copy:
src: globals.yml
dest: /etc/kolla/globals.yml
- name: Copy passwords.yml to /etc/kolla
copy:
src: /home/vagrant/openstack-env/share/kolla-ansible/etc_examples/kolla/passwords.yml
dest: /etc/kolla/passwords.yml
remote_src: yes
- name: User right on global.yml
become_method: sudo
shell: sudo chown vagrant:vagrant /etc/kolla/globals.yml
- name: User right on passwords.yml
become_method: sudo
shell: sudo chown vagrant:vagrant /etc/kolla/passwords.yml
- name: Copy the inventory files
copy:
src: /home/vagrant/openstack-env/share/kolla-ansible/ansible/inventory/all-in-one
dest: /home/vagrant/all-in-one
remote_src: yes
- name: Copy openstack.sh to /home/vagrant
copy:
src: openstack.sh
dest: /home/vagrant/openstack.sh
- name: User right on openstack.sh
become_method: sudo
shell: sudo chown vagrant:vagrant /home/vagrant/openstack.sh