Add upstart logic for ubuntu systems
Change-Id: Iaab229aab0294329ca6fefbea274f69884f03105 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
006a3d1fe2
commit
8f9c7cf2d2
1
files/etc/default/nodepool
Symbolic link
1
files/etc/default/nodepool
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../nodepool.sysconfig
|
20
files/etc/init/nodepool.conf
Normal file
20
files/etc/init/nodepool.conf
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# nodepool - Manage a pool of nodes for a distributed test infrastructure
|
||||||
|
#
|
||||||
|
# Nodepool is a system for launching single-use test nodes on demand based on
|
||||||
|
# images built with cached data.
|
||||||
|
|
||||||
|
description "Manage a pool of nodes for a distributed test infrastructure"
|
||||||
|
|
||||||
|
start on runlevel [2345]
|
||||||
|
stop on runlevel [!2345]
|
||||||
|
|
||||||
|
expect fork
|
||||||
|
respawn
|
||||||
|
|
||||||
|
setgid nodepool
|
||||||
|
setuid nodepool
|
||||||
|
|
||||||
|
script
|
||||||
|
. /etc/default/nodepool
|
||||||
|
exec /usr/bin/nodepoold -d -l /etc/nodepool/logging.conf
|
||||||
|
end script
|
@ -12,5 +12,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
---
|
---
|
||||||
|
- include: service/debian.yaml
|
||||||
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
- include: service/redhat.yaml
|
- include: service/redhat.yaml
|
||||||
when: ansible_os_family == 'RedHat'
|
when: ansible_os_family == 'RedHat'
|
||||||
|
30
tasks/service/debian.yaml
Normal file
30
tasks/service/debian.yaml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
# Copyright 2015 Red Hat, 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: Copy upstart file into place.
|
||||||
|
copy:
|
||||||
|
dest: /etc/init
|
||||||
|
src: ../../files/etc/init/nodepool.conf
|
||||||
|
|
||||||
|
- name: Copy default file into place.
|
||||||
|
copy:
|
||||||
|
dest: /etc/default/nodepool
|
||||||
|
src: ../../files/etc/default/nodepool
|
||||||
|
|
||||||
|
- name: Enable nodepool service.
|
||||||
|
service:
|
||||||
|
enabled: yes
|
||||||
|
name: nodepool
|
||||||
|
notify:
|
||||||
|
- Restart nodepool
|
Loading…
Reference in New Issue
Block a user