Skip to content

Commit

Permalink
* fix mysql connection fail in ansible 2.7 [1]
Browse files Browse the repository at this point in the history
* renamed deprecated state ('installed' -> 'present')
[1] ansible/ansible#47736
  • Loading branch information
Stanislav Kopp committed May 7, 2019
1 parent ecfc579 commit 898a1d6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions tasks/bootstrap.yml
Expand Up @@ -38,6 +38,7 @@
mysql_user:
login_user: "{{ xtradb_root_user }}"
login_password: "{{ xtradb_root_password }}"
login_unix_socket: /var/run/mysqld/mysqld.sock
user: "{{ xtradb_sst_user }}"
password: "{{ xtradb_sst_password }}"
priv: "*.*:grant,reload,lock tables,process,replication client"
Expand Down
3 changes: 2 additions & 1 deletion tasks/main.yml
Expand Up @@ -35,10 +35,11 @@
- name: Install packages
package:
name: "{{ item }}"
state: installed
state: present
with_items: "{{ xtradb_packages }}"
tags: install


- name: Ensure service is started
service:
name: "{{ xtradb_service }}"
Expand Down
3 changes: 3 additions & 0 deletions tasks/secure_install.yml
Expand Up @@ -30,13 +30,15 @@
name: ""
host_all: yes
state: absent
login_unix_socket: /var/run/mysqld/mysqld.sock

- name: "Secure the MySQL root user for localhost"
mysql_user:
login_user: "{{ xtradb_root_user }}"
login_password: "{{ xtradb_root_password }}"
name: "{{ xtradb_root_user }}"
host: "{{ item }}"
login_unix_socket: /var/run/mysqld/mysqld.sock
with_items:
- "::1"
- "127.0.0.1"
Expand All @@ -50,6 +52,7 @@
login_user: "{{ xtradb_root_user }}"
login_password: "{{ xtradb_root_password }}"
state: absent
login_unix_socket: /var/run/mysqld/mysqld.sock


- name: Marking as secured
Expand Down

0 comments on commit 898a1d6

Please sign in to comment.