Merge "Remove Trusty support from os_magnum role"
This commit is contained in:
commit
0d71320f6c
|
@ -1,5 +1,5 @@
|
||||||
Vagrant.configure(2) do |config|
|
Vagrant.configure(2) do |config|
|
||||||
config.vm.box = "ubuntu/trusty64"
|
config.vm.box = "ubuntu/xenial64"
|
||||||
config.vm.provision "shell", inline: <<-SHELL
|
config.vm.provision "shell", inline: <<-SHELL
|
||||||
sudo su -
|
sudo su -
|
||||||
cd /vagrant
|
cd /vagrant
|
||||||
|
|
|
@ -32,7 +32,7 @@ libselinux-python [platform:rpm]
|
||||||
# For SSL SNI support
|
# For SSL SNI support
|
||||||
python-pyasn1 [platform:dpkg]
|
python-pyasn1 [platform:dpkg]
|
||||||
python-openssl [platform:dpkg]
|
python-openssl [platform:dpkg]
|
||||||
python-ndg-httpsclient [platform:ubuntu !platform:ubuntu-trusty]
|
python-ndg-httpsclient [platform:ubuntu]
|
||||||
python2-pyasn1 [platform:rpm]
|
python2-pyasn1 [platform:rpm]
|
||||||
pyOpenSSL [platform:rpm]
|
pyOpenSSL [platform:rpm]
|
||||||
python-ndg_httpsclient [platform:rpm]
|
python-ndg_httpsclient [platform:rpm]
|
||||||
|
|
|
@ -9,7 +9,6 @@ galaxy_info:
|
||||||
platforms:
|
platforms:
|
||||||
- name: Ubuntu
|
- name: Ubuntu
|
||||||
versions:
|
versions:
|
||||||
- trusty
|
|
||||||
- xenial
|
- xenial
|
||||||
# Below are all categories currently available. Just as with
|
# Below are all categories currently available. Just as with
|
||||||
# the platforms above, uncomment those that apply to your role.
|
# the platforms above, uncomment those that apply to your role.
|
||||||
|
|
|
@ -14,11 +14,6 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- include: magnum_init_upstart.yml
|
|
||||||
static: no
|
|
||||||
when:
|
|
||||||
- ansible_service_mgr == 'upstart'
|
|
||||||
|
|
||||||
- include: magnum_init_systemd.yml
|
- include: magnum_init_systemd.yml
|
||||||
static: no
|
static: no
|
||||||
when:
|
when:
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
---
|
|
||||||
# Copyright 2016, Ian Cordasco
|
|
||||||
#
|
|
||||||
# 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: Template the init script
|
|
||||||
template:
|
|
||||||
src: "upstart-init.j2"
|
|
||||||
dest: "/etc/init/{{ program_name }}.conf"
|
|
||||||
mode: "0644"
|
|
||||||
owner: "root"
|
|
||||||
group: "root"
|
|
||||||
register: upstart_init
|
|
||||||
|
|
||||||
- name: Reload init scripts
|
|
||||||
command: initctl reload-configuration
|
|
||||||
when: upstart_init | changed
|
|
||||||
notify:
|
|
||||||
- Restart magnum services
|
|
|
@ -1,42 +0,0 @@
|
||||||
# {{ ansible_managed }}
|
|
||||||
|
|
||||||
description "{{ program_name }}"
|
|
||||||
author "Kevin Carter <kevin.carter@rackspace.com>"
|
|
||||||
|
|
||||||
start on runlevel [2345]
|
|
||||||
stop on runlevel [016]
|
|
||||||
|
|
||||||
respawn
|
|
||||||
respawn limit 10 5
|
|
||||||
|
|
||||||
# Set the RUNBIN environment variable
|
|
||||||
env RUNBIN="{{ magnum_bin }}/{{ program_name }}"
|
|
||||||
|
|
||||||
# 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 }}"
|
|
||||||
|
|
||||||
. {{ magnum_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 \
|
|
||||||
--chuid {{ system_user }} \
|
|
||||||
--make-pidfile \
|
|
||||||
--pidfile /var/run/{{ program_name }}/{{ program_name }}.pid \
|
|
||||||
--exec "{{ program_override|default('$RUNBIN') }}" \
|
|
||||||
-- {{ program_config_options|default('') }} \
|
|
||||||
--log-file=/var/log/magnum/{{ program_name }}.log
|
|
Loading…
Reference in New Issue