From 26176f89f3ce3b68477ef6aa418fc27acb549e8f Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Thu, 14 Sep 2023 16:45:40 +0200 Subject: [PATCH] updated mariadb state --- states/mariadb/databases.sls | 6 +++--- states/mariadb/users.sls | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/states/mariadb/databases.sls b/states/mariadb/databases.sls index da5e8a7..d58ce48 100644 --- a/states/mariadb/databases.sls +++ b/states/mariadb/databases.sls @@ -1,9 +1,9 @@ --- {%- from "mariadb/map.jinja" import mariadb with context %} -{%- for key, value in mariadb.databases.items() %} -mariadb-database-{{ value.name }}: +{%- for name, database in mariadb.databases.items() %} +mariadb-database-{{ name }}: mysql_database.present: - - name: {{ value.name }} + - name: {{ name }} - connection_user: {{ mariadb.connection_user }} - connection_pass: {{ mariadb.connection_pass }} {%- endfor %} diff --git a/states/mariadb/users.sls b/states/mariadb/users.sls index db335a8..d5b1d23 100644 --- a/states/mariadb/users.sls +++ b/states/mariadb/users.sls @@ -1,9 +1,9 @@ --- {%- from "mariadb/map.jinja" import mariadb with context %} -{%- for key, user in mariadb.users.items() %} -mariadb-user-{{ user.name }}: +{%- for name, user in mariadb.users.items() %} +mariadb-user-{{ name }}: mysql_user.present: - - name: {{ user.name }} + - name: {{ name }} - password: {{ user.password }} - host: '{{ user.host }}' - connection_user: {{ mariadb.connection_user }} @@ -15,7 +15,7 @@ mariadb-grants-{{ grant.name }}: - name: {{ grant.name }} - grant: '{{ grant.grant }}' - database: '{{ grant.database }}' - - user: '{{ user.name }}' + - user: '{{ name }}' - host: '{{ user.host }}' - connection_user: {{ mariadb.connection_user }} - connection_pass: {{ mariadb.connection_pass }}