-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontroller-swift.yml
57 lines (45 loc) · 1.92 KB
/
controller-swift.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
---
- name: "Install and Configure OpenStack Object storage"
hosts: openstack
remote_user: root
gather_facts: yes
tasks:
- name: "add swift user (set in service project)"
shell: source ~/keystonerc && openstack user create --domain default --project service --password servicepassword swift
args:
executable: /bin/bash
register: swift_user
- debug: var=swift_user.stdout_lines
- name: "add swift user in admin role"
shell: source ~/keystonerc && openstack role add --project service --user swift admin
args:
executable: /bin/bash
- name: "add service entry for swift"
shell: source ~/keystonerc && ""openstack service create --name swift --description "OpenStack Object Storage" object-store""
args:
executable: /bin/bash
register: object_service
- debug: var=object_service.stdout_lines
- name: "add endpoint for swift (public,internal)"
shell: source ~/keystonerc && ""openstack endpoint create --region RegionOne object-store {{ item }} http://{{ ansible_host }}:8080/v1/AUTH_%\(tenant_id\)s""
args:
executable: /bin/bash
register: end_swift
with_items:
- public
- internal
- debug: var=end_swift
- name: "add endpoint for swift (admin)"
shell: source ~/keystonerc && ""openstack endpoint create --region RegionOne object-store admin http://{{ ansible_host }}:8080/v1""
args:
executable: /bin/bash
register: proxy_swift
- debug: var=proxy_swift
- name: "Install swift"
yum: name={{ item }} enablerepo=centos-openstack-ocata,epel state=present
with_items:
- openstack-swift-proxy
- python-memcached
- openssh-clients
- name: "Backup Original cinder configuation"
copy: remote_src=True src=/etc/swift/proxy-server.conf dest=/etc/swift/proxy-server.conf.org