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

postgresql/tasks/install.yml: remove 2 systemd stanzas

This commit is contained in:
A Holt 2020-10-28 16:54:51 -04:00 committed by GitHub
parent 507cc1322b
commit 6a55360017
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,25 +68,31 @@
group: postgres group: postgres
mode: '0640' mode: '0640'
- name: Disable & Stop stock 'postgresql' systemd service - name: Disable & Stop stock 'postgresql' (parent) systemd service
systemd: systemd:
name: postgresql name: postgresql
state: stopped state: stopped
enabled: no enabled: no
- name: Disable & Stop stock 'postgresql@11-main.service' systemd service, if real Debian 10 # Above parent service postgresql.service uses template postgresql@.service to
systemd: # start/stop` child service e.g. postgresql@11-main.service on Debian 10, or
name: postgresql@11-main.service # postgresql@13-main.service on Debian 11. So these 2 stanzas dont do anything:
state: stopped
enabled: no
when: is_debian_10 and not is_raspbian # Debian 11 appears not to need such
- name: Disable & Stop stock 'postgresql@' systemd service, for real Debian 10+ # 'systemctl is-enabled postgresql@' shows 'indirect' before + after
systemd: #- name: Disable stock 'postgresql@' (template) if real Debian
name: postgresql@ # systemd:
state: stopped # name: postgresql@
enabled: no # #state: stopped # Error if you attempt to stop template
when: is_debian and not is_raspbian # Especially for Debian 10, 11 & higher # enabled: no # Doesn't do anything
# when: is_debian and not is_raspbian
# 'systemctl is-enabled postgresql@13-main.service' shows 'enabled-runtime' before + after
#- name: Disable & Stop stock 'postgresql@{{ postgresql_version }}-main.service' (child service) if real Debian
# systemd:
# name: "postgresql@{{ postgresql_version }}-main.service"
# state: stopped # Already done by parent above
# enabled: no # Doesn't do anything
# when: is_debian and not is_raspbian
# RECORD PostgreSQL AS INSTALLED # RECORD PostgreSQL AS INSTALLED