Commit b6b1e9d2 authored by viscapi's avatar viscapi
Browse files

Systemd module can start external PostgreSQL versions now

parent b0fd21ed
......@@ -19,7 +19,14 @@
path: /usr/lib/systemd/system/postgresql.service
regexp: '^Environment=PGDATA='
line: 'Environment=PGDATA={{path_to_icat}}'
when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8")
when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8" and use_distribution_postgresql)
- name: Set PGDATA environment variable on CentOS 8
lineinfile:
path: /usr/lib/systemd/system/postgresql-{{ external_postgresql_version }}.service
regexp: '^Environment=PGDATA='
line: 'Environment=PGDATA={{path_to_icat}}'
when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8" and not use_distribution_postgresql)
- name: Start postgresql service on CentOS 7
systemd:
......@@ -43,6 +50,14 @@
state: started
daemon_reload: yes
enabled: yes
when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8")
when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8" and use_distribution_postgresql)
- name: Start postgresql-{{ external_postgresql_version }} service on CentOS 8
systemd:
name: postgresql-{{ external_postgresql_version }}
state: started
daemon_reload: yes
enabled: yes
when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8" and not use_distribution_postgresql)
...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment