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:
@@ -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%}
|
||||
|
||||
Reference in New Issue
Block a user