]> freie-schul-it.de Git - fsit_smgt.git/commitdiff
kivitendo-task um postgresql erweitert
authorUllli <ullli@freie-schul-it.de>
Sat, 6 Jun 2026 06:28:31 +0000 (08:28 +0200)
committerUllli <ullli@freie-schul-it.de>
Sat, 6 Jun 2026 06:28:31 +0000 (08:28 +0200)
handlers/main.yml
tasks/kivitendo.yml

index dd8735ff0d1e39169485339c4e8b827b7ac0388d..6e4c893f1f104102be1c4b12a5c469991a216031 100644 (file)
   ansible.builtin.service:
     name: apache2
     state: restarted
+- name: Restart postgresql
+  ansible.builtin.service:
+    name: postgresql
+    state: restarted
 #- name: start fusioninventory-client
 #  ansible.builtin.service:
 #    name: fusioninventory-agent.service
index 7c288ff03954a6ab9042036f4c677d06271677ba..faaa69f3f7fe104cff9175d534d62a5807c2bfa7 100644 (file)
     state: directory
     mode:  'u=Xrw,g=Xrw,o='
 
-
 - name: Make kivi_documents directory.
   ansible.builtin.file:
     path: /var/www/kivitendo-erp/kivi_documents
     - templates
     - webdav
 
+# postrgesql for kivi
+- name: Remove existing rules to ensure correct ordering of the rules
+  ansible.builtin.postgresql_pg_hba:
+    dest:      /etc/postgresql/17/main/pg_hba.conf
+    overwrite: true
+    contype:   local
+    users:     all
+    databases: all
+    method:    peer
+
+- name: Allow access from localhost to Postgresql.
+  ansible.builtin.postgresql_pg_hba:
+    dest:      /etc/postgresql/17/main/pg_hba.conf
+    contype:   host
+    users:     postgres
+    databases: all
+    address:   127.0.0.1/32
+    method:    trust
+  notify: Restart postgresql
 
 # Anleitung adaptiert
 # https://github.com/kivitendo/kivitendo-ansible/blob/master/main.yml