mirror of
https://github.com/ansible/awx.git
synced 2026-03-22 11:25:08 -02: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:
1
Makefile
1
Makefile
@@ -312,6 +312,7 @@ rpm-build/$(SDIST_TAR_FILE): dist/$(SDIST_TAR_FILE)
|
|||||||
mkdir -p rpm-build
|
mkdir -p rpm-build
|
||||||
cp packaging/rpm/$(NAME).spec rpm-build/
|
cp packaging/rpm/$(NAME).spec rpm-build/
|
||||||
cp packaging/rpm/$(NAME).te rpm-build/
|
cp packaging/rpm/$(NAME).te rpm-build/
|
||||||
|
cp packaging/rpm/$(NAME).sysconfig rpm-build/
|
||||||
cp packaging/remove_tower_source.py rpm-build/
|
cp packaging/remove_tower_source.py rpm-build/
|
||||||
if [ "$(OFFICIAL)" != "yes" ] ; then \
|
if [ "$(OFFICIAL)" != "yes" ] ; then \
|
||||||
(cd dist/ && tar zxf $(SDIST_TAR_FILE)) ; \
|
(cd dist/ && tar zxf $(SDIST_TAR_FILE)) ; \
|
||||||
|
|||||||
@@ -18,18 +18,16 @@
|
|||||||
|
|
||||||
# Default configured services
|
# Default configured services
|
||||||
if [ -e /etc/debian_version ]; then
|
if [ -e /etc/debian_version ]; then
|
||||||
SERVICES="postgresql redis-server apache2 supervisor"
|
TOWER_CONFIG="/etc/default/ansible-tower"
|
||||||
TOWER_CONFIG="/etc/default/tower"
|
|
||||||
else
|
else
|
||||||
SERVICES="postgresql redis httpd supervisord"
|
TOWER_CONFIG="/etc/sysconfig/ansible-tower"
|
||||||
TOWER_CONFIG="/etc/sysconfig/tower"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Load any configuration
|
# Load default configuration
|
||||||
[ -e "${TOWER_CONFIG}" ] && . "${TOWER_CONFIG}"
|
[ -e "${TOWER_CONFIG}" ] && . "${TOWER_CONFIG}"
|
||||||
|
|
||||||
service_action() {
|
service_action() {
|
||||||
for svc in ${SERVICES}; do
|
for svc in ${TOWER_SERVICES}; do
|
||||||
service ${svc} $1
|
service ${svc} $1
|
||||||
this_return=$?
|
this_return=$?
|
||||||
if [ $this_return -gt $worst_return ]; then
|
if [ $this_return -gt $worst_return ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user