Move uwsgi to install task file

When deploying from source, certain distros have their own way of
laying services and deploying them.  In this case, Glance uses
eventlet rather than UWSGI when deploying from binary.

This patch moves it into it the specific install file so that
it does not have to be done by binary installs.

Change-Id: If22beb98464b3b41112ffd54a66e8d7603bda2ae
This commit is contained in:
Mohammed Naser 2018-03-01 03:37:44 +00:00
parent f74e9f8db3
commit a022d2ba3a
3 changed files with 19 additions and 37 deletions

View File

@ -254,3 +254,22 @@
notify:
- Manage LB
- Restart glance services
- name: Ensure uWSGI directory exists
file:
path: "/etc/uwsgi/"
state: directory
mode: "0711"
- name: Apply uWSGI configuration
config_template:
src: "glance-uwsgi.ini.j2"
dest: "/etc/uwsgi/{{ item.service_name }}.ini"
mode: "0744"
config_overrides: "{{ item.wsgi_overrides }}"
config_type: ini
with_items: "{{ filtered_glance_services }}"
when: item.wsgi_app | default(False)
notify:
- Manage LB
- Restart glance services

View File

@ -1,33 +0,0 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Ensure uWSGI directory exists
file:
path: "/etc/uwsgi/"
state: directory
mode: "0711"
- name: Apply uWSGI configuration
config_template:
src: "glance-uwsgi.ini.j2"
dest: "/etc/uwsgi/{{ item.service_name }}.ini"
mode: "0744"
config_overrides: "{{ item.wsgi_overrides }}"
config_type: ini
with_items: "{{ filtered_glance_services }}"
when: item.wsgi_app | default(False)
notify:
- Manage LB
- Restart glance services

View File

@ -40,10 +40,6 @@
tags:
- glance-config
- include_tasks: glance_uwsgi.yml
tags:
- glance-config
- include_tasks: glance_service_setup.yml
when:
- "glance_services['glance-api']['group'] in group_names"