imfreedom/ansible

6bf95b9e6799
Remove teamcity_server var from playbooks

This variable is already defined in the inventory and the way it is right now
prevents us from testing in a local teamcity instance since the value of the
variable available in the playbook will supercede the one we define in a custom
inventory.

Also removing some extra empty newlines at the end of files that are not needed.

Testing Done:
Replaced the call to the roles by a simple `fail` call with a msg that prints the variable value and the printed value was the one it got from the inventory.
Can't really test more than that since I don't have access to the imfreedom teamcity instance but I have no reason to believe that this would break things since the variable is defined for all hosts in `inventory/pidgin/hosts.yaml`.

Reviewed at https://reviews.imfreedom.org/r/1141/
#!/bin/sh
# PROVIDE: teamcity-agent
# REQUIRE: DAEMON
. /etc/rc.subr
name="teamcity_agent"
rcvar="teamcity_agent_enable"
load_rc_config "${name}"
: ${teamcity_agent_enable:="NO"}
: ${teamcity_agent_user:="{{teamcity_user}}"}
: ${teamcity_agent_group:="{{teamcity_group}}"}
: ${teamcity_agent_home:="{{teamcity_agent_home}}"}
PATH="$PATH:/usr/local/bin"
pidfile="{{teamcity_agent_home}}logs/buildAgent.pid"
procname="/usr/local/{{teamcity_jdk_version}}/bin/java"
command="/usr/sbin/daemon"
command_args="-S -f -p ${pidfile} /usr/bin/env ${teamcity_agent_env} ${procname} -ea -Xms16m -Xmx64m -cp ${teamcity_agent_home}/launcher/lib/launcher.jar jetbrains.buildServer.agent.Launcher -ea -Xmx384m -Dteamcity_logs=${teamcity_agent_home}/logs/ -Dlog4j.configuration=file:${teamcity_agent_home}/conf/teamcity-agent-log4j.xml jetbrains.buildServer.agent.AgentMain -file ${teamcity_agent_home}/conf/buildAgent.properties"
teamcity_agent_start_precmd() {
piddir=$(dirname ${pidfile})
if [ ! -d ${piddir} ]; then
install -o ${teamcity_agent_user} -g ${teamcity_agent_group} -d ${piddir}
fi
if [ ! -e ${pidfile} ]; then
install -o ${teamcity_agent_user} -g ${teamcity_agent_group} -m 644 /dev/null ${pidfile}
fi
}
start_precmd=teamcity_agent_start_precmd
run_rc_command "$1"