File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -130,15 +130,18 @@ postgresql-start:
130130 - unless:
131131 - ps - p $ (head - n 1 {{ postgres.conf_dir }}/ postmaster.pid) 2 > / dev/ null
132132
133- # Try to enable PostgreSQL in "manual" way for systemd and RedHat-based distros.
134- # The packages for other OS (i.e. `*.deb`) should do it automatically by default
133+ # Try to enable PostgreSQL in "manual" way if Salt `service` state module
134+ # is currently not available (e.g. during Docker or Packer build when is no init
135+ # system running)
135136
136137postgresql- enable:
137138 cmd.run:
138139 {%- if salt[' file.file_exists' ](' /bin/systemctl' ) % }
139140 - name: systemctl enable {{ postgres.service }}
140141 {%- elif salt[' cmd.which' ](' chkconfig' ) % }
141142 - name: chkconfig {{ postgres.service }} on
143+ {%- elif salt[' file.file_exists' ](' /usr/sbin/update-rc.d' ) % }
144+ - name: update- rc.d {{ service }} defaults
142145 {%- else % }
143146 # Nothing to do
144147 - name: ' true'
You can’t perform that action at this time.
0 commit comments