mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-07 00:57:00 +02:00
Update to 2021-12-01 19:13
This commit is contained in:
37
roles/pgadmin4/tasks/conf.yml
Normal file
37
roles/pgadmin4/tasks/conf.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
|
||||
- name: Deploy local configuration
|
||||
template: src=config_local.py.j2 dest={{ pga_root_dir }}/venv/lib/python3.6/site-packages/pgadmin4/config_local.py
|
||||
notify: restart pgadmin4
|
||||
tags: pgadmin4
|
||||
|
||||
- name: Check if the config DB exists
|
||||
stat: path={{ pga_root_dir }}/data/pgadmin4.db
|
||||
register: pga_db
|
||||
tags: pgadmin4
|
||||
|
||||
- name: Initial setup of pgadmin4
|
||||
expect:
|
||||
command: "{{ pga_root_dir }}/venv/bin/python {{ pga_root_dir }}/venv/lib/python3.6/site-packages/pgadmin4/setup.py"
|
||||
timeout: 120
|
||||
echo: true
|
||||
responses:
|
||||
'Email address:\s?': "admin@{{ ansible_domain }}"
|
||||
'(Retype )?[Pp]assword:\s?': "pgadmin"
|
||||
become_user: pgadmin4_{{ pga_id }}
|
||||
when:
|
||||
- not pga_db.stat.exists
|
||||
- pga_auth | length >= 1
|
||||
tags: pgadmin4
|
||||
|
||||
- name: Initial setup of pgAdmin4
|
||||
command: "{{ pga_root_dir }}/venv/bin/python {{ pga_root_dir }}/venv/lib/python3.6/site-packages/pgadmin4/setup.py"
|
||||
become_user: pgadmin4_{{ pga_id }}
|
||||
when:
|
||||
- not pga_db.stat.exists
|
||||
- pga_auth | length < 1
|
||||
tags: pgadmin4
|
||||
|
||||
- name: Configure logrotate
|
||||
template: src=logrotate.conf.j2 dest=/etc/logrotate.d/pgadmin4_{{ pga_id }}
|
||||
tags: pgadmin4
|
Reference in New Issue
Block a user