Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mysql-formula
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
salt
mysql-formula
Commits
a3784bd1
Commit
a3784bd1
authored
10 years ago
by
tiger-seo
Browse files
Options
Downloads
Patches
Plain Diff
allow to add users without password
parent
b74acd30
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
mysql/user.sls
+4
-2
4 additions, 2 deletions
mysql/user.sls
pillar.example
+4
-0
4 additions, 0 deletions
pillar.example
with
8 additions
and
2 deletions
mysql/user.sls
+
4
−
2
View file @
a3784bd1
...
@@ -13,9 +13,11 @@ include:
...
@@ -13,9 +13,11 @@ include:
- host: '{{ user['host'] }}'
- host: '{{ user['host'] }}'
{%- if user['password_hash'] is defined %}
{%- if user['password_hash'] is defined %}
- password_hash: '{{ user['password_hash'] }}'
- password_hash: '{{ user['password_hash'] }}'
{% el
s
e %}
{%
-
el
if user['password'] is defined and user['password'] != Non
e %}
- password: '{{ user['password'] }}'
- password: '{{ user['password'] }}'
{% endif %}
{%- else %}
- allow_passwordless: True
{%- endif %}
- connection_host: localhost
- connection_host: localhost
- connection_user: root
- connection_user: root
- connection_pass: '{{ salt['pillar.get']('mysql:server:root_password', 'somepass') }}'
- connection_pass: '{{ salt['pillar.get']('mysql:server:root_password', 'somepass') }}'
...
...
This diff is collapsed.
Click to expand it.
pillar.example
+
4
−
0
View file @
a3784bd1
...
@@ -34,6 +34,10 @@ mysql:
...
@@ -34,6 +34,10 @@ mysql:
grants: ['all privileges']
grants: ['all privileges']
- database: bar
- database: bar
grants: ['select', 'insert', 'update', 'delete']
grants: ['select', 'insert', 'update', 'delete']
- name: nopassuser
password: ~
host: localhost
databases: []
# Override any names defined in map.jinja
# Override any names defined in map.jinja
lookup:
lookup:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment