Skip to content

Commit

Permalink
Disable postgrespro-std-12 service if it is enabled
Browse files Browse the repository at this point in the history
#38
postgrespro-std service naming support.
  • Loading branch information
vitabaks committed May 19, 2020
1 parent 26bb483 commit e1a795d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion roles/patroni/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,17 @@
name: "postgresql-{{ postgresql_version }}"
enabled: false
daemon_reload: true
when: ansible_os_family == "RedHat"
when: ansible_os_family == "RedHat" and
postgresql_packages is not search("postgrespro")
tags: patroni, postgresql_disable

- name: Disable "postgrespro-std-{{ postgresql_version }}" service (will be managed by patroni)
systemd:
name: "postgrespro-std-{{ postgresql_version }}"
enabled: false
daemon_reload: true
when: ansible_os_family == "RedHat" and
postgresql_packages is search("postgrespro")
tags: patroni, postgresql_disable

# PATRONICTL_CONFIG_FILE (patroni v1.6.1 and higher)
Expand Down

0 comments on commit e1a795d

Please sign in to comment.