diff --git a/CHANGELOG.md b/CHANGELOG.md index e8139d1d..25b2fd31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ The **patch** part changes incrementally at each release. * mongodb: still incompatible with Debian 10 * mysql: activate binary logs by specifying log_bin path * mysql: specify a custom server_id +* mysql-oracle: backport tasks from mysql role * packweb-apache: Deploy opcache.php to give some insights on PHP's opcache status * php: variable to install the mysqlnd module instead of the default mysql module * redis: rewrite of the role (separate instances, better systemd units…) diff --git a/mysql-oracle/README.md b/mysql-oracle/README.md index 011e1ac3..a4219919 100644 --- a/mysql-oracle/README.md +++ b/mysql-oracle/README.md @@ -21,6 +21,8 @@ Tasks are extracted in several files, included in `tasks/main.yml` : * `mysql_replace_root_with_mysqladmin`: switch from `root` to `mysqladmin` user or not ; * `mysql_thread_cache_size`: number of threads for the cache ; * `mysql_innodb_buffer_pool_size`: amount of RAM dedicated to InnoDB ; +* `mysql_log_bin`: (default: `Null`, activates binlogs if used) ; +* `mysql_server_id`: (default: `Null`, MySQL version default is then used) ; * `mysql_custom_datadir`: custom datadir * `mysql_custom_tmpdir`: custom tmpdir. * `general_alert_email`: email address to send various alert messages (default: `root@localhost`). diff --git a/mysql-oracle/defaults/main.yml b/mysql-oracle/defaults/main.yml index d9724ca2..e24ff917 100644 --- a/mysql-oracle/defaults/main.yml +++ b/mysql-oracle/defaults/main.yml @@ -14,6 +14,8 @@ mysql_custom_tmpdir: '' mysql_thread_cache_size: '{{ ansible_processor_cores }}' mysql_innodb_buffer_pool_size: '{{ (ansible_memtotal_mb * 0.3) | int }}M' +mysql_log_bin: Null +mysql_server_id: Null mysql_cron_optimize: True mysql_cron_optimize_frequency: weekly diff --git a/mysql-oracle/tasks/utils.yml b/mysql-oracle/tasks/utils.yml index 79587f16..7145f884 100644 --- a/mysql-oracle/tasks/utils.yml +++ b/mysql-oracle/tasks/utils.yml @@ -31,7 +31,7 @@ # - mysql-utilities # when: ansible_distribution_major_version | version_compare('9', '>=') -- name: "mytop dependencies are installed (Debian 9 or later)" +- name: "mytop dependencies are installed (stretch)" apt: name: "{{ item }}" with_items: @@ -44,7 +44,16 @@ - packages - mytop - mysql - when: ansible_distribution_major_version | version_compare('9', '>=') + when: ansible_distribution_release == "stretch" + +- name: "Install depends for mytop (Debian 10 or later)" + apt: + name: "{{ item }}" + with_items: + - mariadb-client-10.3 + - libconfig-inifiles-perl + - libterm-readkey-perl + when: ansible_distribution_major_version | version_compare('10', '>=') - include_role: name: remount-usr