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:
parent
507cc1322b
commit
6a55360017
1 changed files with 19 additions and 13 deletions
|
@ -68,25 +68,31 @@
|
|||
group: postgres
|
||||
mode: '0640'
|
||||
|
||||
- name: Disable & Stop stock 'postgresql' systemd service
|
||||
- name: Disable & Stop stock 'postgresql' (parent) systemd service
|
||||
systemd:
|
||||
name: postgresql
|
||||
state: stopped
|
||||
enabled: no
|
||||
|
||||
- name: Disable & Stop stock 'postgresql@11-main.service' systemd service, if real Debian 10
|
||||
systemd:
|
||||
name: postgresql@11-main.service
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: is_debian_10 and not is_raspbian # Debian 11 appears not to need such
|
||||
# Above parent service postgresql.service uses template postgresql@.service to
|
||||
# start/stop` child service e.g. postgresql@11-main.service on Debian 10, or
|
||||
# postgresql@13-main.service on Debian 11. So these 2 stanzas dont do anything:
|
||||
|
||||
- name: Disable & Stop stock 'postgresql@' systemd service, for real Debian 10+
|
||||
systemd:
|
||||
name: postgresql@
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: is_debian and not is_raspbian # Especially for Debian 10, 11 & higher
|
||||
# 'systemctl is-enabled postgresql@' shows 'indirect' before + after
|
||||
#- name: Disable stock 'postgresql@' (template) if real Debian
|
||||
# systemd:
|
||||
# name: postgresql@
|
||||
# #state: stopped # Error if you attempt to stop template
|
||||
# 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue