diff --git a/Vagrantfile b/Vagrantfile index 44872e1e..40fe9135 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.provision "shell", inline: <<-SHELL sudo su - cd /vagrant diff --git a/defaults/main.yml b/defaults/main.yml index 178e8599..30303058 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -213,7 +213,7 @@ swift_rabbitmq_telemetry_use_ssl: "False" # This var is calculated by the play itself, and should not need to be set # It is defaulted for the benefit of the swift_proxy host which needs it -# for the swift-init-upstart.j2 template file. +# for the swift-init-systemd.j2 template file. swift_dedicated_replication: False swift_service_in_ldap: false diff --git a/handlers/main.yml b/handlers/main.yml index 65a9e0e2..fe77c180 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -18,11 +18,6 @@ notify: - Restart swift services -- name: Reload upstart init scripts - command: initctl reload-configuration - notify: - - Restart swift services - - name: Restart swift services service: name: "{{ item.value.program_name }}" diff --git a/meta/main.yml b/meta/main.yml index a896bd97..39c05452 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -22,7 +22,10 @@ galaxy_info: platforms: - name: Ubuntu versions: - - trusty + - xenial + - name: CentOS + versions: + - 7 categories: - cloud - python diff --git a/tasks/swift_init_common.yml b/tasks/swift_init_common.yml index 0893e9f4..db08407a 100644 --- a/tasks/swift_init_common.yml +++ b/tasks/swift_init_common.yml @@ -13,11 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -- include: swift_init_upstart.yml - static: no - when: - - ansible_service_mgr == 'upstart' - - include: swift_init_systemd.yml static: no when: diff --git a/tasks/swift_init_upstart.yml b/tasks/swift_init_upstart.yml deleted file mode 100644 index 37f9747d..00000000 --- a/tasks/swift_init_upstart.yml +++ /dev/null @@ -1,26 +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. - -- name: Place the init script - template: - src: "swift-upstart-init.j2" - dest: "/etc/init/{{ item.value.program_name }}.conf" - mode: "0644" - owner: "root" - group: "root" - with_dict: "{{ swift_services }}" - when: inventory_hostname in groups[item.value.group] - notify: - - Reload upstart init scripts diff --git a/templates/swift-upstart-init.j2 b/templates/swift-upstart-init.j2 deleted file mode 100644 index 8880d5aa..00000000 --- a/templates/swift-upstart-init.j2 +++ /dev/null @@ -1,47 +0,0 @@ -# {{ ansible_managed }} -description "{{ item.value.program_name }}" -author "Kevin Carter " - -start on runlevel [2345] -stop on runlevel [016] - -respawn -respawn limit 10 5 - -# Set the RUNBIN environment variable -env RUNBIN="{{ swift_bin }}/{{ item.value.program_binary | default(item.value.program_name) }}" -{% if swift_pypy_enabled %} -{% if swift_pypy_gc_min is defined %} -env PYPY_GC_MIN={{ swift_pypy_gc_min }} -{% endif %} -{% if swift_pypy_gc_max is defined %} -env PYPY_GC_MAX={{ swift_pypy_gc_max }} -{% endif %} -{% endif %} - -# Change directory to service users home -chdir "{{ swift_system_home_folder }}" - -# Pre start actions -pre-start script - mkdir -p "/var/run/{{ item.value.program_binary | default(item.value.program_name) }}" - chown {{ swift_system_user_name }}:{{ swift_system_group_name }} "/var/run/{{ item.value.program_binary | default(item.value.program_name) }}" - - mkdir -p "/var/lock/{{ item.value.program_binary | default(item.value.program_name) }}" - chown {{ swift_system_user_name }}:{{ swift_system_group_name }} "/var/lock/{{ item.value.program_binary | default(item.value.program_name) }}" - - . {{ swift_bin }}/activate - -end script - -# Post stop actions -post-stop script - rm "/var/run/{{ item.value.program_binary | default(item.value.program_name) }}/{{ item.value.program_name }}.pid" -end script - -# Run the start up job -exec start-stop-daemon --start \ - --chuid {{ swift_system_user_name }} \ - --make-pidfile \ - --pidfile /var/run/{{ item.value.program_binary | default(item.value.program_name) }}/{{ item.value.program_name }}.pid \ - --exec "{{ item.value.program_override|default('$RUNBIN') }}" "{{ item.value.program_config_options|default('') }}"