15 lines
470 B
Text
15 lines
470 B
Text
{% set states = salt['cp.list_states'](saltenv) %}
|
|
include:
|
|
- roles.database.none
|
|
{%- if grains['roles'] is defined -%}
|
|
{%- if grains['roles'] is not none -%}
|
|
{%- if 'mysql' in grains['roles'] -%}
|
|
{%- for state in states %}
|
|
{%- if state.startswith("pillars.roles.database.") -%}
|
|
{%- set role = state.split('.')[3] %}
|
|
- roles.database.{{ role }}
|
|
{%- endif -%}
|
|
{%- endfor -%}
|
|
{%- endif -%}
|
|
{%- endif -%}
|
|
{%- endif -%}
|