mirror of
https://github.com/ansible/awx.git
synced 2026-03-26 13:25:02 -02:30
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:
3
setup.py
3
setup.py
@@ -21,6 +21,7 @@ else:
|
|||||||
etcpath = "/etc/tower"
|
etcpath = "/etc/tower"
|
||||||
homedir = "/var/lib/awx"
|
homedir = "/var/lib/awx"
|
||||||
sharedir = "/usr/share/awx"
|
sharedir = "/usr/share/awx"
|
||||||
|
bindir = "/usr/bin"
|
||||||
munin_plugin_path = "/etc/munin/plugins/"
|
munin_plugin_path = "/etc/munin/plugins/"
|
||||||
munin_plugin_conf_path = "/etc/munin/plugin-conf.d"
|
munin_plugin_conf_path = "/etc/munin/plugin-conf.d"
|
||||||
|
|
||||||
@@ -129,7 +130,7 @@ setup(
|
|||||||
"tools/munin_monitors/socketio_alive",
|
"tools/munin_monitors/socketio_alive",
|
||||||
"tools/munin_monitors/taskmanager_alive"]),
|
"tools/munin_monitors/taskmanager_alive"]),
|
||||||
("%s" % munin_plugin_conf_path, ["config/awx_munin_tower_jobs"]),
|
("%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"])]),
|
("%s" % sosconfig, ["tools/sosreport/tower.py"])]),
|
||||||
options = {
|
options = {
|
||||||
'egg_info': {
|
'egg_info': {
|
||||||
|
|||||||
@@ -1,20 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# Default configured services
|
||||||
if [ -e /etc/debian_version ]; then
|
if [ -e /etc/debian_version ]; then
|
||||||
@@ -66,26 +50,35 @@ service_action() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo "Ansible Tower service helper utility"
|
||||||
|
echo "Usage: $0 {start|stop|restart|status}"
|
||||||
|
}
|
||||||
|
|
||||||
worst_return=0
|
worst_return=0
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
help | -help | --help | -h)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
start)
|
start)
|
||||||
echo "Starting Tower"
|
echo "Starting Tower"
|
||||||
service_action start
|
service_action start
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
echo "Stopping Tower"
|
echo "Stopping Tower"
|
||||||
service_action stop
|
service_action stop
|
||||||
;;
|
;;
|
||||||
restart)
|
restart)
|
||||||
echo "Restarting Tower"
|
echo "Restarting Tower"
|
||||||
service_action stop
|
service_action stop
|
||||||
service_action start
|
service_action start
|
||||||
;;
|
;;
|
||||||
status)
|
status)
|
||||||
echo "Showing Tower Status"
|
echo "Showing Tower Status"
|
||||||
service_action status
|
service_action status
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 {start|stop|restart|status}"
|
usage
|
||||||
|
worst_return=1
|
||||||
esac
|
esac
|
||||||
exit $worst_return
|
exit $worst_return
|
||||||
Reference in New Issue
Block a user