1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

POSTGRESQL rework

This commit is contained in:
Jerry Vonau 2020-01-04 21:38:54 -06:00
parent 3b1317eb7a
commit b31e613997
5 changed files with 49 additions and 11 deletions

View file

@ -135,12 +135,6 @@
# mongodb_enabled: True
# when: sugarizer_enabled | bool
# There might be other db's
- name: Turn on both vars for PostgreSQL if moodle_enabled or pathagar_enabled
set_fact:
postgresql_install: True
postgresql_enabled: True
when: moodle_enabled or (pathagar_enabled is defined and pathagar_enabled)
#- name: Turn on vars for Docker if SchoolTool is to be installed
# set_fact:

View file

@ -48,11 +48,11 @@
# has no "when: XXXXX_install" flag
#tags: base, homepage
- name: POSTGRESQL
include_role:
name: postgresql
when: postgresql_install | bool
#tags: postgresql, pathagar, moodle
#- name: POSTGRESQL
# include_role:
# name: postgresql
# when: postgresql_install | bool
# tags: postgresql, pathagar, moodle
- name: CUPS
include_role:

View file

@ -1,3 +1,18 @@
- name: Enable postgresql-iiab service when moodle_enabled
systemd:
name: postgresql-iiab
state: started
enabled: yes
when: moodle_enabled
# if the only service using the backend db disable if not running
- name: Disable postgresql-iiab service when not moodle_enabled
systemd:
name: postgresql-iiab
state: stopped
enabled: no
when: not moodle_enabled and not (pathagar_enabled is defined and pathagar_enabled)
# Apache
- name: Enable http://box/moodle via Apache

View file

@ -1,3 +1,12 @@
- name: Turn on enabled vars for PostgreSQL
set_fact:
postgresql_install: True
postgresql_enabled: True
- name: POSTGRESQL
include_role:
name: postgresql
- name: "Install packages: python-psycopg2, php-pgsql (OS's other than debuntu)"
package:
name:

View file

@ -1,3 +1,12 @@
- name: Turn on enabled vars for PostgreSQL
set_fact:
postgresql_install: True
postgresql_enabled: True
- name: POSTGRESQL
include_role:
name: postgresql
- name: Remove package Pathagar (in case rpm?)
package:
name: pathagar
@ -93,6 +102,8 @@
service:
name: postgresql-iiab
state: started
enabled: yes
when: pathagar_enabled
- name: Enable Pathagar postgresql user access by md5 method
lineinfile:
@ -193,6 +204,15 @@
name: "{{ apache_service }}"
state: reloaded
# if the only service using the backend db disable if not running
- name: Disable postgresql-iiab service when not pathagar_enabled
systemd:
name: postgresql-iiab
state: stopped
enabled: no
when: not moodle_enabled and not pathagar_enabled
- name: Add 'pathagar' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}"