Skip to content

Commit

Permalink
chore: Require pkg: postgres if using postgres user. Normalize indent…
Browse files Browse the repository at this point in the history
…ation.
  • Loading branch information
jpmckinney committed Sep 27, 2024
1 parent 85f04db commit ea1a16c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pillar/registry_maintenance.sls
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ maintenance:
DISABLE_TESTS=running_procs
hardware_sensors: True
custom_sensors:
- coretemp
- nct6775
- coretemp
- nct6775
4 changes: 4 additions & 0 deletions salt/postgres/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,14 @@ postgresql-reload:
- user: postgres
- group: postgres
- makedirs: True
- require:
- pkg: postgresql
cmd.run:
- name: /usr/lib/postgresql/{{ pillar.postgres.version }}/bin/initdb -D {{ pillar.postgres.data_directory }}
- runas: postgres
- creates: {{ pillar.postgres.data_directory }}/PG_VERSION
- require:
- pkg: postgresql
- watch_in:
- service: postgresql
{% endif %}
Expand Down

0 comments on commit ea1a16c

Please sign in to comment.