Remove references to unsupported operating systems
All references to Gentoo, SUSE, Debian stretch and Centos-7 are removed. Conditional tasks, ternary operators and variables are simplified where possible OS specific variables files are generalised where possible Change-Id: I31c5e6cde00cdb7addcc0cb4b1c7a13529ce1e60
This commit is contained in:
parent
9c8062fb51
commit
5e702329d5
@ -22,17 +22,14 @@ galaxy_info:
|
|||||||
platforms:
|
platforms:
|
||||||
- name: Debian
|
- name: Debian
|
||||||
versions:
|
versions:
|
||||||
- stretch
|
- buster
|
||||||
- name: Ubuntu
|
- name: Ubuntu
|
||||||
versions:
|
versions:
|
||||||
- xenial
|
|
||||||
- bionic
|
- bionic
|
||||||
|
- focal
|
||||||
- name: EL
|
- name: EL
|
||||||
versions:
|
versions:
|
||||||
- 7
|
- 8
|
||||||
- name: opensuse
|
|
||||||
versions:
|
|
||||||
- all
|
|
||||||
categories:
|
categories:
|
||||||
- cloud
|
- cloud
|
||||||
- python
|
- python
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
# NOTE(hwoarang): Module enable/disable process is only functional on Debian
|
# NOTE(hwoarang): Module enable/disable process is only functional on Debian
|
||||||
# and SUSE based systems.
|
|
||||||
- name: Enable apache2 modules
|
- name: Enable apache2 modules
|
||||||
apache2_module:
|
apache2_module:
|
||||||
name: "{{ item.name }}"
|
name: "{{ item.name }}"
|
||||||
@ -23,7 +22,7 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- "{{ horizon_apache_modules }}"
|
- "{{ horizon_apache_modules }}"
|
||||||
when:
|
when:
|
||||||
- ansible_facts['pkg_mgr'] in ['apt', 'zypper']
|
- ansible_facts['pkg_mgr'] == 'apt'
|
||||||
notify: Restart apache2
|
notify: Restart apache2
|
||||||
|
|
||||||
- name: Drop apache2 configs
|
- name: Drop apache2 configs
|
||||||
@ -42,37 +41,6 @@
|
|||||||
with_items: "{{ horizon_apache_default_sites }}"
|
with_items: "{{ horizon_apache_default_sites }}"
|
||||||
notify: Restart apache2
|
notify: Restart apache2
|
||||||
|
|
||||||
# NOTE(hwoarang) Default openSUSE apache configuration ships
|
|
||||||
# with a <Directory /> configuration in /etc/apache2/httpd.conf
|
|
||||||
# so we need to get rid of it to allow all the symlinks in the
|
|
||||||
# root filesystem that horizon requires
|
|
||||||
# TODO: Can this be improved somehow?
|
|
||||||
- block:
|
|
||||||
- name: Tag beginning of main apache2 directory configuration (SUSE)
|
|
||||||
lineinfile:
|
|
||||||
dest: "{{ horizon_apache_conf }}"
|
|
||||||
insertbefore: '^<Directory />'
|
|
||||||
line: "# BEGIN ANSIBLE MANAGED BLOCK"
|
|
||||||
state: present
|
|
||||||
notify: Restart apache2
|
|
||||||
|
|
||||||
- name: Tag end of main apache2 directory configuration (SUSE)
|
|
||||||
lineinfile:
|
|
||||||
dest: "{{ horizon_apache_conf }}"
|
|
||||||
insertafter: '^</Directory>'
|
|
||||||
line: "# END ANSIBLE MANAGED BLOCK"
|
|
||||||
state: present
|
|
||||||
notify: Restart apache2
|
|
||||||
|
|
||||||
- name: Remove default apache2 configuration for root directory (SUSE)
|
|
||||||
blockinfile:
|
|
||||||
dest: "{{ horizon_apache_conf }}"
|
|
||||||
marker: "# {mark} ANSIBLE MANAGED BLOCK"
|
|
||||||
content: ""
|
|
||||||
notify: Restart apache2
|
|
||||||
|
|
||||||
when: ansible_facts['pkg_mgr'] == 'zypper'
|
|
||||||
|
|
||||||
- name: Enable Horizon Site
|
- name: Enable Horizon Site
|
||||||
file:
|
file:
|
||||||
src: "{{ horizon_apache_site_available }}"
|
src: "{{ horizon_apache_site_available }}"
|
||||||
@ -108,7 +76,7 @@
|
|||||||
- name: Remove Listen from Apache config
|
- name: Remove Listen from Apache config
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: "{{ horizon_apache_security_conf }}"
|
dest: "{{ horizon_apache_security_conf }}"
|
||||||
regexp: "{{ (ansible_facts['pkg_mgr'] == 'zypper') | ternary('^(Include.*listen\\.conf)', '^(Listen.*)') }}"
|
regexp: '^(Listen.*)'
|
||||||
backrefs: yes
|
backrefs: yes
|
||||||
line: '#\1'
|
line: '#\1'
|
||||||
notify: Restart apache2
|
notify: Restart apache2
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- { path: "/etc/pki/tls/certs", owner: "root", group: "root" }
|
- { path: "/etc/pki/tls/certs", owner: "root", group: "root" }
|
||||||
- { path: "/etc/pki/tls/private", owner: "root", group: "root" }
|
- { path: "/etc/pki/tls/private", owner: "root", group: "root" }
|
||||||
when: ansible_facts['pkg_mgr'] in ['yum', 'dnf']
|
when: ansible_facts['pkg_mgr'] == 'dnf'
|
||||||
|
|
||||||
- name: Create system links
|
- name: Create system links
|
||||||
file:
|
file:
|
||||||
@ -33,7 +33,7 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- { src: "/etc/pki/tls/certs", dest: "/etc/ssl/certs" }
|
- { src: "/etc/pki/tls/certs", dest: "/etc/ssl/certs" }
|
||||||
- { src: "/etc/pki/tls/private", dest: "/etc/ssl/private" }
|
- { src: "/etc/pki/tls/private", dest: "/etc/ssl/private" }
|
||||||
when: ansible_facts['pkg_mgr'] in ['yum', 'dnf']
|
when: ansible_facts['pkg_mgr'] == 'dnf'
|
||||||
|
|
||||||
# NOTE(jrosser)
|
# NOTE(jrosser)
|
||||||
# horizon appears in u-c as is it used as a library for the horizon plugins
|
# horizon appears in u-c as is it used as a library for the horizon plugins
|
||||||
@ -175,10 +175,4 @@
|
|||||||
with_items: "{{ found_panels.files }}"
|
with_items: "{{ found_panels.files }}"
|
||||||
notify:
|
notify:
|
||||||
- Compile messages
|
- Compile messages
|
||||||
- Restart apache2
|
- Restart apache2
|
||||||
|
|
||||||
- name: Register wsgi module
|
|
||||||
shell: "{{ horizon_bin }}/mod_wsgi-express install-module > /etc/httpd/conf.modules.d/02-wsgi.conf"
|
|
||||||
when: ansible_facts['os_family'] | lower == 'redhat' and ansible_facts['distribution_major_version'] is version('7', '=')
|
|
||||||
notify:
|
|
||||||
- Restart apache2
|
|
@ -1,63 +0,0 @@
|
|||||||
---
|
|
||||||
# Copyright 2014, 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.
|
|
||||||
|
|
||||||
horizon_system_service_name: httpd
|
|
||||||
|
|
||||||
horizon_devel_distro_packages:
|
|
||||||
- git
|
|
||||||
- libxslt-devel
|
|
||||||
- openssl
|
|
||||||
- openssl-libs
|
|
||||||
- httpd-devel
|
|
||||||
- pcre-devel
|
|
||||||
|
|
||||||
horizon_distro_packages:
|
|
||||||
- cronie
|
|
||||||
- cronie-anacron
|
|
||||||
- gettext
|
|
||||||
- httpd
|
|
||||||
- httpd-tools
|
|
||||||
- mod_ssl
|
|
||||||
- which
|
|
||||||
|
|
||||||
horizon_service_pip_packages:
|
|
||||||
- mod-wsgi
|
|
||||||
|
|
||||||
horizon_service_distro_packages:
|
|
||||||
- openstack-designate-ui
|
|
||||||
- openstack-heat-ui
|
|
||||||
- openstack-ironic-ui
|
|
||||||
- openstack-magnum-ui
|
|
||||||
- openstack-manila-ui
|
|
||||||
- openstack-sahara-ui
|
|
||||||
- openstack-trove-ui
|
|
||||||
- openstack-octavia-ui
|
|
||||||
- python-django-horizon
|
|
||||||
- python-memcached
|
|
||||||
|
|
||||||
horizon_apache_conf: "/etc/httpd/conf/httpd.conf"
|
|
||||||
horizon_apache_security_conf: "{{ horizon_apache_conf }}"
|
|
||||||
|
|
||||||
horizon_apache_configs:
|
|
||||||
- { src: "horizon_apache_ports.conf.j2", dest: "/etc/httpd/conf.d/ports.conf", owner: "root", group: "root" }
|
|
||||||
- { src: "openstack_dashboard.conf.j2", dest: "/etc/httpd/conf.d/openstack-dashboard.conf", owner: "root", group: "root" }
|
|
||||||
|
|
||||||
horizon_apache_default_sites:
|
|
||||||
- "/etc/httpd/conf.d/userdir.conf"
|
|
||||||
- "/etc/httpd/conf.d/welcome.conf"
|
|
||||||
- "/etc/httpd/conf.d/ssl.conf"
|
|
||||||
|
|
||||||
_horizon_lib_dir: "/usr/share/openstack-dashboard"
|
|
||||||
horizon_dashboard_panel_dir: "{{ _horizon_lib_dir }}/openstack_dashboard/local/enabled"
|
|
@ -1,78 +0,0 @@
|
|||||||
---
|
|
||||||
# Copyright 2014, 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.
|
|
||||||
|
|
||||||
horizon_system_service_name: apache2
|
|
||||||
|
|
||||||
horizon_devel_distro_packages:
|
|
||||||
- git-core
|
|
||||||
- libxslt-devel
|
|
||||||
- openssl
|
|
||||||
- libopenssl-devel
|
|
||||||
- pcre-devel
|
|
||||||
|
|
||||||
horizon_distro_packages:
|
|
||||||
- apache2
|
|
||||||
- apache2-utils
|
|
||||||
- apache2-mod_wsgi
|
|
||||||
- cronie
|
|
||||||
- cronie-anacron
|
|
||||||
- gettext
|
|
||||||
- which
|
|
||||||
|
|
||||||
horizon_service_distro_packages:
|
|
||||||
- openstack-horizon-plugin-designate-ui
|
|
||||||
- openstack-horizon-plugin-gbp-ui
|
|
||||||
- openstack-horizon-plugin-ironic-ui
|
|
||||||
- openstack-horizon-plugin-magnum-ui
|
|
||||||
- openstack-horizon-plugin-manila-ui
|
|
||||||
- openstack-horizon-plugin-monasca-ui
|
|
||||||
- openstack-horizon-plugin-neutron-vpnaas-ui
|
|
||||||
- openstack-horizon-plugin-sahara-ui
|
|
||||||
- openstack-horizon-plugin-trove-ui
|
|
||||||
- python-horizon
|
|
||||||
- python-memcached
|
|
||||||
|
|
||||||
# SUSE does not currently have packages for the following dashboards
|
|
||||||
horizon_enable_heat_ui: False
|
|
||||||
horizon_enable_octavia_ui: False
|
|
||||||
|
|
||||||
horizon_apache_conf: "/etc/apache2/httpd.conf"
|
|
||||||
horizon_apache_security_conf: "{{ horizon_apache_conf }}"
|
|
||||||
|
|
||||||
horizon_apache_configs:
|
|
||||||
- { src: "horizon_apache_ports.conf.j2", dest: "/etc/apache2/conf.d/ports.conf", owner: "root", group: "root" }
|
|
||||||
- { src: "openstack_dashboard.conf.j2", dest: "/etc/apache2/conf.d/openstack-dashboard.conf", owner: "root", group: "root" }
|
|
||||||
|
|
||||||
horizon_apache_default_sites:
|
|
||||||
- "/etc/apache2/conf.d/gitweb.conf"
|
|
||||||
|
|
||||||
horizon_apache_modules:
|
|
||||||
- name: "authz_host"
|
|
||||||
state: "present"
|
|
||||||
- name: "access_compat"
|
|
||||||
state: "present"
|
|
||||||
- name: "version"
|
|
||||||
state: "present"
|
|
||||||
- name: "ssl"
|
|
||||||
state: "present"
|
|
||||||
- name: "wsgi"
|
|
||||||
state: "present"
|
|
||||||
- name: "rewrite"
|
|
||||||
state: "present"
|
|
||||||
- name: "headers"
|
|
||||||
state: "present"
|
|
||||||
|
|
||||||
_horizon_lib_dir: "/srv/www/openstack-dashboard"
|
|
||||||
horizon_dashboard_panel_dir: "{{ _horizon_lib_dir }}/openstack_dashboard/enabled"
|
|
Loading…
Reference in New Issue
Block a user