adapter: mysql
database: foreman
username: root
password:
host: localhost
socket: "/var/lib/mysql/mysql.sock"
development:
adapter: mysql
database: foremandevel
username: root
password:
host: localhost
socket: "/var/lib/mysql/mysql.sock"
test:
adapter: mysql
database: foremantest
username: root
password:
host: localhost
socket: "/var/lib/mysql/mysql.sock"
#FOREMAN_HOME=/usr/share/foreman
# the port which foreman web server is running at
# note that if the foreman user is not root, it has to be a > 1024
#FOREMAN_PORT=3000
# the user which runs the web interface
#FOREMAN_USER=foreman
# the rails environment in which foreman runs
#FOREMAN_ENV=production
#
# Init script for foreman
#
# chkconfig: - 85 15
# description: Init script for foreman
# Source function library.
. /etc/rc.d/init.d/functions
if [ -f /etc/sysconfig/foreman ]; then
. /etc/sysconfig/foreman
fi
prog=foreman
RETVAL=0
# open port 80 need root user
FOREMAN_PORT=${FOREMAN_PORT:-3000}
FOREMAN_USER=${FOREMAN_USER:-root}
FOREMAN_HOME=${FOREMAN_HOME:-/opt/foreman}
FOREMAN_ENV=${FOREMAN_ENV:-production}
FOREMAN_PID=${FOREMAN_PID:-${FOREMAN_HOME}/tmp/pids/server.pid}
start() {
echo -n $"Starting $prog: "
daemon --user ${FOREMAN_USER} /usr/bin/ruby ${FOREMAN_HOME}/script/server -p ${FOREMAN_PORT} -e ${FOREMAN_ENV} -d > /dev/null
# daemon /usr/bin/ruby ${FOREMAN_HOME}/script/server -p 80 -e ${FOREMAN_ENV} -d >/dev/null
RETVAL=$?
if [ $RETVAL = 0 ]
then
echo_success
else
echo_failure
fi
echo
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
if [ -f ${FOREMAN_PID} ]; then
killproc -p ${FOREMAN_PID}
RETVAL=$?
else
echo -n $"Foreman was not running.";
failure $"Foreman was not running.";
echo
return 1
fi
echo
return $RETVAL
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
echo -n "Foreman"
status -p $FOREMAN_PID
RETVAL=$?
;;
restart)
stop
start
;;
*)
echo $"Usage: $prog {start|stop|restart}"
exit 1
esac
exit $RETVAL
# config/email.yaml
production:
delivery_method: :smtp
smtp_settings:
address: mail.example.com
port: 25
domain: example.com
authentication: :none
:tftppath: tftp/
:rrd_report_url: report/
#:ldap: true
#your default puppet server - can be overridden in the host level
#if none specified, plain "puppet" will be used.
:puppet_server: puppet
:unattended: false
#use the following setting to override the default 30 minutes puppet run interval - value must be in minutes
:puppet_interval: 10
:document_root: /var/www
#:puppetrun: true
:administrator: admin@example.com
:failed_report_email_notification: true