Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround to fix 'changed=1' on touching slowlog. More info: https://github.com/ansible/ansible/issues/7490 #88

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -18,11 +18,11 @@ The home directory inside which Python MySQL settings will be stored, which Ansi

mysql_root_password: root

The MySQL root user account password.
The MySQL root user account password. Notice that if you change `mysql_root_password` after initial setup and `mysql_root_password_update=no` then you will lock root account.

mysql_root_password_update: no

Whether to force update the MySQL root user's password. By default, this role will only change the root user's password when MySQL is first configured. You can force an update by setting this to `yes`.
Whether to force update the MySQL root user's password with every run (increases "changed" count). By default, this role will only change the root user's password when MySQL is first configured. You can force an update by setting this to `yes`.

mysql_enabled_on_startup: yes

Expand Down
4 changes: 3 additions & 1 deletion defaults/main.yml
@@ -1,9 +1,11 @@
---
mysql_user_home: /root
mysql_root_username: root
# Notice that if you change mysql_root_password after initial setup and
# mysql_root_password_update=no then you will lock root account
mysql_root_password: root

# Set this to `yes` to forcibly update the root password.
# Set this to `yes` to update the root password with every run. (Increases "changed" count)
mysql_root_password_update: no

mysql_enabled_on_startup: yes
Expand Down
2 changes: 1 addition & 1 deletion tasks/configure.yml
Expand Up @@ -30,7 +30,7 @@
notify: restart mysql

- name: Create slow query log file (if configured).
file: "path={{ mysql_slow_query_log_file }} state=touch"
copy: "content='' dest={{ mysql_slow_query_log_file }} force=no"
when: mysql_slow_query_log_enabled

- name: Set ownership on slow query log file (if configured).
Expand Down