mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-16 01:30:25 +00:00
updated postgresql module
added service added python module added archlinux support
This commit is contained in:
parent
13c25bfbfc
commit
62b7d6c47f
4 changed files with 26 additions and 0 deletions
|
@ -17,3 +17,8 @@ Available states
|
||||||
------------
|
------------
|
||||||
|
|
||||||
Installs the postgresql package.
|
Installs the postgresql package.
|
||||||
|
|
||||||
|
``postgres.python``
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Installs the postgresql python module
|
||||||
|
|
|
@ -4,4 +4,10 @@ postgresql:
|
||||||
pkg:
|
pkg:
|
||||||
- installed
|
- installed
|
||||||
- name: {{ postgres.pkg }}
|
- name: {{ postgres.pkg }}
|
||||||
|
service:
|
||||||
|
- running
|
||||||
|
- enable: true
|
||||||
|
- name: {{ postgres.service }}
|
||||||
|
- require:
|
||||||
|
- pkg: {{ postgres.pkg }}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,17 @@
|
||||||
{% set postgres = salt['grains.filter_by']({
|
{% set postgres = salt['grains.filter_by']({
|
||||||
'Debian': {
|
'Debian': {
|
||||||
'pkg': 'postgresql-9.1',
|
'pkg': 'postgresql-9.1',
|
||||||
|
'python': 'python-pygresql',
|
||||||
|
'service': 'postgresql-9-1',
|
||||||
},
|
},
|
||||||
'RedHat': {
|
'RedHat': {
|
||||||
'pkg': 'postgresql',
|
'pkg': 'postgresql',
|
||||||
|
'python': 'postgresql-python',
|
||||||
|
'service': 'postgresql',
|
||||||
|
},
|
||||||
|
'Arch': {
|
||||||
|
'pkg': 'postgresql',
|
||||||
|
'python': 'python-psycopg2',
|
||||||
|
'service': 'postgresql',
|
||||||
},
|
},
|
||||||
}, merge=salt['pillar.get']('postgres:lookup')) %}
|
}, merge=salt['pillar.get']('postgres:lookup')) %}
|
||||||
|
|
6
postgres/python.sls
Normal file
6
postgres/python.sls
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{% from "postgres/map.jinja" import postgres with context %}
|
||||||
|
|
||||||
|
postgresql-python:
|
||||||
|
pkg:
|
||||||
|
- installed
|
||||||
|
- name: {{ postgresql.python}}
|
Loading…
Add table
Reference in a new issue