File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 3535 prepare_cluster :
3636 pgcommand : pg_createcluster {{ version }} {{ cluster_name }} -d
3737 user : root
38+ bake_image_run_cmd : pg_ctlcluster {{ version }} {{ cluster_name }} start
3839
3940{% endmacro %}
4041
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ postgres:
7676 sysrc : false
7777
7878 bake_image : false
79+ bake_image_run_cmd : echo "do nothing by default"
7980
8081 fromrepo : ' '
8182
Original file line number Diff line number Diff line change @@ -10,15 +10,19 @@ include:
1010
1111# An attempt to start PostgreSQL with `pg_ctl`
1212
13- postgresql- start :
13+ postgresql- running :
1414 cmd.run:
15- - name: pg_ctl - D {{ postgres.data_dir }} - l logfile start
15+ - name: {{ postgres.bake_image_run_cmd }}
1616 - runas: {{ postgres.user }}
1717 - unless:
1818 - ps - p $ (head - n 1 {{ postgres.data_dir }}/ postmaster.pid) 2 > / dev/ null
1919 - require:
2020 - file : postgresql- pg_hba
2121
22+ postgresql- service- reload :
23+ test.show_notification:
24+ - text: Imitating reload while baking an image
25+
2226# Try to enable PostgreSQL in "manual" way
2327
2428postgresql- enable:
@@ -34,11 +38,11 @@ postgresql-enable:
3438 - name: ' true'
3539 {%- endif % }
3640 - require:
37- - cmd: postgresql- start
41+ - cmd: postgresql- running
3842
3943{%- else % }
4044
41- postgresql- start :
45+ postgresql- running :
4246 test.show_notification:
4347 - text: The ' postgres:bake_image' Pillar is disabled (set to ' False' ).
4448
You can’t perform that action at this time.
0 commit comments