Removing unused tasks and templates for upstart
The upstart service tasks and templates were not being used by the role. Change-Id: Ie0964c5402847f0bf4a98d3ff1d0c63f66e4d005
This commit is contained in:
parent
d4826a2817
commit
da805c1133
|
@ -32,8 +32,6 @@
|
|||
when: >
|
||||
inventory_hostname == groups['zaqar_all'][0]
|
||||
|
||||
#- include: zaqar_upstart_init.yml
|
||||
|
||||
- include: zaqar_apache.yml
|
||||
when: zaqar_install_apache | bool
|
||||
|
||||
|
|
|
@ -1,46 +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: "zaqar-upstart-init.j2"
|
||||
dest: "/etc/init/{{ zaqar_api_program_name }}.conf"
|
||||
mode: "0644"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
notify:
|
||||
- Restart zaqar api
|
||||
tags:
|
||||
- upstart-init
|
||||
- zaqar-init
|
||||
|
||||
- name: Reload init scripts
|
||||
shell: |
|
||||
initctl reload-configuration
|
||||
notify:
|
||||
- Restart zaqar api
|
||||
tags:
|
||||
- upstart-init
|
||||
- zaqar-init
|
||||
|
||||
- name: Load service
|
||||
service:
|
||||
name: "{{ zaqar_api_program_name }}"
|
||||
enabled: "yes"
|
||||
notify:
|
||||
- Restart zaqar api
|
||||
tags:
|
||||
- upstart-init
|
||||
- zaqar-init
|
|
@ -1,44 +0,0 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
# vim:set ft=upstart ts=2 et:
|
||||
|
||||
description "{{ zaqar_api_program_name }}"
|
||||
author "Steve Lewis <steve.lewis@rackspace.com>"
|
||||
|
||||
start on runlevel [2345]
|
||||
stop on runlevel [016]
|
||||
|
||||
respawn
|
||||
respawn limit 10 5
|
||||
|
||||
# Set the RUNBIN environment variable
|
||||
env RUNBIN="{{ zaqar_bin }}/{{ zaqar_api_program_name }}"
|
||||
|
||||
# Change directory to service users home
|
||||
chdir "{{ zaqar_system_user_home }}"
|
||||
|
||||
# Pre start actions
|
||||
pre-start script
|
||||
mkdir -p "/var/run/{{ zaqar_api_program_name }}"
|
||||
chown {{ zaqar_system_user_name }}:{{ zaqar_system_group_name }} "/var/run/{{ zaqar_api_program_name }}"
|
||||
|
||||
mkdir -p "/var/lock/{{ zaqar_api_program_name }}"
|
||||
chown {{ zaqar_system_user_name }}:{{ zaqar_system_group_name }} "/var/lock/{{ zaqar_api_program_name }}"
|
||||
|
||||
. {{ zaqar_bin }}/activate
|
||||
|
||||
end script
|
||||
|
||||
# Post stop actions
|
||||
post-stop script
|
||||
rm "/var/run/{{ zaqar_api_program_name }}/{{ zaqar_api_program_name }}.pid"
|
||||
end script
|
||||
|
||||
# Run the start up job
|
||||
exec start-stop-daemon --start \
|
||||
--chuid {{ zaqar_system_user_name }} \
|
||||
--make-pidfile \
|
||||
--pidfile /var/run/{{ zaqar_api_program_name }}/{{ zaqar_api_program_name }}.pid \
|
||||
--exec "{{ zaqar_service_override|default('$RUNBIN') }}" \
|
||||
-- {{ zaqar_service_config_options|default('') }} \
|
||||
--log-file=/var/log/zaqar/{{ zaqar_api_program_name }}.log
|
Loading…
Reference in New Issue