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

Remove deprecated vars #477

Closed
wants to merge 3 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*/__pycache__
*.pyc
.cache
.idea/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ The rest of the settings in `defaults/main.yml` control MySQL's memory usage and
mysql_server_id: "1"
mysql_max_binlog_size: "100M"
mysql_binlog_format: "ROW"
mysql_expire_logs_days: "10"
mysql_binlog_expire_logs_seconds: "2592000" # default: 30 days
mysql_replication_role: ''
mysql_replication_master: ''
mysql_replication_user: {}
Expand Down
6 changes: 1 addition & 5 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ mysql_innodb_log_buffer_size: "8M"
mysql_innodb_flush_log_at_trx_commit: "1"
mysql_innodb_lock_wait_timeout: "50"

# These settings require MySQL > 5.5.
mysql_innodb_large_prefix: "1"
mysql_innodb_file_format: "barracuda"

# mysqldump settings.
mysql_mysqldump_max_allowed_packet: "64M"

Expand Down Expand Up @@ -123,7 +119,7 @@ mysql_users: []
mysql_server_id: "1"
mysql_max_binlog_size: "100M"
mysql_binlog_format: "ROW"
mysql_expire_logs_days: "10"
mysql_binlog_expire_logs_seconds: "2592000"
mysql_replication_role: ''
mysql_replication_master: ''
# Same keys as `mysql_users` above.
Expand Down
6 changes: 3 additions & 3 deletions tasks/variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
mysql_socket: "{{ __mysql_socket }}"
when: mysql_socket is not defined

- name: Define mysql_supports_innodb_large_prefix.
- name: Compute mysql_binlog_expire_logs_seconds from mysql_expire_logs_days for backward compatibility
set_fact:
mysql_supports_innodb_large_prefix: "{{ __mysql_supports_innodb_large_prefix }}"
when: mysql_supports_innodb_large_prefix is not defined
mysql_binlog_expire_logs_seconds: "{{ mysql_expire_logs_days * 24 * 3600 }}}"
when: mysql_expire_logs_days is defined and mysql_binlog_expire_logs_seconds != "2592000"
8 changes: 1 addition & 7 deletions templates/my.cnf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ port = {{ mysql_port }}
bind-address = {{ mysql_bind_address }}
datadir = {{ mysql_datadir }}
socket = {{ mysql_socket }}
pid-file = {{ mysql_pid_file }}
{% if mysql_skip_name_resolve %}
skip-name-resolve
{% endif %}
Expand Down Expand Up @@ -43,7 +42,7 @@ server-id = {{ mysql_server_id }}
{% if mysql_replication_role == 'master' %}
log_bin = mysql-bin
log-bin-index = mysql-bin.index
expire_logs_days = {{ mysql_expire_logs_days }}
binlog_expire_logs_seconds = {{ mysql_binlog_expire_logs_seconds }}
max_binlog_size = {{ mysql_max_binlog_size }}
binlog_format = {{mysql_binlog_format}}

Expand Down Expand Up @@ -98,10 +97,6 @@ lower_case_table_names = {{ mysql_lower_case_table_names }}
event_scheduler = {{ mysql_event_scheduler_state }}

# InnoDB settings.
{% if mysql_supports_innodb_large_prefix and '8.0.' not in mysql_cli_version.stdout %}
innodb_large_prefix = {{ mysql_innodb_large_prefix }}
innodb_file_format = {{ mysql_innodb_file_format }}
{% endif %}
innodb_file_per_table = {{ mysql_innodb_file_per_table }}
innodb_buffer_pool_size = {{ mysql_innodb_buffer_pool_size }}
innodb_log_file_size = {{ mysql_innodb_log_file_size }}
Expand All @@ -114,7 +109,6 @@ quick
max_allowed_packet = {{ mysql_mysqldump_max_allowed_packet }}

[mysqld_safe]
pid-file = {{ mysql_pid_file }}

{% if mysql_config_include_files | length %}
# * IMPORTANT: Additional settings that can override those from this file!
Expand Down
1 change: 0 additions & 1 deletion vars/Archlinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ __mysql_pid_file: /run/mysqld/mysqld.pid
__mysql_config_file: /etc/mysql/my.cnf
__mysql_config_include_dir: /etc/mysql/conf.d
__mysql_socket: /run/mysqld/mysqld.sock
__mysql_supports_innodb_large_prefix: true
1 change: 0 additions & 1 deletion vars/Debian-10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ __mysql_pid_file: /run/mysqld/mysqld.pid
__mysql_config_file: /etc/mysql/my.cnf
__mysql_config_include_dir: /etc/mysql/conf.d
__mysql_socket: /run/mysqld/mysqld.sock
__mysql_supports_innodb_large_prefix: true
1 change: 0 additions & 1 deletion vars/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ __mysql_pid_file: /var/run/mysqld/mysqld.pid
__mysql_config_file: /etc/mysql/my.cnf
__mysql_config_include_dir: /etc/mysql/conf.d
__mysql_socket: /var/run/mysqld/mysqld.sock
__mysql_supports_innodb_large_prefix: true
1 change: 0 additions & 1 deletion vars/RedHat-7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ __mysql_pid_file: /var/run/mariadb/mariadb.pid
__mysql_config_file: /etc/my.cnf
__mysql_config_include_dir: /etc/my.cnf.d
__mysql_socket: /var/lib/mysql/mysql.sock
__mysql_supports_innodb_large_prefix: true
3 changes: 0 additions & 3 deletions vars/RedHat-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@ __mysql_pid_file: /var/run/mariadb/mariadb.pid
__mysql_config_file: /etc/my.cnf
__mysql_config_include_dir: /etc/my.cnf.d
__mysql_socket: /var/lib/mysql/mysql.sock
# The entries controlled by this value should not be used with MariaDB >= 10.2.2
# See https://github.com/frappe/bench/issues/681#issuecomment-398984706
__mysql_supports_innodb_large_prefix: false