aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/openstack_mitaka_xenial/roles/moon-post/tasks/moon-controller.yml
blob: bff6397eb77cfc1a18b8a2db6a041ac8507cce1d (plain)
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
##############################################################################
# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
---
# moon log
- name: moon log
  shell: >
    sudo adduser swift moonlog;
    sudo adduser nova moonlog;

# nova api paste
#- name: nova api paste 1
#  shell: sudo cp /etc/nova/api-paste.ini /etc/nova/api-paste.ini.bak2
#
#- name: nova api paste 2
#  shell: sudo sed "/^keystone = / s/keystonecontext/keystonecontext moon/" /etc/nova/api-paste.ini > /tmp/api-paste.ini
#
#- name: nova api paste 3
#  shell: sudo cp /tmp/api-paste.ini /etc/nova/api-paste.ini
#
#- name: nova api paste 4
#  shell: echo -e "\n[filter:moon]\npaste.filter_factory = keystonemiddleware.moon_agent:filter_factory\nauthz_login=admin\nauthz_password=password\nlogfile=/var/log/moon/keystonemiddleware.log\n" | sudo tee -a /etc/nova/api-paste.ini

- name: update api-paste.ini
  template: src=api-paste.ini dest=/etc/nova/api-paste.ini backup=yes

# restart nova
- name: restart nova
  service: name={{ item }} state=restarted enabled=yes
  with_items:
    - nova-api
    - nova-cert
    - nova-conductor
    - nova-consoleauth
    - nova-scheduler

## swift proxy server
#- name: swift proxy server 1
#  shell: sudo cp /etc/swift/proxy-server.conf /etc/swift/proxy-server.conf.bak2
#
#- name: swift proxy server 2
#  shell: sudo sed "/^pipeline = / s/proxy-server/moon proxy-server/" /etc/swift/proxy-server.conf > /tmp/proxy-server.conf
#
#- name: swift proxy server 3
#  shell: sudo cp /tmp/proxy-server.conf /etc/swift/proxy-server.conf
#
#- name: swift proxy server 4
#  shell: echo -e "\n[filter:moon]\npaste.filter_factory = keystonemiddleware.moon_agent:filter_factory\nauthz_login=admin\nauthz_password=password\nlogfile=/var/log/moon/keystonemiddleware.log\n" | sudo tee -a /etc/swift/proxy-server.conf

# restart swift
- name: restart swift
  service: name={{ item }} state=restarted enabled=yes
  with_items:
    - swift-proxy
    - memcached