mirror of
https://github.com/ansible/awx.git
synced 2026-01-10 15:32:07 -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:
parent
9f6e74ac94
commit
d47d2f5700
1
Makefile
1
Makefile
@ -312,6 +312,7 @@ rpm-build/$(SDIST_TAR_FILE): dist/$(SDIST_TAR_FILE)
|
||||
mkdir -p rpm-build
|
||||
cp packaging/rpm/$(NAME).spec rpm-build/
|
||||
cp packaging/rpm/$(NAME).te rpm-build/
|
||||
cp packaging/rpm/$(NAME).sysconfig rpm-build/
|
||||
cp packaging/remove_tower_source.py rpm-build/
|
||||
if [ "$(OFFICIAL)" != "yes" ] ; then \
|
||||
(cd dist/ && tar zxf $(SDIST_TAR_FILE)) ; \
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user