6 Commits

Author SHA1 Message Date
semantic-release-bot
10126fb740 chore(release): 0.37.2 [skip ci]
## [0.37.2](https://github.com/saltstack-formulas/postgres-formula/compare/v0.37.1...v0.37.2) (2019-05-12)

### Bug Fixes

* **sysrc-svc:** workaround *BSD minion indefinitely hanging on start ([0aa8b4a](https://github.com/saltstack-formulas/postgres-formula/commit/0aa8b4a))
2019-05-12 22:44:15 +00:00
Imran Iqbal
65519cb06f Merge pull request #264 from sticky-note/master
fix(sysrc-svc): workaround *BSD minion indefinitely hanging on start
2019-05-12 23:24:58 +01:00
sam
0aa8b4a048 fix(sysrc-svc): workaround *BSD minion indefinitely hanging on start
Check https://github.com/saltstack/salt/issues/44848 for further details
2019-05-13 08:44:52 +11:00
semantic-release-bot
425049ceec chore(release): 0.37.1 [skip ci]
## [0.37.1](https://github.com/saltstack-formulas/postgres-formula/compare/v0.37.0...v0.37.1) (2019-05-06)

### Documentation

* **readme:** fix link for Travis badge ([850ca6a](https://github.com/saltstack-formulas/postgres-formula/commit/850ca6a))
2019-05-06 09:09:44 +00:00
Imran Iqbal
07d491e2cb Merge pull request #267 from saltstack-formulas/myii-patch-1
docs(readme): fix link for Travis badge
2019-05-06 09:39:06 +01:00
Imran Iqbal
850ca6ae88 docs(readme): fix link for Travis badge 2019-05-06 09:38:49 +01:00
12 changed files with 80 additions and 22 deletions

View File

@@ -7,7 +7,7 @@ Avatar|Contributor|Contributions
<img class='float-left rounded-1' src='https://avatars1.githubusercontent.com/u/13322818?v=4' width='36' height='36' alt='@noelmcloughlin'>|[@noelmcloughlin](https://github.com/noelmcloughlin)|57
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/1800660?v=4' width='36' height='36' alt='@aboe76'>|[@aboe76](https://github.com/aboe76)|47
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/1396878?v=4' width='36' height='36' alt='@gravyboat'>|[@gravyboat](https://github.com/gravyboat)|41
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/10231489?v=4' width='36' height='36' alt='@myii'>|[@myii](https://github.com/myii)|38
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/10231489?v=4' width='36' height='36' alt='@myii'>|[@myii](https://github.com/myii)|41
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/16338056?v=4' width='36' height='36' alt='@vutny'>|[@vutny](https://github.com/vutny)|30
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/3374962?v=4' width='36' height='36' alt='@nmadhok'>|[@nmadhok](https://github.com/nmadhok)|19
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/242396?v=4' width='36' height='36' alt='@javierbertoli'>|[@javierbertoli](https://github.com/javierbertoli)|18
@@ -69,4 +69,4 @@ Avatar|Contributor|Contributions
---
Auto generated by a [forked version](https://github.com/myii/maintainer) of [gaocegege/maintainer](https://github.com/gaocegege/maintainer) on 2019-05-06.
Auto generated by a [forked version](https://github.com/myii/maintainer) of [gaocegege/maintainer](https://github.com/gaocegege/maintainer) on 2019-05-12.

View File

@@ -1,5 +1,19 @@
# Changelog
## [0.37.2](https://github.com/saltstack-formulas/postgres-formula/compare/v0.37.1...v0.37.2) (2019-05-12)
### Bug Fixes
* **sysrc-svc:** workaround *BSD minion indefinitely hanging on start ([0aa8b4a](https://github.com/saltstack-formulas/postgres-formula/commit/0aa8b4a))
## [0.37.1](https://github.com/saltstack-formulas/postgres-formula/compare/v0.37.0...v0.37.1) (2019-05-06)
### Documentation
* **readme:** fix link for Travis badge ([850ca6a](https://github.com/saltstack-formulas/postgres-formula/commit/850ca6a))
# [0.37.0](https://github.com/saltstack-formulas/postgres-formula/compare/v0.36.0...v0.37.0) (2019-05-06)

View File

@@ -1,7 +1,7 @@
name: postgres
os: Debian, Ubuntu, Raspbian, RedHat, Fedora, CentOS, Suse, openSUSE, Gentoo, Funtoo, Arch, Manjaro, Alpine, FreeBSD, OpenBSD, Solaris, SmartOS, Windows, MacOS
os_family: Debian, RedHat, Suse, Gentoo, Arch, Alpine, FreeBSD, OpenBSD, Solaris, Windows, MacOS
version: 0.37.0
version: 0.37.2
release: 1
minimum_version: 2016.11
summary: Postgres formula

View File

@@ -24,7 +24,7 @@ This list is sorted by the number of commits per contributor in *descending* ord
- 41
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/10231489?v=4' width='36' height='36' alt='@myii'>`
- `@myii <https://github.com/myii>`_
- 38
- 41
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/16338056?v=4' width='36' height='36' alt='@vutny'>`
- `@vutny <https://github.com/vutny>`_
- 30
@@ -203,4 +203,4 @@ This list is sorted by the number of commits per contributor in *descending* ord
----
Auto generated by a `forked version <https://github.com/myii/maintainer>`_ of `gaocegege/maintainer <https://github.com/gaocegege/maintainer>`_ on 2019-05-06.
Auto generated by a `forked version <https://github.com/myii/maintainer>`_ of `gaocegege/maintainer <https://github.com/gaocegege/maintainer>`_ on 2019-05-12.

View File

@@ -2,6 +2,24 @@
Changelog
=========
`0.37.2 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.37.1...v0.37.2>`_ (2019-05-12)
-------------------------------------------------------------------------------------------------------------
Bug Fixes
^^^^^^^^^
* **sysrc-svc:** workaround *BSD minion indefinitely hanging on start (\ `0aa8b4a <https://github.com/saltstack-formulas/postgres-formula/commit/0aa8b4a>`_\ )
`0.37.1 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.37.0...v0.37.1>`_ (2019-05-06)
-------------------------------------------------------------------------------------------------------------
Documentation
^^^^^^^^^^^^^
* **readme:** fix link for Travis badge (\ `850ca6a <https://github.com/saltstack-formulas/postgres-formula/commit/850ca6a>`_\ )
`0.37.0 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.36.0...v0.37.0>`_ (2019-05-06)
-------------------------------------------------------------------------------------------------------------

View File

@@ -5,10 +5,10 @@ postgres-formula
|img_travis| |img_sr|
.. |img_travis| image:: https://travis-ci.com/saltstack-formulas/template-formula.svg?branch=master
.. |img_travis| image:: https://travis-ci.com/saltstack-formulas/postgres-formula.svg?branch=master
:alt: Travis CI Build Status
:scale: 100%
:target: https://travis-ci.com/saltstack-formulas/template-formula
:target: https://travis-ci.com/saltstack-formulas/postgres-formula
.. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
:alt: Semantic Release
:scale: 100%

View File

@@ -24,7 +24,10 @@ postgres:
# These pillars are typically never required.
# pkg: 'postgresql'
# pkg_client: 'postgresql-client'
# service: postgresql
# service:
# name: 'postgresql'
# flags: -w -s -m fast
# sysrc: True
pkgs_extra:
- postgresql-contrib
- postgresql-plpython

View File

@@ -67,7 +67,9 @@ postgres:
config_backup: '.bak'
service: postgresql
service:
name: postgresql
sysrc: False
bake_image: False

View File

@@ -30,11 +30,17 @@ FreeBSD:
prepare_cluster:
user: *freebsd-user
group: *freebsd-group
service:
flags: -w -s -m fast
sysrc: True
OpenBSD:
conf_dir: /var/postgresql/data
data_dir: /var/postgresql/data
user: _postgresql
service:
flags: -w -s -m fast
sysrc: True
RedHat:
pkg_repo:
@@ -54,7 +60,8 @@ RedHat:
pkg_dev: postgresql{{ release }}-devel
conf_dir: {{ data_dir }}
data_dir: {{ data_dir }}
service: postgresql-{{ repo.version }}
service:
name: postgresql-{{ repo.version }}
# Alternatives system
linux:
@@ -132,7 +139,8 @@ Suse:
pkg_libs: postgresql{{ release }}-libs
conf_dir: {{ data_dir }}
data_dir: {{ data_dir }}
service: postgresql-{{ repo.version }}
service:
name: postgresql-{{ repo.version }}
# Alternatives system
linux:
@@ -175,9 +183,11 @@ Suse:
## jinja check avoids rendering noise/failure on Linux
MacOS:
{%- if repo.use_upstream_repo == 'homebrew' %}
service: homebrew.mxcl.postgresql
service:
name: homebrew.mxcl.postgresql
{%- elif repo.use_upstream_repo == 'postgresapp' %}
service: com.postgresapp.Postgres2
service:
name: com.postgresapp.Postgres2
{%- endif %}
pkg: postgresql
pkg_client:

View File

@@ -24,11 +24,11 @@ postgresql-start:
postgresql-enable:
cmd.run:
{%- if salt['file.file_exists']('/bin/systemctl') %}
- name: systemctl enable {{ postgres.service }}
- name: systemctl enable {{ postgres.service.name }}
{%- elif salt['cmd.which']('chkconfig') %}
- name: chkconfig {{ postgres.service }} on
- name: chkconfig {{ postgres.service.name }} on
{%- elif salt['file.file_exists']('/usr/sbin/update-rc.d') %}
- name: update-rc.d {{ service }} defaults
- name: update-rc.d {{ postgres.service.name }} defaults
{%- else %}
# Nothing to do
- name: 'true'

View File

@@ -31,8 +31,8 @@ postgresql-server:
- require_in:
- file: postgresql-server
file.managed:
- name: /Library/LaunchAgents/{{ postgres.service }}.plist
- source: /usr/local/opt/postgres/{{ postgres.service }}.plist
- name: /Library/LaunchAgents/{{ postgres.service.name }}.plist
- source: /usr/local/opt/postgres/{{ postgres.service.name }}.plist
- group: wheel
- require_in:
- service: postgresql-running
@@ -261,12 +261,23 @@ postgresql-tablespace-dir-{{ name }}-fcontext:
{%- if not postgres.bake_image %}
# Workaround for FreeBSD minion undefinitely hanging on service start
# cf. https://github.com/saltstack/salt/issues/44848
{% if postgres.service.sysrc %}
posgresql-rc-flags:
sysrc.managed:
- name: {{ postgres.service.name }}_flags
- value: "{{ postgres.service.flags }} > /dev/null 2>&1"
- watch_in:
- service: postgresql-running
{% endif %}
# Start PostgreSQL server using OS init
# Note: This is also the target for numerous `watch_in` requisites above, used
# for the necessary service restart after changing the relevant configuration files
postgresql-running:
service.running:
- name: {{ postgres.service }}
- name: {{ postgres.service.name }}
- enable: True
# Reload the service for changes made to `pg_ident.conf`, except for `MacOS`
@@ -275,7 +286,7 @@ postgresql-running:
postgresql-service-reload:
module.wait:
- name: service.reload
- m_name: {{ postgres.service }}
- m_name: {{ postgres.service.name }}
- require:
- service: postgresql-running
{%- endif %}

View File

@@ -2,7 +2,7 @@
postgresql-dead:
service.dead:
- name: {{ postgres.service }}
- name: {{ postgres.service.name }}
- enable: False
postgresql-repo-removed:
@@ -81,7 +81,7 @@ postgresql{{ release }}-tablespace-dir-{{ name }}-removed:
file.absent:
- name: {{ tblspace.directory }}
- require:
- file: postgresql{{ release }}-dataconf-removed
- file: postgresql{{ release }}-dataconf-removed
{% endfor %}
{% endif %}