mirror of
https://github.com/saltstack-formulas/mysql-formula.git
synced 2025-04-16 17:50:27 +00:00
Handle empty/Null database_obj
This commit is contained in:
parent
3633a6ec84
commit
39915a49fd
1 changed files with 3 additions and 1 deletions
|
@ -13,7 +13,9 @@ include:
|
|||
|
||||
{% for database_obj in salt['pillar.get']('mysql:database', []) %}
|
||||
{% set state_id = 'mysql_db_' ~ loop.index0 %}
|
||||
{% if database_obj is mapping %}
|
||||
{% if not database_obj %}{# in case database_obj == [] #}
|
||||
{% continue %}
|
||||
{% elif database_obj is mapping %}
|
||||
{% set database = database_obj.get('name') %}
|
||||
{% set present = database_obj.get('present', True) %}
|
||||
{% else %}
|
||||
|
|
Loading…
Add table
Reference in a new issue