roles/postgresql-server: Remove postgresql-setup

The *postgresql-setup* service is no longer necessary, as upstream has
fixed the SELinux policy to allow root to invoke the `postgresql-setup`
command directly.
jenkins-master
Dustin 2020-07-14 10:56:01 -05:00
parent f4e5aacf52
commit a614f7b5c7
2 changed files with 4 additions and 22 deletions

View File

@ -4,18 +4,11 @@
state=present state=present
tags: tags:
- install - install
- name: ensure postgresql data directory exists
command:
postgresql-setup initdb
creates={{ pgdata_dir }}/PG_VERSION
- name: ensure postgresql-setup unit is installed
template:
src=postgresql-setup.service.j2
dest=/etc/systemd/system/postgresql-setup.service
mode=0644
notify: reload systemd
- meta: flush_handlers
- name: ensure postgresql-setup has started
service:
name=postgresql-setup
state=started
- name: ensure postgresql server certificate is installed - name: ensure postgresql server certificate is installed
copy: copy:
src: '{{ item }}' src: '{{ item }}'

View File

@ -1,11 +0,0 @@
[Unit]
Before=postgresql.service
[Service]
Type=oneshot
RemainAfterExit=true
Environment=PGDATA={{ pgdata_dir }}
Environment=LANG={{ pg_locale }}
User=postgres
Group=postgres
ExecStart=/bin/sh -c "[ -f ${PGDATA}/PG_VERSION ] || initdb -D ${PGDATA}"