♻: move pgsql data dir to standard
All checks were successful
ansible-lint / lint-everything (push) Successful in 1m28s
All checks were successful
ansible-lint / lint-everything (push) Successful in 1m28s
This commit is contained in:
@@ -12,22 +12,6 @@
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Create pgsql directory
|
||||
ansible.builtin.file:
|
||||
path: /srv/postgresql
|
||||
owner: postgres
|
||||
group: postgres
|
||||
state: directory
|
||||
mode: "0o700"
|
||||
|
||||
- name: Populate postgresql directory
|
||||
ansible.builtin.command:
|
||||
cmd: "/usr/lib/postgresql/{{ postgres_pg_version }}/bin/initdb -E UTF-8 /srv/postgresql/"
|
||||
creates: /srv/postgresql/PG_VERSION
|
||||
become: true
|
||||
become_user: postgres
|
||||
notify: Restart postgres
|
||||
|
||||
- name: Put hba configuration files
|
||||
ansible.builtin.copy:
|
||||
src: "files/pg_hba.conf"
|
||||
@@ -35,12 +19,6 @@
|
||||
mode: "0o640"
|
||||
notify: Restart postgres
|
||||
|
||||
- name: Put main configuration files
|
||||
ansible.builtin.template:
|
||||
src: "postgresql.conf.j2"
|
||||
dest: "/etc/postgresql/{{ postgres_pg_version }}/main/postgresql.conf"
|
||||
mode: "0o644"
|
||||
|
||||
- name: Create backup dir
|
||||
ansible.builtin.file:
|
||||
path: /srv/backup/pgsql
|
||||
|
Reference in New Issue
Block a user