copr-fe: allow easy PostgreSQL connection to copr-fe user
This commit is contained in:
parent
bc8b471253
commit
00c619b151
4 changed files with 39 additions and 0 deletions
|
@ -28,3 +28,5 @@ copr_pagure_events:
|
||||||
org.fedoraproject.prod.pagure: "https://src.fedoraproject.org/"
|
org.fedoraproject.prod.pagure: "https://src.fedoraproject.org/"
|
||||||
|
|
||||||
copr_messaging_queue: "a9b74258-21c6-4e79-ba65-9e858dc84a2b"
|
copr_messaging_queue: "a9b74258-21c6-4e79-ba65-9e858dc84a2b"
|
||||||
|
|
||||||
|
copr_fe_homedir: /usr/share/copr/coprs_frontend
|
||||||
|
|
|
@ -32,3 +32,5 @@ copr_pagure_events:
|
||||||
io.pagure.stg.pagure: "https://stg.pagure.io"
|
io.pagure.stg.pagure: "https://stg.pagure.io"
|
||||||
|
|
||||||
copr_messaging_queue: "c8e11df7-e863-4ca4-99b9-d37c6663c7f7"
|
copr_messaging_queue: "c8e11df7-e863-4ca4-99b9-d37c6663c7f7"
|
||||||
|
|
||||||
|
copr_fe_homedir: /usr/share/copr/coprs_frontend
|
||||||
|
|
|
@ -157,3 +157,10 @@
|
||||||
when:
|
when:
|
||||||
- ansible_facts.packages['copr-frontend'][0].version is version('1.156', '>=')
|
- ansible_facts.packages['copr-frontend'][0].version is version('1.156', '>=')
|
||||||
- not services_disabled|bool
|
- not services_disabled|bool
|
||||||
|
|
||||||
|
- name: install bashrc file to ease some admin tasks
|
||||||
|
copy:
|
||||||
|
content: |
|
||||||
|
export PGUSER=copr-fe
|
||||||
|
export PGDATABASE=coprdb
|
||||||
|
dest: "{{ copr_fe_homedir }}/.bashrc"
|
||||||
|
|
|
@ -108,3 +108,31 @@
|
||||||
notify: restart postgresql
|
notify: restart postgresql
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
|
||||||
|
- name: install psqlrc file
|
||||||
|
copy:
|
||||||
|
content: |
|
||||||
|
\pset linestyle unicode
|
||||||
|
\pset border 2
|
||||||
|
|
||||||
|
-- Switch pagers with :x and :xx commands
|
||||||
|
\set x '\\setenv PAGER less'
|
||||||
|
\set xx '\\setenv PAGER \'pspg -bX --no-mouse\''
|
||||||
|
:xx
|
||||||
|
dest: "{{ copr_fe_homedir }}/.psqlrc"
|
||||||
|
owner: copr-fe
|
||||||
|
group: copr-fe
|
||||||
|
mode: 0600
|
||||||
|
|
||||||
|
- name: install pgpass file
|
||||||
|
copy:
|
||||||
|
content: |
|
||||||
|
localhost:*:coprdb:copr-fe:{{ copr_database_password }}
|
||||||
|
dest: "{{ copr_fe_homedir }}/.pgpass"
|
||||||
|
owner: copr-fe
|
||||||
|
group: copr-fe
|
||||||
|
mode: 0400
|
||||||
|
|
||||||
|
- name: install pghistory file
|
||||||
|
file: path="{{ copr_fe_homedir }}/.psql_history" state=file
|
||||||
|
owner=copr-fe group=ćopr-fe mode=0600
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue