-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #232 from daks/style-sls
style: remove previous line from jinja directives
- Loading branch information
Showing
14 changed files
with
225 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,100 @@ | ||
{% from tpldir ~ "/map.jinja" import mysql with context %} | ||
{% set os_family = salt['grains.get']('os_family', None) %} | ||
{%- from tpldir ~ "/map.jinja" import mysql with context %} | ||
{%- set os_family = salt['grains.get']('os_family', None) %} | ||
{% if "config_directory" in mysql %} | ||
{%- if "config_directory" in mysql %} | ||
mysql_config_directory: | ||
file.directory: | ||
- name: {{ mysql.config_directory }} | ||
{% if os_family in ['Debian', 'Gentoo', 'RedHat'] %} | ||
{%- if os_family in ['Debian', 'Gentoo', 'RedHat'] %} | ||
- user: root | ||
- group: root | ||
- mode: 755 | ||
{% endif %} | ||
{%- endif %} | ||
- makedirs: True | ||
{% if "server_config" in mysql %} | ||
{%- if "server_config" in mysql %} | ||
mysql_server_config: | ||
file.managed: | ||
- name: {{ mysql.config_directory + mysql.server_config.file }} | ||
- template: jinja | ||
- source: salt://{{ tpldir }}/files/server.cnf | ||
{% if os_family in ['Debian', 'Gentoo', 'RedHat'] %} | ||
{%- if os_family in ['Debian', 'Gentoo', 'RedHat'] %} | ||
- context: | ||
tpldir: {{ tpldir }} | ||
- user: root | ||
- group: root | ||
- mode: 644 | ||
{% endif %} | ||
{%- endif %} | ||
- require: | ||
- file: mysql_config_directory | ||
{% endif %} | ||
{%- endif %} | ||
{% if "galera_config" in mysql %} | ||
{%- if "galera_config" in mysql %} | ||
mysql_galera_config: | ||
file.managed: | ||
- name: {{ mysql.config_directory + mysql.galera_config.file }} | ||
- template: jinja | ||
- source: salt://{{ tpldir }}/files/galera.cnf | ||
{% if os_family in ['Debian', 'Gentoo', 'RedHat'] %} | ||
{%- if os_family in ['Debian', 'Gentoo', 'RedHat'] %} | ||
- context: | ||
tpldir: {{ tpldir }} | ||
- user: root | ||
- group: root | ||
- mode: 644 | ||
{% endif %} | ||
{%- endif %} | ||
- require: | ||
- file: mysql_config_directory | ||
{% endif %} | ||
{%- endif %} | ||
{% if "library_config" in mysql %} | ||
{%- if "library_config" in mysql %} | ||
mysql_library_config: | ||
file.managed: | ||
- name: {{ mysql.config_directory + mysql.library_config.file }} | ||
- template: jinja | ||
- source: salt://{{ tpldir }}/files/client.cnf | ||
{% if os_family in ['Debian', 'Gentoo', 'RedHat'] %} | ||
{%- if os_family in ['Debian', 'Gentoo', 'RedHat'] %} | ||
- context: | ||
tpldir: {{ tpldir }} | ||
- user: root | ||
- group: root | ||
- mode: 644 | ||
{% endif %} | ||
{%- endif %} | ||
- require: | ||
- file: mysql_config_directory | ||
{% endif %} | ||
{%- endif %} | ||
{% if "clients_config" in mysql %} | ||
{%- if "clients_config" in mysql %} | ||
mysql_clients_config: | ||
file.managed: | ||
- name: {{ mysql.config_directory + mysql.clients_config.file }} | ||
- template: jinja | ||
- source: salt://{{ tpldir }}/files/mysql-clients.cnf | ||
{% if os_family in ['Debian', 'Gentoo', 'RedHat'] %} | ||
{%- if os_family in ['Debian', 'Gentoo', 'RedHat'] %} | ||
- context: | ||
tpldir: {{ tpldir }} | ||
- user: root | ||
- group: root | ||
- mode: 644 | ||
{% endif %} | ||
{%- endif %} | ||
- require: | ||
- file: mysql_config_directory | ||
{% endif %} | ||
{%- endif %} | ||
{% endif %} | ||
{%- endif %} | ||
mysql_config: | ||
file.managed: | ||
- name: {{ mysql.config.file }} | ||
- template: jinja | ||
{% if "config_directory" in mysql %} | ||
{%- if "config_directory" in mysql %} | ||
- source: salt://{{ tpldir }}/files/my-include.cnf | ||
{% else %} | ||
{%- else %} | ||
- source: salt://{{ tpldir }}/files/my.cnf | ||
{% endif %} | ||
{%- endif %} | ||
- context: | ||
tpldir: {{ tpldir }} | ||
{% if os_family in ['Debian', 'Gentoo', 'RedHat'] %} | ||
{%- if os_family in ['Debian', 'Gentoo', 'RedHat'] %} | ||
- user: root | ||
- group: root | ||
- mode: 644 | ||
{% endif %} | ||
{%- endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
{% from tpldir ~ '/database.sls' import db_states with context %} | ||
{% from tpldir ~ '/user.sls' import user_states with context %} | ||
{%- from tpldir ~ '/database.sls' import db_states with context %} | ||
{%- from tpldir ~ '/user.sls' import user_states with context %} | ||
{% macro requisites(type, states) %} | ||
{%- macro requisites(type, states) %} | ||
{%- for state in states %} | ||
- {{ type }}: {{ state }} | ||
{%- endfor -%} | ||
{% endmacro %} | ||
{%- endmacro %} | ||
{% set mysql_dev = salt['pillar.get']('mysql:dev:install', False) %} | ||
{% set mysql_salt_user = salt['pillar.get']('mysql:salt_user:salt_user_name', False) %} | ||
{%- set mysql_dev = salt['pillar.get']('mysql:dev:install', False) %} | ||
{%- set mysql_salt_user = salt['pillar.get']('mysql:salt_user:salt_user_name', False) %} | ||
include: | ||
- .server | ||
{% if mysql_salt_user %} | ||
{%- if mysql_salt_user %} | ||
- .salt-user | ||
{% endif %} | ||
{%- endif %} | ||
- .database | ||
- .user | ||
{% if mysql_dev %} | ||
{%- if mysql_dev %} | ||
- .dev | ||
{% endif %} | ||
{%- endif %} | ||
{% if (db_states|length() + user_states|length()) > 0 %} | ||
{%- if (db_states|length() + user_states|length()) > 0 %} | ||
extend: | ||
mysqld-service-running: | ||
service: | ||
- require_in: | ||
{{ requisites('mysql_database', db_states) }} | ||
{{ requisites('mysql_user', user_states) }} | ||
{% endif %} | ||
{%- endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.