mirror of
https://github.com/saltstack-formulas/mysql-formula.git
synced 2025-04-17 10:10:30 +00:00
Merge pull request #26 from thenewwazoo/no_helium
backed out rand_str calls
This commit is contained in:
commit
471783f3c9
3 changed files with 5 additions and 4 deletions
|
@ -36,8 +36,9 @@ debconf.
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
If no root password is provided in the pillar, a random one will
|
If no root password is provided in the pillar, a random one will
|
||||||
be created. As-of Hydrogen, this password uses the Python ``random``
|
be created. Because Hydrogen doesn't have easy access to a random
|
||||||
module via ``test.rand_str``. As ``random`` is considered
|
function (test.rand_str isn't introduced until Helium), instead,
|
||||||
|
we use the not-at-all random ``grains.server_id``. As this is
|
||||||
cryptographically insecure, future formula versions should use the
|
cryptographically insecure, future formula versions should use the
|
||||||
newly available ``random.get_str`` method.
|
newly available ``random.get_str`` method.
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{% from "mysql/map.jinja" import mysql with context %}
|
{% from "mysql/map.jinja" import mysql with context %}
|
||||||
|
|
||||||
{% set mysql_root_pass = salt['pillar.get']('mysql:server:root_password', salt['test.rand_str'](64)) %}
|
{% set mysql_root_pass = salt['pillar.get']('mysql:server:root_password', salt['grains.get']('server_id')) %}
|
||||||
{% set db_states = [] %}
|
{% set db_states = [] %}
|
||||||
|
|
||||||
include:
|
include:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
{% set os = salt['grains.get']('os', None) %}
|
{% set os = salt['grains.get']('os', None) %}
|
||||||
{% set os_family = salt['grains.get']('os_family', None) %}
|
{% set os_family = salt['grains.get']('os_family', None) %}
|
||||||
{% set mysql_root_password = salt['pillar.get']('mysql:server:root_password', salt['test.rand_str'](64)) %}
|
{% set mysql_root_password = salt['pillar.get']('mysql:server:root_password', salt['grains.get']('server_id')) %}
|
||||||
|
|
||||||
{% if os in ['Ubuntu', 'Debian'] %}
|
{% if os in ['Ubuntu', 'Debian'] %}
|
||||||
mysql_debconf:
|
mysql_debconf:
|
||||||
|
|
Loading…
Add table
Reference in a new issue