-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Hi,
When I using the mysql.sls, the salt report an error.
the following code is the result from pillar.items command:
secrets:
----------
cinder:
----------
db_password:
stack
glance:
----------
db_password:
stack
keystone:
----------
db_password:
stack
nova:
----------
db_password:
stack
following code is the error meessage
vagrant@salt:~$ sudo salt '*' state.highstate
salt:
Data failed to compile:
Rendering SLS "base:mysql-server" failed: Jinja syntax error: expected token ':', got '}'; line 42
[...]
{% set accounts = ['keystone', 'nova', 'glance', 'cinder' ] %}
{% for user in accounts %}
{{ user }}:
mysql_user.present:
- host: "%"
- password: {{ pillar['secrets'][{{ user }}]['db_password'] } <======================
- require:
- pkg: mysql-server
- file.sed: /etc/mysql/my.cnf
- watch:
- service.restart: mysql
[...]
Metadata
Metadata
Assignees
Labels
No labels