mirror of
https://github.com/aljazceru/ansible-role-mysql.git
synced 2025-12-19 05:24:21 +01:00
Issue #60: 'Get list of hosts for the root user' fails to run.
This commit is contained in:
@@ -12,9 +12,10 @@ None.
|
|||||||
|
|
||||||
Available variables are listed below, along with default values (see `vars/main.yml`):
|
Available variables are listed below, along with default values (see `vars/main.yml`):
|
||||||
|
|
||||||
|
mysql_user_provisioning: root
|
||||||
mysql_user_home: /root
|
mysql_user_home: /root
|
||||||
|
|
||||||
The home directory inside which Python MySQL settings will be stored, which Ansible will use when connecting to MySQL. This should be the home directory of the user which runs this Ansible role.
|
The user this role will use, along with the home directory inside which Python MySQL settings will be stored, when Ansible connects to MySQL for administrative purposes.
|
||||||
|
|
||||||
mysql_root_password: root
|
mysql_root_password: root
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
mysql_user_provisioning: root
|
||||||
mysql_user_home: /root
|
mysql_user_home: /root
|
||||||
mysql_root_username: root
|
mysql_root_username: root
|
||||||
mysql_root_password: root
|
mysql_root_password: root
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
command: mysql -NBe 'SELECT Host FROM mysql.user WHERE User = "root" ORDER BY (Host="localhost") ASC'
|
command: mysql -NBe 'SELECT Host FROM mysql.user WHERE User = "root" ORDER BY (Host="localhost") ASC'
|
||||||
register: mysql_root_hosts
|
register: mysql_root_hosts
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
sudo: yes
|
||||||
|
sudo_user: "{{ mysql_user_provisioning }}"
|
||||||
|
|
||||||
# 'localhost' needs to be last for idempotency.
|
# 'localhost' needs to be last for idempotency.
|
||||||
- name: Update MySQL root password for localhost root account.
|
- name: Update MySQL root password for localhost root account.
|
||||||
|
|||||||
Reference in New Issue
Block a user