mirror of
https://github.com/ansible/awx.git
synced 2026-02-01 17:48:10 -03:30
Add ansible-tower.{default,sysconfig} script
The 'ansible-tower' service script now comes with an additional file:
/etc/{default,sysconfig}/ansible-tower
This file is used to specify the services managed by the 'ansible-tower'
service script. The presence of this file allows admins (or the setup
playbook) to customize the services managed. For example, when using a
remote postgres server, one would remove 'postgresql' from the list of
tower managed services.
This commit is contained in:
@@ -18,18 +18,16 @@
|
||||
|
||||
# Default configured services
|
||||
if [ -e /etc/debian_version ]; then
|
||||
SERVICES="postgresql redis-server apache2 supervisor"
|
||||
TOWER_CONFIG="/etc/default/tower"
|
||||
TOWER_CONFIG="/etc/default/ansible-tower"
|
||||
else
|
||||
SERVICES="postgresql redis httpd supervisord"
|
||||
TOWER_CONFIG="/etc/sysconfig/tower"
|
||||
TOWER_CONFIG="/etc/sysconfig/ansible-tower"
|
||||
fi
|
||||
|
||||
# Load any configuration
|
||||
# Load default configuration
|
||||
[ -e "${TOWER_CONFIG}" ] && . "${TOWER_CONFIG}"
|
||||
|
||||
service_action() {
|
||||
for svc in ${SERVICES}; do
|
||||
for svc in ${TOWER_SERVICES}; do
|
||||
service ${svc} $1
|
||||
this_return=$?
|
||||
if [ $this_return -gt $worst_return ]; then
|
||||
|
||||
Reference in New Issue
Block a user