Skip to content
Snippets Groups Projects
Commit d53004c1 authored by Andreas Hamacher's avatar Andreas Hamacher
Browse files

well it does not get more ugly than his :( I don't have a reliable way of...

well it does not get more ugly than his :( I don't have a reliable way of getting this working so I am leaving residuals of debbuging and workaround code
parent f713356e
No related branches found
No related tags found
1 merge request!471well it does not get more ugly than his :( I don't have a reliable way of...
......@@ -52,7 +52,16 @@
mysql_user: name={{ mysql_user_name }} host={{ mysql_user_host }} password={{ mysql_user_password }} login_user=root login_password={{ mysql_root_password }} priv={{ mysql_user_db_name }}.*:ALL,GRANT state=present
when: mysql_user_host is defined
- name: "Giving priviliges to user with fqdn"
- name: "Giving priviliges to user with shortname"
mysql_user: name={{ mysql_user_name }} host={{ item }} password={{ mysql_user_password }} login_user=root login_password={{ mysql_root_password }} priv={{ mysql_user_db_name }}.*:ALL,GRANT state=present
with_items: "{{ mysql_user_hosts_group }}"
when: mysql_user_hosts_group is defined
- name: "Giving priviliges to user with hardcoded hostname"
mysql_user: name={{ mysql_user_name }} host='HARDCODE YOUR HOSTNAME' password={{ mysql_user_password }} login_user=root login_password={{ mysql_root_password }} priv={{ mysql_user_db_name }}.*:ALL,GRANT state=present
tags: [never]
- name: "Giving priviliges to user with fdqn works only when run with --limit=ManagementNodes,SQLNodes"
mysql_user: name={{ mysql_user_name }} host={{ hostvars[item].ansible_fqdn }} password={{ mysql_user_password }} login_user=root login_password={{ mysql_root_password }} priv={{ mysql_user_db_name }}.*:ALL,GRANT state=present
with_items: "{{ mysql_user_hosts_group }}"
when: mysql_user_hosts_group is defined
......@@ -65,3 +74,8 @@
- name: "Giving priviliges to user with item.domain"
mysql_user: name={{ mysql_user_name }} host="{{ item }}.{{ domain }}" password={{ mysql_user_password }} login_user=root login_password={{ mysql_root_password }} priv={{ mysql_user_db_name }}.*:ALL,GRANT state=present
with_items: "{{ mysql_user_hosts_group }}"
- debug:
msg: "{{ hostvars[item].ansible_fqdn }}"
with_items: "{{ mysql_user_hosts_group }}"
tags: [never]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment