fix(contributing): runnig formula inside container
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
prepare_cluster:
|
prepare_cluster:
|
||||||
pgcommand: pg_createcluster {{ version }} {{ cluster_name }} -d
|
pgcommand: pg_createcluster {{ version }} {{ cluster_name }} -d
|
||||||
user: root
|
user: root
|
||||||
|
bake_image_run_cmd: pg_ctlcluster {{ version }} {{ cluster_name }} start
|
||||||
|
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ postgres:
|
|||||||
sysrc: false
|
sysrc: false
|
||||||
|
|
||||||
bake_image: false
|
bake_image: false
|
||||||
|
bake_image_run_cmd: echo "do nothing by default"
|
||||||
|
|
||||||
fromrepo: ''
|
fromrepo: ''
|
||||||
|
|
||||||
|
|||||||
@@ -10,15 +10,19 @@ include:
|
|||||||
|
|
||||||
# An attempt to start PostgreSQL with `pg_ctl`
|
# An attempt to start PostgreSQL with `pg_ctl`
|
||||||
|
|
||||||
postgresql-start:
|
postgresql-running:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
- name: pg_ctl -D {{ postgres.data_dir }} -l logfile start
|
- name: {{ postgres.bake_image_run_cmd }}
|
||||||
- runas: {{ postgres.user }}
|
- runas: {{ postgres.user }}
|
||||||
- unless:
|
- unless:
|
||||||
- ps -p $(head -n 1 {{ postgres.data_dir }}/postmaster.pid) 2>/dev/null
|
- ps -p $(head -n 1 {{ postgres.data_dir }}/postmaster.pid) 2>/dev/null
|
||||||
- require:
|
- require:
|
||||||
- file: postgresql-pg_hba
|
- file: postgresql-pg_hba
|
||||||
|
|
||||||
|
postgresql-service-reload:
|
||||||
|
test.show_notification:
|
||||||
|
- text: Imitating reload while baking an image
|
||||||
|
|
||||||
# Try to enable PostgreSQL in "manual" way
|
# Try to enable PostgreSQL in "manual" way
|
||||||
|
|
||||||
postgresql-enable:
|
postgresql-enable:
|
||||||
@@ -34,11 +38,11 @@ postgresql-enable:
|
|||||||
- name: 'true'
|
- name: 'true'
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
- require:
|
- require:
|
||||||
- cmd: postgresql-start
|
- cmd: postgresql-running
|
||||||
|
|
||||||
{%- else %}
|
{%- else %}
|
||||||
|
|
||||||
postgresql-start:
|
postgresql-running:
|
||||||
test.show_notification:
|
test.show_notification:
|
||||||
- text: The 'postgres:bake_image' Pillar is disabled (set to 'False').
|
- text: The 'postgres:bake_image' Pillar is disabled (set to 'False').
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user