File tree Expand file tree Collapse file tree 1 file changed +10
-15
lines changed
Expand file tree Collapse file tree 1 file changed +10
-15
lines changed Original file line number Diff line number Diff line change 2828 volumes :
2929 - " {{ postgresql_data_dir }}:/var/lib/pgsql/data:Z"
3030 env :
31- POSTGRESQL_USER : " postgres"
32- POSTGRESQL_PASSWORD : " {{ postgresql_admin_password }}"
33- POSTGRESQL_DATABASE : " {{ postgresql_databases[0].name | default('foreman') }}"
3431 POSTGRESQL_ADMIN_PASSWORD : " {{ postgresql_admin_password }}"
3532 quadlet_options :
3633 - |
3734 [Install]
3835 WantedBy=default.target
3936
37+ - name : Run daemon reload
38+ ansible.builtin.systemd :
39+ daemon_reload : true
40+
41+ - name : Start the PostgreSQL Service
42+ ansible.builtin.systemd :
43+ name : " {{ postgresql_container_name }}"
44+ enabled : true
45+ state : started
46+
4047- name : Create PostgreSQL users
4148 community.postgresql.postgresql_user :
4249 name : " {{ item.name }}"
4653 login_host : localhost
4754 state : present
4855 loop : " {{ postgresql_users }}"
49- when : postgresql_users | length > 0
5056
5157- name : Create PostgreSQL databases
5258 community.postgresql.postgresql_db :
5763 login_host : localhost
5864 state : present
5965 loop : " {{ postgresql_databases }}"
60- when : postgresql_databases | length > 0
61-
62- - name : Run daemon reload
63- ansible.builtin.systemd :
64- daemon_reload : true
65-
66- - name : Start the PostgreSQL Service
67- ansible.builtin.systemd :
68- name : " {{ postgresql_container_name }}"
69- enabled : true
70- state : started
You can’t perform that action at this time.
0 commit comments