Ensure all anonymous users are removed; ensure None values for fqdn are handled for YAML

This commit is contained in:
David\ Beitey 2014-10-09 17:32:39 +10:00
parent c55c2a4c46
commit 4975897b42

View file

@ -24,11 +24,14 @@ mysql_root_password:
- require:
- service: mysqld
{% for host in ['localhost', salt['grains.get']('fqdn')] %}
include:
- mysql.python
{% for host in ['localhost', 'localhost.localdomain', salt['grains.get']('fqdn')] %}
mysql_delete_anonymous_user_{{ host }}:
mysql_user:
- absent
- host: {{ host }}
- host: {{ host or "''" }}
- name: ''
- connection_host: localhost
- connection_user: root