Add _states/_modules for tablespaces and add tablespace support to formula

Add temporary states/modules for handling tablespaces in Postgresql. These will
be fed back upstream, but they can live here for now.

Add support for the states/modules to the formula.
This commit is contained in:
Brian Jackson
2015-04-23 11:17:39 -05:00
parent 92ee5e3538
commit 17baaa9f8c
3 changed files with 420 additions and 0 deletions

View File

@@ -112,3 +112,22 @@ postgres-db-{{ name }}:
- postgres_user: postgres-user-{{ db.get('user') }}
{% endif %}
{% endfor%}
{% for name, directory in postgres.tablespaces.items() %}
postgres-tablespace-dir-perms-{{ directory}}:
file.directory:
- name: {{ directory }}
- user: postgres
- group: postgres
- makedirs: True
- recurse:
- user
- group
postgres-tablespace-{{ name }}:
postgres_tablespace.present:
- name: {{ name }}
- directory: {{ directory }}
- require:
- service: {{ postgres.service }}
{% endfor%}