From cdb18fb853d947e9013aa98b3396e147ccec05f9 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Thu, 19 Aug 2021 21:15:38 +0200 Subject: [PATCH] updated postgresql state --- states/postgresql/databases.sls | 4 ++-- states/postgresql/defaults.yaml | 2 +- states/postgresql/init.sls | 2 +- states/postgresql/service.sls | 2 +- states/postgresql/users.sls | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/states/postgresql/databases.sls b/states/postgresql/databases.sls index e5c8ec7..3115829 100644 --- a/states/postgresql/databases.sls +++ b/states/postgresql/databases.sls @@ -1,7 +1,7 @@ --- {%- from "postgresql/map.jinja" import postgresql with context %} {%- for database in postgresql.databases %} -postgresql_database_{{ database.name }}: +postgresql-database-{{ database.name }}: postgres_database.present: - name: {{ database.name }} - owner: {{ database.user }} @@ -11,5 +11,5 @@ postgresql_database_{{ database.name }}: - lc_collate: {{ database.collate|default("en_US.UTF-8") }} - lc_ctype: {{ database.ctype|default("en_US.UTF-8") }} - require: - - postgres_user: postgresql_user_{{ database.user }} + - postgres_user: postgresql-user-{{ database.user }} {% endfor %} diff --git a/states/postgresql/defaults.yaml b/states/postgresql/defaults.yaml index 8e04d3d..b4535cb 100644 --- a/states/postgresql/defaults.yaml +++ b/states/postgresql/defaults.yaml @@ -3,4 +3,4 @@ postgresql: databases: - name: postgres user: postgres - users: [] \ No newline at end of file + users: [] diff --git a/states/postgresql/init.sls b/states/postgresql/init.sls index 05606af..816d696 100644 --- a/states/postgresql/init.sls +++ b/states/postgresql/init.sls @@ -3,4 +3,4 @@ include: - .install - .service - .users - - .databases \ No newline at end of file + - .databases diff --git a/states/postgresql/service.sls b/states/postgresql/service.sls index 689e56b..ea63c95 100644 --- a/states/postgresql/service.sls +++ b/states/postgresql/service.sls @@ -2,4 +2,4 @@ postgresql-service: service.running: - name: postgresql - - enable: true \ No newline at end of file + - enable: true diff --git a/states/postgresql/users.sls b/states/postgresql/users.sls index 489e39a..fdc6abd 100644 --- a/states/postgresql/users.sls +++ b/states/postgresql/users.sls @@ -1,7 +1,7 @@ --- {%- from "postgresql/map.jinja" import postgresql with context %} {%- for user in postgresql.users %} -postgresql_user_{{ user.name }}: +postgresql-user-{{ user.name }}: postgres_user.present: - name: {{ user.name }} {%- if user.password is defined %}