library/roles/gitblit: Startup service, sleep during restart otherwise the start part fails silently, ldap authentication in gitblit.properties.

This commit is contained in:
Andrea Dell'Amico 2016-03-25 17:33:35 +01:00
parent 58e2b19ece
commit 52f5f22c76
5 changed files with 17 additions and 7 deletions

View File

@ -11,6 +11,7 @@ gitblit_user: gitblit
gitblit_home: '/srv/{{ gitblit_user }}'
gitblit_data_dir: /srv/gitblit_data
gitblit_java_heap: 2048M
gitblit_jvm_opts: ""
gitblit_http_port: 8080
gitblit_https_port: 0
gitblit_redirect_to_https: "false"
@ -31,6 +32,7 @@ gitblit_enable_git_servlet: "true"
gitblit_tickets_service: ""
gitblit_accept_new_tickets: "false"
gitblit_allow_deleting_non_empty_repo: "false"
gitblit_auth_ldap_enabled: True
gitblit_auth_providers: ldap
gitblit_web_sitename: ""
gitblit_web_logo: "${baseFolder}/logo.png"

View File

@ -19,11 +19,12 @@ GITBLIT_PATH=/opt/gitblit
GITBLIT_BASE_FOLDER=/opt/gitblit/data
GITBLIT_USER="gitblit"
GITBLIT_JAVA_HEAP=1024M
JVM_OPTS=
#source ${GITBLIT_PATH}/java-proxy-config.sh
if [ -f /etc/default/gitblit ] ; then
. /etc/default/gitblit
fi
ARGS="-server -Xmx${GITBLIT_JAVA_HEAP} ${JAVA_PROXY_CONFIG} -Djava.awt.headless=true -jar gitblit.jar --baseFolder $GITBLIT_BASE_FOLDER --dailyLogFile"
ARGS="-server -Xmx${GITBLIT_JAVA_HEAP} ${JVM_OPTS} ${JAVA_PROXY_CONFIG} -Djava.awt.headless=true -jar gitblit.jar --baseFolder $GITBLIT_BASE_FOLDER --dailyLogFile"
RETVAL=0

View File

@ -1,4 +1,4 @@
---
- name: Restart gitblit
service: name=gitblit state=restarted
service: name=gitblit state=restarted sleep=60
when: gitblit_enabled

View File

@ -1,5 +1,5 @@
GITBLIT_PATH={{ gitblit_home }}/service
GITBLIT_BASE_FOLDER={{ gitblit_data_dir }}
GITBLIT_USER="{{ gitblit_user }}"
GITBLIT_JAVA_HEAP={{ gitblit_java_heap }}
ARGS="-server -Xmx${GITBLIT_JAVA_HEAP} ${JAVA_PROXY_CONFIG} -Djava.awt.headless=true -jar gitblit.jar --baseFolder $GITBLIT_BASE_FOLDER --dailyLogFile"
export GITBLIT_PATH={{ gitblit_home }}/service
export GITBLIT_BASE_FOLDER={{ gitblit_data_dir }}
export GITBLIT_USER="{{ gitblit_user }}"
export GITBLIT_JAVA_HEAP={{ gitblit_java_heap }}
export JVM_OPTS="{{ gitblit_jvm_opts }}"

View File

@ -56,6 +56,13 @@ web.headerLogo = {{ gitblit_web_logo }}
web.canonicalUrl = {{ gitblit_canonical_url }}
#
# Auth
#
#
{% if gitblit_auth_ldap_enabled %}
realm.userService = com.gitblit.LdapUserService
realm.ldap.backingUserService = ${baseFolder}/users.conf
{% endif %}
realm.windows.permitBuiltInAdministrators = {{ gitblit_windows_permitbuiltinadmin }}
# Redmine backend
realm.redmine.url = {{ gitblit_redmine_url }}