Browse Source

add comments for postgres variables

services
Edoardo Putti 9 years ago
parent
commit
0954205f19
2 changed files with 12 additions and 6 deletions
  1. +10
    -4
      roles/gogs/tasks/main.yaml
  2. +2
    -2
      roles/gogs/templates/app.ini

+ 10
- 4
roles/gogs/tasks/main.yaml View File

@ -2,11 +2,19 @@
gen_passwd: length=20
register: db_password
- block:
- postgresql_db: name=gogs
- postgresql_db:
# database name
name=gogs
state=present
- postgresql_user:
# the user
name: gogs
password: "{{ db_password.passwd }}"
# which db owns
db: gogs
# set login password
login_password: "{{ db_password.passwd }}"
# privileges on gogs db
priv: ALL
become: true
become_method: su
@ -23,11 +31,9 @@
apt_repository: repo='deb https://deb.packager.io/gh/pkgr/gogs jessie pkgr' state=present
- name: Install Gogs
apt: name=gogs update_cache=yes
- name: Custom Gogs configuration directory
file: path=/etc/gogs/custom/conf state=directory
- name: Copy Gogs configuration
template:
dest=/etc/gogs/custom/conf/app.ini
dest=/etc/gogs/conf/app.ini
src=templates/app.ini
owner=gogs
group=gogs


+ 2
- 2
roles/gogs/templates/app.ini View File

@ -110,7 +110,7 @@ DB_TYPE = postgres
HOST = 127.0.0.1:5432
NAME = gogs
USER = gogs
PASSWD = `{{ db_password.passwd }}`
PASSWD = {{ db_password.passwd }}
; For "postgres" only, either "disable", "require" or "verify-full"
SSL_MODE = disable
; For "sqlite3" and "tidb", use absolute path when you start as service
@ -121,7 +121,7 @@ PATH = data/gogs.db
[security]
INSTALL_LOCK = false
; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!!
SECRET_KEY = !#@FDEWREWR&*(
SECRET_KEY = {{ gogs_password.passwd }}
; Auto-login remember days
LOGIN_REMEMBER_DAYS = 7
COOKIE_USERNAME = gogs_awesome


Loading…
Cancel
Save