From 6a6e37785397a661b15a9422d55119ba5f3265de Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Thu, 15 Dec 2016 12:12:25 +0000 Subject: [PATCH] Remove Trusty support from os_keystone role Change-Id: I5ad6944b5e43aa46582acf313ac8793ab4d226f7 Implements: blueprint trusty-removal --- Vagrantfile | 2 +- bindep.txt | 2 +- handlers/main.yml | 3 - meta/main.yml | 1 - tasks/keystone_init_common.yml | 5 -- tasks/keystone_init_upstart.yml | 38 ------------- tasks/keystone_nginx.yml | 1 - templates/keystone-uwsgi_upstart.conf.j2 | 44 --------------- vars/ubuntu-14.04.yml | 70 ------------------------ 9 files changed, 2 insertions(+), 164 deletions(-) delete mode 100644 tasks/keystone_init_upstart.yml delete mode 100644 templates/keystone-uwsgi_upstart.conf.j2 delete mode 100644 vars/ubuntu-14.04.yml diff --git a/Vagrantfile b/Vagrantfile index 54f0e352..6b92f5ba 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,5 +1,5 @@ Vagrant.configure(2) do |config| - config.vm.box = "ubuntu/trusty64" + config.vm.box = "ubuntu/xenial64" config.vm.provider "virtualbox" do |v| v.memory = 2048 v.cpus = 2 diff --git a/bindep.txt b/bindep.txt index fe589259..ee6c1ca9 100644 --- a/bindep.txt +++ b/bindep.txt @@ -32,7 +32,7 @@ libselinux-python [platform:rpm] # For SSL SNI support python-pyasn1 [platform:dpkg] python-openssl [platform:dpkg] -python-ndg-httpsclient [platform:ubuntu !platform:ubuntu-trusty] +python-ndg-httpsclient [platform:ubuntu] python2-pyasn1 [platform:rpm] pyOpenSSL [platform:rpm] python-ndg_httpsclient [platform:rpm] diff --git a/handlers/main.yml b/handlers/main.yml index 1287c966..c6759c6d 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -17,7 +17,6 @@ service: name: "{{ keystone_system_service_name }}" state: restarted - pattern: "{{ keystone_system_service_name }}" register: _restart until: _restart|success retries: 5 @@ -77,7 +76,6 @@ service: name: "{{ keystone_system_service_name }}" state: restarted - pattern: "{{ keystone_system_service_name }}" register: _restart until: _restart|success retries: 5 @@ -121,7 +119,6 @@ service: name: "shibd" state: "restarted" - pattern: "shibd" register: shibd_restart until: shibd_restart|success retries: 5 diff --git a/meta/main.yml b/meta/main.yml index 848daf28..4b4ea371 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -22,7 +22,6 @@ galaxy_info: platforms: - name: Ubuntu versions: - - trusty - xenial - name: EL versions: diff --git a/tasks/keystone_init_common.yml b/tasks/keystone_init_common.yml index 044d8e35..38c4983d 100644 --- a/tasks/keystone_init_common.yml +++ b/tasks/keystone_init_common.yml @@ -13,11 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -- include: keystone_init_upstart.yml - static: no - when: - - ansible_service_mgr == 'upstart' - - include: keystone_init_systemd.yml static: no when: diff --git a/tasks/keystone_init_upstart.yml b/tasks/keystone_init_upstart.yml deleted file mode 100644 index 0e545279..00000000 --- a/tasks/keystone_init_upstart.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -# Copyright 2015, 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: Place the init script - template: - src: "keystone-uwsgi_upstart.conf.j2" - dest: "/etc/init/{{ program_name }}.conf" - mode: "0644" - owner: "root" - group: "root" - register: upstart_init - notify: - - Restart Keystone APIs on first node - - Restart Keystone APIs on other nodes - - Restart service on first node - - Restart service on other nodes - -- name: Reload init scripts - command: initctl reload-configuration - changed_when: false - when: upstart_init | changed - notify: - - Restart Keystone APIs on first node - - Restart Keystone APIs on other nodes - - Restart service on first node - - Restart service on other nodes diff --git a/tasks/keystone_nginx.yml b/tasks/keystone_nginx.yml index 872e7127..ee75691d 100644 --- a/tasks/keystone_nginx.yml +++ b/tasks/keystone_nginx.yml @@ -17,7 +17,6 @@ service: name: "{{ keystone_system_service_name }}" state: stopped - pattern: "{{ keystone_system_service_name }}" failed_when: false - name: Disable default configuration diff --git a/templates/keystone-uwsgi_upstart.conf.j2 b/templates/keystone-uwsgi_upstart.conf.j2 deleted file mode 100644 index 5a0b6bd2..00000000 --- a/templates/keystone-uwsgi_upstart.conf.j2 +++ /dev/null @@ -1,44 +0,0 @@ -# {{ ansible_managed }} - -# vim:set ft=upstart ts=2 et: - -description "{{ program_name }} under uWSGI" -author "Kevin Carter " - -start on runlevel [2345] -stop on runlevel [016] - -respawn -respawn limit 10 5 - -# Set the RUNBIN environment variable -env RUNBIN="{{ keystone_bin }}/uwsgi" - -# Change directory to service users home -chdir "{{ service_home }}" - -# Pre start actions -pre-start script - mkdir -p "/var/run/{{ program_name }}" - chown {{ system_user }}:{{ system_group }} "/var/run/{{ program_name }}" - - mkdir -p "/var/lock/{{ program_name }}" - chown {{ system_user }}:{{ system_group }} "/var/lock/{{ program_name }}" - - . {{ keystone_bin }}/activate - -end script - -# Post stop actions -post-stop script - rm "/var/run/{{ program_name }}/{{ program_name }}.pid" -end script - -# Run the start up job -exec start-stop-daemon --start \ - --make-pidfile \ - --pidfile /var/run/{{ program_name }}/{{ program_name }}.pid \ - --exec "{{ program_override|default('$RUNBIN') }}" \ - -- --ini "/etc/uwsgi/{{ program_name }}.ini" \ - --logto /var/log/keystone/{{ program_name }}.log \ - -- {{ program_config_options|default('') }} diff --git a/vars/ubuntu-14.04.yml b/vars/ubuntu-14.04.yml deleted file mode 100644 index 3f68722f..00000000 --- a/vars/ubuntu-14.04.yml +++ /dev/null @@ -1,70 +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. - -keystone_distro_packages: - - debhelper - - dh-apparmor - - docutils-common - - git - - libffi-dev - - libjs-sphinxdoc - - libjs-underscore - - libldap2-dev - - libsasl2-dev - - libxslt1.1 - - libxslt1-dev - - libxml2-dev - - python-dev - - rsync - -keystone_apache_distro_packages: - - apache2 - - apache2-utils - -keystone_mod_wsgi_distro_packages: - - libapache2-mod-wsgi - -keystone_mod_proxy_uwsgi_distro_packages: - - libapache2-mod-proxy-uwsgi - -keystone_nginx_distro_packages: - - nginx-full - -keystone_idp_distro_packages: - - ssl-cert - - xmlsec1 - -keystone_sp_distro_packages: - - libapache2-mod-shib2 - -keystone_developer_mode_distro_packages: - - build-essential - -keystone_apache_default_sites: - - "/etc/apache2/sites-enabled/000-default.conf" - -keystone_apache_site_available: "/etc/apache2/sites-available/keystone-httpd.conf" -keystone_apache_site_enabled: "/etc/apache2/sites-enabled/keystone-httpd.conf" -keystone_apache_conf: "/etc/apache2/apache2.conf" -keystone_apache_security_conf: "/etc/apache2/conf-available/security.conf" - -keystone_apache_configs: - - { src: "keystone-ports.conf.j2", dest: "/etc/apache2/ports.conf" } - - { src: "keystone-httpd.conf.j2", dest: "/etc/apache2/sites-available/keystone-httpd.conf" } - - { src: "keystone-httpd-mpm.conf.j2", dest: "/etc/apache2/mods-available/mpm_{{ keystone_httpd_mpm_backend }}.conf" } - -keystone_nginx_conf_path: "sites-available" - -keystone_system_service_name: apache2