Merge pull request #26 from thenewwazoo/no_helium

backed out rand_str calls
This commit is contained in:
Seth House 2014-07-27 01:05:50 -06:00
commit 471783f3c9
3 changed files with 5 additions and 4 deletions

View file

@ -36,8 +36,9 @@ debconf.
.. note::
If no root password is provided in the pillar, a random one will
be created. As-of Hydrogen, this password uses the Python ``random``
module via ``test.rand_str``. As ``random`` is considered
be created. Because Hydrogen doesn't have easy access to a random
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
newly available ``random.get_str`` method.

View file

@ -1,6 +1,6 @@
{% 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 = [] %}
include:

View file

@ -2,7 +2,7 @@
{% set os = salt['grains.get']('os', 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'] %}
mysql_debconf: