Commit 30219b3b authored by viscapi's avatar viscapi
Browse files

Simplified systemd.yml

parent 8fc73879
---
- name: Activate postgresql-9.6 service for CentOS 7
systemd:
enabled: yes
name: postgresql-9.6
when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7")
- name: Activate postgresql service for CentOS 8
systemd:
enabled: yes
name: postgresql
when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8")
- name: Set PGDATA environment variable on CentOS 7
lineinfile:
path: /usr/lib/systemd/system/postgresql-9.6.service
......@@ -26,20 +14,20 @@
line: 'Environment=PGDATA={{path_to_icat}}'
when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8")
- name: Reload systemd daemon
systemd:
daemon_reload: yes
- name: Start postgresql-9.6 service on CentOS 7
systemd:
name: postgresql-9.6
state: started
daemon_reload: yes
enabled: yes
when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7")
- name: Start postgresql service on CentOS 8
systemd:
name: postgresql
state: started
daemon_reload: yes
enabled: yes
when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8")
...
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