-
Notifications
You must be signed in to change notification settings - Fork 0
/
cinder-node.yml
33 lines (24 loc) · 1.1 KB
/
cinder-node.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
---
- name: "Cinder storage node playbook"
hosts: storage
gather_facts: true
remote_user: root
tasks:
- name: "Install openstack-cinder packages"
yum: name={{ item }} state=present
with_items:
- openstack-cinder
- python2-crypto targetcli
- name: "copy cinder configuation"
copy: src=cinder.conf dest=/etc/cinder/cinder.conf mode=640 owner=root group=cinder
- name: "replace ansible_host in cinder conf"
replace: dest=/etc/cinder/cinder.conf regexp='10.0.0.30' replace={{ ansible_host }} backup=yes
- name: "Add Glance-api server into cinder conf "
lineinfile: dest=/etc/cinder/cinder.conf
line={{ item.line }}
insertbefore={{ item.insertbefore }}
with_items:
- { line: "glance_api_servers = http://{{ ansible_host }}:9292", insertafter: "transport_url= " }
- { line: "# Glance connection info", insertafter: "transport_url= " }
- name: "start and enable cinder-volume"
yum: name=openstack-cinder-volume state=started enabled=yes