- re-arrange cluster initialization to a set of variables in a dictionary
which control three things:
1. should we initialize?
2. if so, how?
3. what environment variables and user to use
The approach taken is very similar to what the Apache formula uses, namely:
a default dictionary which is over-ridden by:
os-specific defaults,
then os codename defaults,
then os finger defaults,
and finally user-specified pillar values
- this also adds support for grains['osfinger']
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
{%- macro ubuntu_block(name, version) %}
|
||||
{{ name }}:
|
||||
version: {{ version }}
|
||||
pkg_repo: deb http://apt.postgresql.org/pub/repos/apt/ {{ name }}-pgdg main
|
||||
conf_dir: /etc/postgresql/{{ version }}/main
|
||||
data_dir: /var/lib/postgresql/{{ version }}/main
|
||||
prepare_cluster:
|
||||
command: pg_createcluster {{ version }} main
|
||||
test: test -f /var/lib/postgresql/{{ version }}/main/PG_VERSION && test -f /etc/postgresql/{{ version }}/main/postgresql.conf
|
||||
user: root
|
||||
env:
|
||||
LC_ALL: C.UTF-8
|
||||
{%- endmacro %}
|
||||
|
||||
{{ ubuntu_block('wheezy', 9.1) }}
|
||||
|
||||
Reference in New Issue
Block a user