Fix an issue with centos 7 after adding mongo as a service dependency

* Move the ansible-tower service script to a normal bin utility
* Modify the playbook to not call the old meta init script but to use
      the specific services that are needed
This commit is contained in:
Matthew Jones 2015-05-22 10:15:16 -04:00
parent 682a804a55
commit eb42214d90
2 changed files with 25 additions and 31 deletions

View File

@ -21,6 +21,7 @@ else:
etcpath = "/etc/tower"
homedir = "/var/lib/awx"
sharedir = "/usr/share/awx"
bindir = "/usr/bin"
munin_plugin_path = "/etc/munin/plugins/"
munin_plugin_conf_path = "/etc/munin/plugin-conf.d"
@ -129,7 +130,7 @@ setup(
"tools/munin_monitors/socketio_alive",
"tools/munin_monitors/taskmanager_alive"]),
("%s" % munin_plugin_conf_path, ["config/awx_munin_tower_jobs"]),
("%s" % sysinit, ["tools/scripts/ansible-tower"]),
("%s" % bindir, ["tools/scripts/ansible-tower-service"]),
("%s" % sosconfig, ["tools/sosreport/tower.py"])]),
options = {
'egg_info': {

View File

@ -1,20 +1,4 @@
#!/bin/bash
#
# ansible-tower
#
# chkconfig: - 20 80
# description: support init to manage tower and its related services
### BEGIN INIT INFO
# Required-Start: $local_fs $remote_fs $network $named
# Required-Stop: $local_fs $remote_fs $network
# Should-Start: distcache
# Should-Stop:
# Default-Start:
# Default-Stop:
# Short-Description: support init to manage tower and its related services
# Description: Ansible Tower provides an easy-to-use UI and dashboard, role-based access control and more for your Ansible initiative
### END INIT INFO
# Default configured services
if [ -e /etc/debian_version ]; then
@ -66,26 +50,35 @@ service_action() {
done
}
usage() {
echo "Ansible Tower service helper utility"
echo "Usage: $0 {start|stop|restart|status}"
}
worst_return=0
case "$1" in
help | -help | --help | -h)
usage
;;
start)
echo "Starting Tower"
service_action start
;;
echo "Starting Tower"
service_action start
;;
stop)
echo "Stopping Tower"
service_action stop
;;
echo "Stopping Tower"
service_action stop
;;
restart)
echo "Restarting Tower"
service_action stop
service_action start
;;
echo "Restarting Tower"
service_action stop
service_action start
;;
status)
echo "Showing Tower Status"
service_action status
;;
echo "Showing Tower Status"
service_action status
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
usage
worst_return=1
esac
exit $worst_return