Skip to content

Commit

Permalink
Switch from deprecated always_run to check_mode and bump min Ansible …
Browse files Browse the repository at this point in the history
…version.
  • Loading branch information
geerlingguy committed Apr 12, 2017
1 parent b0b189a commit cb75ecb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ galaxy_info:
description: MySQL server for RHEL/CentOS and Debian/Ubuntu.
company: "Midwestern Mac, LLC"
license: "license (BSD, MIT)"
min_ansible_version: 1.9
min_ansible_version: 2.2
platforms:
- name: EL
versions:
Expand Down
4 changes: 2 additions & 2 deletions tasks/secure-installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
command: mysql -NBe "SELECT Host FROM mysql.user WHERE User = '{{ mysql_root_username }}' ORDER BY (Host='localhost') ASC"
register: mysql_root_hosts
changed_when: false
always_run: true
check_mode: no
when: mysql_install_packages | bool or mysql_root_password_update

# Note: We do not use mysql_user for this operation, as it doesn't always update
Expand Down Expand Up @@ -67,7 +67,7 @@
command: mysql -NBe 'SELECT Host FROM mysql.user WHERE User = ""'
register: mysql_anonymous_hosts
changed_when: false
always_run: true
check_mode: no

- name: Remove anonymous MySQL users.
mysql_user:
Expand Down

0 comments on commit cb75ecb

Please sign in to comment.