cleanup
This commit is contained in:
parent
ad3a53bed7
commit
e340d11ad5
@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Restart PostgreSQL
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: postgres
|
||||
state: restarted
|
||||
daemon_reload: True
|
||||
|
@ -1,7 +1,6 @@
|
||||
---
|
||||
- block:
|
||||
- name: Create network specs
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: etc/containers/systemd/postgres.network.j2
|
||||
dest: "/etc/containers/systemd/postgres.network"
|
||||
owner: root
|
||||
@ -22,11 +21,11 @@
|
||||
register: __postgres_volumes_raw
|
||||
|
||||
- name: Register container volumes map
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
__postgres_volumes_map: "{{ __postgres_volumes_raw.results | json_query('[].volume') | items2dict(key_name='Name', value_name='Mountpoint') }}"
|
||||
|
||||
- name: Deploy postgres env files
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "etc/containers/systemd/{{ item }}.j2"
|
||||
dest: "/etc/containers/systemd/{{ item }}"
|
||||
owner: root
|
||||
@ -38,7 +37,7 @@
|
||||
notify: __postgres_restart
|
||||
|
||||
- name: Create container specs
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: etc/containers/systemd/postgres.container.j2
|
||||
dest: "/etc/containers/systemd/postgres.container"
|
||||
owner: root
|
||||
@ -56,10 +55,8 @@
|
||||
when: "'postgres-initdb' in __postgres_volumes_map"
|
||||
|
||||
- name: Ensure service state
|
||||
systemd:
|
||||
ansible.builtin.service:
|
||||
name: "postgres.service"
|
||||
state: started
|
||||
daemon_reload: True
|
||||
enabled: True
|
||||
become: True
|
||||
become_user: root
|
||||
|
Loading…
Reference in New Issue
Block a user