From 371783897fcacbb32fa8190b0403f552502cdbca Mon Sep 17 00:00:00 2001 From: AnsibleRoles <> Date: Sun, 31 Oct 2021 04:57:37 +0000 Subject: [PATCH 01/40] Initial commit --- .gitignore | 94 ++++++++++++++++++++++++++++++ LICENSE | 163 +++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 2 + 3 files changed, 259 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b7ba4ab --- /dev/null +++ b/.gitignore @@ -0,0 +1,94 @@ +# ---> Linux +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +# ---> Windows +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# ---> macOS +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# ---> Vim +# Swap +[._]*.s[a-v][a-z] +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim + +# Temporary +.netrwhist +*~ +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ + +# ---> VisualStudioCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1344add --- /dev/null +++ b/LICENSE @@ -0,0 +1,163 @@ +GNU LESSER GENERAL PUBLIC LICENSE + +Version 3, 29 June 2007 + +Copyright (C) 2007 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +This version of the GNU Lesser General Public License incorporates the terms +and conditions of version 3 of the GNU General Public License, supplemented +by the additional permissions listed below. + + 0. Additional Definitions. + + + +As used herein, "this License" refers to version 3 of the GNU Lesser General +Public License, and the "GNU GPL" refers to version 3 of the GNU General Public +License. + + + +"The Library" refers to a covered work governed by this License, other than +an Application or a Combined Work as defined below. + + + +An "Application" is any work that makes use of an interface provided by the +Library, but which is not otherwise based on the Library. Defining a subclass +of a class defined by the Library is deemed a mode of using an interface provided +by the Library. + + + +A "Combined Work" is a work produced by combining or linking an Application +with the Library. The particular version of the Library with which the Combined +Work was made is also called the "Linked Version". + + + +The "Minimal Corresponding Source" for a Combined Work means the Corresponding +Source for the Combined Work, excluding any source code for portions of the +Combined Work that, considered in isolation, are based on the Application, +and not on the Linked Version. + + + +The "Corresponding Application Code" for a Combined Work means the object +code and/or source code for the Application, including any data and utility +programs needed for reproducing the Combined Work from the Application, but +excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + +You may convey a covered work under sections 3 and 4 of this License without +being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + +If you modify a copy of the Library, and, in your modifications, a facility +refers to a function or data to be supplied by an Application that uses the +facility (other than as an argument passed when the facility is invoked), +then you may convey a copy of the modified version: + +a) under this License, provided that you make a good faith effort to ensure +that, in the event an Application does not supply the function or data, the +facility still operates, and performs whatever part of its purpose remains +meaningful, or + +b) under the GNU GPL, with none of the additional permissions of this License +applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + +The object code form of an Application may incorporate material from a header +file that is part of the Library. You may convey such object code under terms +of your choice, provided that, if the incorporated material is not limited +to numerical parameters, data structure layouts and accessors, or small macros, +inline functions and templates (ten or fewer lines in length), you do both +of the following: + +a) Give prominent notice with each copy of the object code that the Library +is used in it and that the Library and its use are covered by this License. + +b) Accompany the object code with a copy of the GNU GPL and this license document. + + 4. Combined Works. + +You may convey a Combined Work under terms of your choice that, taken together, +effectively do not restrict modification of the portions of the Library contained +in the Combined Work and reverse engineering for debugging such modifications, +if you also do each of the following: + +a) Give prominent notice with each copy of the Combined Work that the Library +is used in it and that the Library and its use are covered by this License. + +b) Accompany the Combined Work with a copy of the GNU GPL and this license +document. + +c) For a Combined Work that displays copyright notices during execution, include +the copyright notice for the Library among these notices, as well as a reference +directing the user to the copies of the GNU GPL and this license document. + + d) Do one of the following: + +0) Convey the Minimal Corresponding Source under the terms of this License, +and the Corresponding Application Code in a form suitable for, and under terms +that permit, the user to recombine or relink the Application with a modified +version of the Linked Version to produce a modified Combined Work, in the +manner specified by section 6 of the GNU GPL for conveying Corresponding Source. + +1) Use a suitable shared library mechanism for linking with the Library. A +suitable mechanism is one that (a) uses at run time a copy of the Library +already present on the user's computer system, and (b) will operate properly +with a modified version of the Library that is interface-compatible with the +Linked Version. + +e) Provide Installation Information, but only if you would otherwise be required +to provide such information under section 6 of the GNU GPL, and only to the +extent that such information is necessary to install and execute a modified +version of the Combined Work produced by recombining or relinking the Application +with a modified version of the Linked Version. (If you use option 4d0, the +Installation Information must accompany the Minimal Corresponding Source and +Corresponding Application Code. If you use option 4d1, you must provide the +Installation Information in the manner specified by section 6 of the GNU GPL +for conveying Corresponding Source.) + + 5. Combined Libraries. + +You may place library facilities that are a work based on the Library side +by side in a single library together with other library facilities that are +not Applications and are not covered by this License, and convey such a combined +library under terms of your choice, if you do both of the following: + +a) Accompany the combined library with a copy of the same work based on the +Library, uncombined with any other library facilities, conveyed under the +terms of this License. + +b) Give prominent notice with the combined library that part of it is a work +based on the Library, and explaining where to find the accompanying uncombined +form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + +The Free Software Foundation may publish revised and/or new versions of the +GNU Lesser General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to address +new problems or concerns. + +Each version is given a distinguishing version number. If the Library as you +received it specifies that a certain numbered version of the GNU Lesser General +Public License "or any later version" applies to it, you have the option of +following the terms and conditions either of that published version or of +any later version published by the Free Software Foundation. If the Library +as you received it does not specify a version number of the GNU Lesser General +Public License, you may choose any version of the GNU Lesser General Public +License ever published by the Free Software Foundation. + +If the Library as you received it specifies that a proxy can decide whether +future versions of the GNU Lesser General Public License shall apply, that +proxy's public statement of acceptance of any version is permanent authorization +for you to choose that version for the Library. diff --git a/README.md b/README.md new file mode 100644 index 0000000..40fb8dc --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# ensure_mariadb + From d8d40835be08f7f72b8fad7b5d8f5c5d03228a54 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sat, 30 Oct 2021 23:58:33 -0500 Subject: [PATCH 02/40] Initial Role --- .travis.yml | 29 ++++++++++++++++++++++++++ README.md | 38 ++++++++++++++++++++++++++++++++- defaults/main.yml | 2 ++ handlers/main.yml | 2 ++ meta/main.yml | 53 +++++++++++++++++++++++++++++++++++++++++++++++ tasks/main.yml | 2 ++ tests/inventory | 2 ++ tests/test.yml | 5 +++++ vars/main.yml | 2 ++ 9 files changed, 134 insertions(+), 1 deletion(-) create mode 100644 .travis.yml create mode 100644 defaults/main.yml create mode 100644 handlers/main.yml create mode 100644 meta/main.yml create mode 100644 tasks/main.yml create mode 100644 tests/inventory create mode 100644 tests/test.yml create mode 100644 vars/main.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/README.md b/README.md index 40fb8dc..225dd44 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,38 @@ -# ensure_mariadb +Role Name +========= +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/defaults/main.yml b/defaults/main.yml new file mode 100644 index 0000000..919c492 --- /dev/null +++ b/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for ensure_mariadb \ No newline at end of file diff --git a/handlers/main.yml b/handlers/main.yml new file mode 100644 index 0000000..e343175 --- /dev/null +++ b/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for ensure_mariadb \ No newline at end of file diff --git a/meta/main.yml b/meta/main.yml new file mode 100644 index 0000000..227ad9c --- /dev/null +++ b/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/tasks/main.yml b/tasks/main.yml new file mode 100644 index 0000000..75717b2 --- /dev/null +++ b/tasks/main.yml @@ -0,0 +1,2 @@ +--- +# tasks file for ensure_mariadb \ No newline at end of file diff --git a/tests/inventory b/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/tests/test.yml b/tests/test.yml new file mode 100644 index 0000000..1fd2cc0 --- /dev/null +++ b/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - ensure_mariadb \ No newline at end of file diff --git a/vars/main.yml b/vars/main.yml new file mode 100644 index 0000000..db004be --- /dev/null +++ b/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for ensure_mariadb \ No newline at end of file From e5a385e5c8982b5fcce4adf8deb19d82c4dd3ebb Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 31 Oct 2021 00:08:05 -0500 Subject: [PATCH 03/40] Install phpMyAdmin and MariaDB service --- handlers/main.yml | 27 +++++- meta/main.yml | 8 +- tasks/main.yml | 176 ++++++++++++++++++++++++++++++++++++- vars/Fedora-34-default.yml | 13 +++ vars/default.yml | 2 + 5 files changed, 220 insertions(+), 6 deletions(-) create mode 100644 vars/Fedora-34-default.yml create mode 100644 vars/default.yml diff --git a/handlers/main.yml b/handlers/main.yml index e343175..94c1744 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,2 +1,27 @@ --- -# handlers file for ensure_mariadb \ No newline at end of file +# handlers file for ensure_mariadb +- name: 'ensure_mariadb.package_facts' + ansible.builtin.package_facts: +- name: 'ensure_mariadb.service_facts' + ansible.builtin.service_facts: +- name: 'ensure_mariadb.service_reload' + when: + - ansible_system == 'Linux' + - ansible_service_mgr == 'systemd' + - ensure_mariadb is defined + ansible.builtin.systemd: + daemon_reload: 'yes' +- name: 'ensure_mariadb.services' + when: + - ansible_system == 'Linux' + - ensure_mariadb is defined + - ensure_mariadb.service_list is defined + - ensure_mariadb.service_list is iterable + - item.state == 'started' + ansible.builtin.service: + enabled: '{{ item.enabled }}' + name: '{{ item.name }}' + state: 'restarted' + loop: '{{ ensure_mariadb.service_list }}' + loop_control: + label: '{{ item.name }} will be restarted' diff --git a/meta/main.yml b/meta/main.yml index 227ad9c..60062bd 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,6 +1,6 @@ galaxy_info: - author: your name - description: your role description + author: Jason Rothstein + description: Deploy MariaDB company: your company (optional) # If the issue tracker for your role is not on github, uncomment the @@ -14,7 +14,7 @@ galaxy_info: # - GPL-3.0-only # - Apache-2.0 # - CC-BY-4.0 - license: license (GPL-2.0-or-later, MIT, etc) + license: LGPL-3.0-or-later min_ansible_version: 2.9 @@ -50,4 +50,4 @@ galaxy_info: dependencies: [] # List your role dependencies here, one per line. Be sure to remove the '[]' above, # if you add dependencies to this list. - \ No newline at end of file + diff --git a/tasks/main.yml b/tasks/main.yml index 75717b2..fb4cb50 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,2 +1,176 @@ --- -# tasks file for ensure_mariadb \ No newline at end of file +# tasks file for ensure_mariadb +- name: 'include variables' + when: + - ansible_system == 'Linux' + include_vars: + file: '{{ lookup("first_found", findme ) }}' + name: 'ensure_mariadb' + vars: + findme: + files: + - '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml' + - '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-default.yml' + - '{{ ansible_distribution }}-default.yml' + - '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml' + - '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}-default.yml' + - '{{ ansible_os_family }}-default.yml' + - 'default.yml' + paths: + - '../vars/' + errors: 'ignore' +- name: 'package discovery' + when: + - ansible_system == 'Linux' + - packages is not defined + ansible.builtin.package_facts: +- name: 'service discovery' + when: + - ansible_system == 'Linux' + - services is not defined + ansible.builtin.service_facts: +- name: 'ensure sysctl' + when: + - ansible_system == 'Linux' + - ensure_mariadb is defined + - ensure_mariadb.sysctl_list is defined + - ensure_mariadb.sysctl_list is iterable + ansible.posix.sysctl: + name: '{{ item.name }}' + reload: '{{ item.reload | default(omit) }}' + state: '{{ item.state }}' + sysctl_file: '{{ item.sysctl_file | default(omit) }}' + sysctl_set: '{{ item.sysctl_set | default(omit) }}' + value: '{{ item.value | default(omit) }}' + loop: '{{ ensure_mariadb.sysctl_list }}' + loop_control: + label: '{{ item.name }} will be {{ item.value }}' +- name: 'ensure packages' + when: + - ansible_system == 'Linux' + - ensure_mariadb is defined + - ensure_mariadb.package_list is defined + - ensure_mariadb.package_list is iterable + - packages[item.name] is not defined + ansible.builtin.package: + name: '{{ item.name }}' + state: '{{ item.state }}' + loop: '{{ ensure_mariadb.package_list }}' + loop_control: + label: '{{ item.name }} will be {{ item.state }}' + notify: + - 'ensure_mariadb.package_facts' + - 'ensure_mariadb.service_facts' +- name: 'ensure seboolean' + when: + - ansible_system == 'Linux' + - ensure_mariadb is defined + - ensure_mariadb.seboolean_list is defined + - ensure_mariadb.seboolean_list is iterable + ansible.posix.seboolean: + name: '{{ item.name }}' + persistent: '{{ item.persistent }}' + state: '{{ item.state }}' + loop: '{{ ensure_mariadb.seboolean_list }}' + loop_control: + label: '{{ item.name }} will be {{ item.state }}' +- name: 'ensure configurations' + when: + - ansible_system == 'Linux' + - ensure_mariadb is defined + - ensure_mariadb.template_list is defined + - ensure_mariadb.template_list is iterable + ansible.builtin.template: + backup: 'no' + dest: '{{ item.dest }}' + group: '{{ item.group | default(omit) }}' + mode: '{{ item.mode | default(omit) }}' + owner: '{{ item.owner | default(omit) }}' + selevel: '{{ iteml.selevel | default(omit) }}' + serole: '{{ item.serole | default(omit) }}' + setype: '{{ item.setype | default(omit) }}' + seuser: '{{ item.seuser | default(omit) }}' + src: '{{ item.src }}' + loop: '{{ ensure_mariadb.template_list }}' + loop_control: + label: '{{ item.dest }} will be ensured' + notify: + - 'ensure_mariadb.package_facts' + - 'ensure_mariadb.service_facts' + - 'ensure_mariadb.service_reload' + - 'ensure_mariadb.services' +- name: 'ensure firewall' + when: + - ansible_system == 'Linux' + - packages["firewalld"] is defined + - packages["python3-firewall"] is defined + - ensure_mariadb is defined + - ensure_mariadb.firewall_list is defined + - ensure_mariadb.firewall_list is iterable + ansible.posix.firewalld: + permanent: '{{ item.permanent }}' + service: '{{ item.service }}' + state: '{{ item.state }}' + loop: '{{ ensure_mariadb.firewall_list }}' + loop_control: + label: '{{ item.service }} will be {{ item.state }}' +- name: 'base mod_md store' + when: + - ansible_system == 'Linux' + - ensure_mariadb is defined + - http_vhost is defined + - http_vhost is iterable + ansible.builtin.file: + group: 'mariadb' + owner: 'root' + mode: '0770' + path: '/etc/httpd/md' + state: 'directory' + setype: 'httpd_var_lib_t' +- name: 'ensure vhost document roots' + when: + - ansible_system == 'Linux' + - ensure_mariadb is defined + - http_vhost is defined + - http_vhost is iterable + - item.fqdn is defined + ansible.builtin.file: + path: '/srv/http/{{ item.fqdn }}' + state: 'directory' + setype: 'httpd_sys_content_t' + loop: '{{ http_vhost }}' + loop_control: + label: '/srv/http/{{ item.fqdn }} will be ensured' +- name: 'ensure website content from git repos' + when: + - ansible_system == 'Linux' + - ensure_mariadb is defined + - http_vhost is defined + - http_vhost is iterable + - item.fqdn is defined + - item.repo is defined + ansible.builtin.git: + accept_hostkey: 'yes' + dest: '/srv/http/{{ item.fqdn }}' + repo: '{{ item.repo }}' + loop: '{{ http_vhost }}' + loop_control: + label: '/srv/http/{{ item.fqdn }} will be populated...' +- name: 'ensure services' + when: + - ansible_system == 'Linux' + - ensure_mariadb is defined + - ensure_mariadb.service_list is defined + - ensure_mariadb.service_list is iterable + ansible.builtin.service: + enabled: '{{ item.enabled }}' + name: '{{ item.name }}' + state: '{{ item.state }}' + loop: '{{ ensure_mariadb.service_list }}' + loop_control: + label: '{{ item.name }} will be {{ item.state }}' + notify: + - 'ensure_mariadb.package_facts' + - 'ensure_mariadb.service_facts' +- name: 'flush handlers' + meta: 'flush_handlers' diff --git a/vars/Fedora-34-default.yml b/vars/Fedora-34-default.yml new file mode 100644 index 0000000..06cca85 --- /dev/null +++ b/vars/Fedora-34-default.yml @@ -0,0 +1,13 @@ +--- +# vars file for ensure_mariadb +package_list: + - name: 'mariadb' + state: 'present' + - name: 'mariadb-server' + state: 'present' + - name: 'phpMyAdmin' + state: 'present' +firewall_list: + - permanent: 'yes' + service: 'mysql' + state: 'enabled' diff --git a/vars/default.yml b/vars/default.yml new file mode 100644 index 0000000..db004be --- /dev/null +++ b/vars/default.yml @@ -0,0 +1,2 @@ +--- +# vars file for ensure_mariadb \ No newline at end of file From 70917f630eca5456a78c2ac05de57d8dcef8ac1c Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 31 Oct 2021 00:15:20 -0500 Subject: [PATCH 04/40] Removed apache specific items from mariadb task template... --- tasks/main.yml | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index fb4cb50..5faf5d2 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -114,48 +114,6 @@ loop: '{{ ensure_mariadb.firewall_list }}' loop_control: label: '{{ item.service }} will be {{ item.state }}' -- name: 'base mod_md store' - when: - - ansible_system == 'Linux' - - ensure_mariadb is defined - - http_vhost is defined - - http_vhost is iterable - ansible.builtin.file: - group: 'mariadb' - owner: 'root' - mode: '0770' - path: '/etc/httpd/md' - state: 'directory' - setype: 'httpd_var_lib_t' -- name: 'ensure vhost document roots' - when: - - ansible_system == 'Linux' - - ensure_mariadb is defined - - http_vhost is defined - - http_vhost is iterable - - item.fqdn is defined - ansible.builtin.file: - path: '/srv/http/{{ item.fqdn }}' - state: 'directory' - setype: 'httpd_sys_content_t' - loop: '{{ http_vhost }}' - loop_control: - label: '/srv/http/{{ item.fqdn }} will be ensured' -- name: 'ensure website content from git repos' - when: - - ansible_system == 'Linux' - - ensure_mariadb is defined - - http_vhost is defined - - http_vhost is iterable - - item.fqdn is defined - - item.repo is defined - ansible.builtin.git: - accept_hostkey: 'yes' - dest: '/srv/http/{{ item.fqdn }}' - repo: '{{ item.repo }}' - loop: '{{ http_vhost }}' - loop_control: - label: '/srv/http/{{ item.fqdn }} will be populated...' - name: 'ensure services' when: - ansible_system == 'Linux' From 2c349836021b9736eb199c4afe8cc7740c8ad271 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 31 Oct 2021 01:02:06 -0500 Subject: [PATCH 05/40] Enable /phpMyAdmin if SSL, Use UTF8 char set, Try to auto use TLS in mariadb --- .../34/etc/httpd/conf.d/phpMyAdmin.conf | 46 ++++++ templates/Fedora/34/etc/my.cnf | 11 ++ .../Fedora/34/etc/my.cnf.d/auth_gssapi.cnf | 2 + templates/Fedora/34/etc/my.cnf.d/client.cnf | 12 ++ .../etc/my.cnf.d/cracklib_password_check.cnf | 2 + .../34/etc/my.cnf.d/enable_encryption.preset | 20 +++ .../Fedora/34/etc/my.cnf.d/mariadb-server.cnf | 59 +++++++ .../Fedora/34/etc/my.cnf.d/mysql-clients.cnf | 23 +++ templates/Fedora/34/etc/my.cnf.d/spider.cnf | 7 + .../Fedora/34/etc/phpMyAdmin/config.inc.php | 153 ++++++++++++++++++ vars/Fedora-34-default.yml | 51 ++++++ 11 files changed, 386 insertions(+) create mode 100644 templates/Fedora/34/etc/httpd/conf.d/phpMyAdmin.conf create mode 100644 templates/Fedora/34/etc/my.cnf create mode 100644 templates/Fedora/34/etc/my.cnf.d/auth_gssapi.cnf create mode 100644 templates/Fedora/34/etc/my.cnf.d/client.cnf create mode 100644 templates/Fedora/34/etc/my.cnf.d/cracklib_password_check.cnf create mode 100644 templates/Fedora/34/etc/my.cnf.d/enable_encryption.preset create mode 100644 templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf create mode 100644 templates/Fedora/34/etc/my.cnf.d/mysql-clients.cnf create mode 100644 templates/Fedora/34/etc/my.cnf.d/spider.cnf create mode 100644 templates/Fedora/34/etc/phpMyAdmin/config.inc.php diff --git a/templates/Fedora/34/etc/httpd/conf.d/phpMyAdmin.conf b/templates/Fedora/34/etc/httpd/conf.d/phpMyAdmin.conf new file mode 100644 index 0000000..98738c7 --- /dev/null +++ b/templates/Fedora/34/etc/httpd/conf.d/phpMyAdmin.conf @@ -0,0 +1,46 @@ +# phpMyAdmin - Web based MySQL browser written in php +# +# Allows only localhost by default +# +# But allowing phpMyAdmin to anyone other than localhost should be considered +# dangerous unless properly secured by SSL + +Alias /phpMyAdmin /usr/share/phpMyAdmin +Alias /phpmyadmin /usr/share/phpMyAdmin + + + AddDefaultCharset UTF-8 + Require ssl + + + + Require local + + +# These directories do not require access over HTTP - taken from the original +# phpMyAdmin upstream tarball +# + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + +# This configuration prevents mod_security at phpMyAdmin directories from +# filtering SQL etc. This may break your mod_security implementation. +# +# +# +# SecRuleInheritance Off +# +# diff --git a/templates/Fedora/34/etc/my.cnf b/templates/Fedora/34/etc/my.cnf new file mode 100644 index 0000000..913b88f --- /dev/null +++ b/templates/Fedora/34/etc/my.cnf @@ -0,0 +1,11 @@ +# +# This group is read both both by the client and the server +# use it for options that affect everything +# +[client-server] + +# +# include all files from the config directory +# +!includedir /etc/my.cnf.d + diff --git a/templates/Fedora/34/etc/my.cnf.d/auth_gssapi.cnf b/templates/Fedora/34/etc/my.cnf.d/auth_gssapi.cnf new file mode 100644 index 0000000..c7cbc78 --- /dev/null +++ b/templates/Fedora/34/etc/my.cnf.d/auth_gssapi.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=auth_gssapi.so diff --git a/templates/Fedora/34/etc/my.cnf.d/client.cnf b/templates/Fedora/34/etc/my.cnf.d/client.cnf new file mode 100644 index 0000000..2d4114c --- /dev/null +++ b/templates/Fedora/34/etc/my.cnf.d/client.cnf @@ -0,0 +1,12 @@ +# +# These two groups are read by the client library +# Use it for options that affect all clients, but not the server +# +[client] +default-character-set = utf8mb4 + +# This group is not read by mysql client library, +# If you use the same .cnf file for MySQL and MariaDB, +# use it for MariaDB-only client options +[client-mariadb] + diff --git a/templates/Fedora/34/etc/my.cnf.d/cracklib_password_check.cnf b/templates/Fedora/34/etc/my.cnf.d/cracklib_password_check.cnf new file mode 100644 index 0000000..72cbcb1 --- /dev/null +++ b/templates/Fedora/34/etc/my.cnf.d/cracklib_password_check.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=cracklib_password_check.so diff --git a/templates/Fedora/34/etc/my.cnf.d/enable_encryption.preset b/templates/Fedora/34/etc/my.cnf.d/enable_encryption.preset new file mode 100644 index 0000000..722db7e --- /dev/null +++ b/templates/Fedora/34/etc/my.cnf.d/enable_encryption.preset @@ -0,0 +1,20 @@ +# +# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d) +# and it will enable data at rest encryption. This is a simple way to +# ensure that everything that can be encrypted will be and your +# data will not leak unencrypted. +# +# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a +# newer version and your edits will be lost. Instead, add your edits +# to the .cnf file after the !include directive. +# +# NOTE that you also need to install an encryption plugin for the encryption +# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management +# +[mariadb] +aria-encrypt-tables +encrypt-binlog +encrypt-tmp-disk-tables +encrypt-tmp-files +loose-innodb-encrypt-log +loose-innodb-encrypt-tables diff --git a/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf new file mode 100644 index 0000000..18d1a69 --- /dev/null +++ b/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf @@ -0,0 +1,59 @@ +# +# These groups are read by MariaDB server. +# Use it for options that only the server (but not clients) should see +# +# See the examples of server my.cnf files in /usr/share/mysql/ +# + +# this is read by the standalone daemon and embedded servers +[server] + +# this is only for the mysqld standalone daemon +# Settings user and group are ignored when systemd is used. +# If you need to run mysqld under a different user or group, +# customize your systemd unit file for mysqld/mariadb according to the +# instructions in http://fedoraproject.org/wiki/Systemd +[mysqld] +datadir=/var/lib/mysql +socket=/var/lib/mysql/mysql.sock +log-error=/var/log/mariadb/mariadb.log +pid-file=/run/mariadb/mariadb.pid +character-set-server = utf8mb4 +ssl-ca=/etc/pki/tls/certs/ca-bundle.crt +ssl-cert=/etc/httpd/md/domains/*/pubcert.pem +ssl-key=/etc/httpd/md/domains/*/privkey.pem + + +# +# * Galera-related settings +# +[galera] +# Mandatory settings +#wsrep_on=ON +#wsrep_provider= +#wsrep_cluster_address= +#binlog_format=row +#default_storage_engine=InnoDB +#innodb_autoinc_lock_mode=2 +# +# Allow server to accept connections on all interfaces. +# +#bind-address=0.0.0.0 +# +# Optional setting +#wsrep_slave_threads=1 +#innodb_flush_log_at_trx_commit=0 + +# this is only for embedded server +[embedded] + +# This group is only read by MariaDB servers, not by MySQL. +# If you use the same .cnf file for MySQL and MariaDB, +# you can put MariaDB-only options here +[mariadb] + +# This group is only read by MariaDB-10.5 servers. +# If you use the same .cnf file for MariaDB of different versions, +# use this group for options that older servers don't understand +[mariadb-10.5] + diff --git a/templates/Fedora/34/etc/my.cnf.d/mysql-clients.cnf b/templates/Fedora/34/etc/my.cnf.d/mysql-clients.cnf new file mode 100644 index 0000000..3df9b7b --- /dev/null +++ b/templates/Fedora/34/etc/my.cnf.d/mysql-clients.cnf @@ -0,0 +1,23 @@ +# +# These groups are read by MariaDB command-line tools +# Use it for options that affect only one utility +# + +[mysql] + +[mysql_upgrade] + +[mysqladmin] + +[mysqlbinlog] + +[mysqlcheck] + +[mysqldump] + +[mysqlimport] + +[mysqlshow] + +[mysqlslap] + diff --git a/templates/Fedora/34/etc/my.cnf.d/spider.cnf b/templates/Fedora/34/etc/my.cnf.d/spider.cnf new file mode 100644 index 0000000..ebc9968 --- /dev/null +++ b/templates/Fedora/34/etc/my.cnf.d/spider.cnf @@ -0,0 +1,7 @@ +[mariadb] +# +# Uncomment line to enable +# +#plugin-load-add = ha_spider + +# Read more at https://mariadb.com/kb/en/spider/ diff --git a/templates/Fedora/34/etc/phpMyAdmin/config.inc.php b/templates/Fedora/34/etc/phpMyAdmin/config.inc.php new file mode 100644 index 0000000..b973a14 --- /dev/null +++ b/templates/Fedora/34/etc/phpMyAdmin/config.inc.php @@ -0,0 +1,153 @@ +. + */ + +declare(strict_types=1); + +/** + * This is needed for cookie based authentication to encrypt password in + * cookie. Needs to be 32 chars long. + */ +$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ + +/** + * Servers configuration + */ +$i = 0; + +/** + * First server + */ +$i++; +/* Authentication type */ +$cfg['Servers'][$i]['auth_type'] = 'cookie'; +/* Server parameters */ +$cfg['Servers'][$i]['host'] = 'localhost'; +$cfg['Servers'][$i]['compress'] = false; +$cfg['Servers'][$i]['AllowNoPassword'] = false; + +/** + * phpMyAdmin configuration storage settings. + */ + +/* User used to manipulate with storage */ +// $cfg['Servers'][$i]['controlhost'] = ''; +// $cfg['Servers'][$i]['controlport'] = ''; +// $cfg['Servers'][$i]['controluser'] = 'pma'; +// $cfg['Servers'][$i]['controlpass'] = 'pmapass'; + +/* Storage database and tables */ +// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; +// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; +// $cfg['Servers'][$i]['relation'] = 'pma__relation'; +// $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; +// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; +// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; +// $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; +// $cfg['Servers'][$i]['history'] = 'pma__history'; +// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; +// $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; +// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; +// $cfg['Servers'][$i]['recent'] = 'pma__recent'; +// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; +// $cfg['Servers'][$i]['users'] = 'pma__users'; +// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; +// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; +// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; +// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; +// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; +// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; + +/** + * End of servers configuration + */ + +/** + * Directories for saving/loading files from server + */ +$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload'; +$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; + +/** + * Whether to display icons or text or both icons and text in table row + * action segment. Value can be either of 'icons', 'text' or 'both'. + * default = 'both' + */ +//$cfg['RowActionType'] = 'icons'; + +/** + * Defines whether a user should be displayed a "show all (records)" + * button in browse mode or not. + * default = false + */ +//$cfg['ShowAll'] = true; + +/** + * Number of rows displayed when browsing a result set. If the result + * set contains more rows, "Previous" and "Next". + * Possible values: 25, 50, 100, 250, 500 + * default = 25 + */ +//$cfg['MaxRows'] = 50; + +/** + * Disallow editing of binary fields + * valid values are: + * false allow editing + * 'blob' allow editing except for BLOB fields + * 'noblob' disallow editing except for BLOB fields + * 'all' disallow editing + * default = 'blob' + */ +//$cfg['ProtectBinary'] = false; + +/** + * Default language to use, if not browser-defined or user-defined + * (you find all languages in the locale folder) + * uncomment the desired line: + * default = 'en' + */ +//$cfg['DefaultLang'] = 'en'; +//$cfg['DefaultLang'] = 'de'; + +/** + * How many columns should be used for table display of a database? + * (a value larger than 1 results in some information being hidden) + * default = 1 + */ +//$cfg['PropertiesNumColumns'] = 2; + +/** + * Set to true if you want DB-based query history.If false, this utilizes + * JS-routines to display query history (lost by window close) + * + * This requires configuration storage enabled, see above. + * default = false + */ +//$cfg['QueryHistoryDB'] = true; + +/** + * When using DB-based query history, how many entries should be kept? + * default = 25 + */ +//$cfg['QueryHistoryMax'] = 100; + +/** + * Whether or not to query the user before sending the error report to + * the phpMyAdmin team when a JavaScript error occurs + * + * Available options + * ('ask' | 'always' | 'never') + * default = 'ask' + */ +//$cfg['SendErrorReports'] = 'always'; + +/** + * You can find more configuration options in the documentation + * in the doc/ folder or at . + */ diff --git a/vars/Fedora-34-default.yml b/vars/Fedora-34-default.yml index 06cca85..8404d63 100644 --- a/vars/Fedora-34-default.yml +++ b/vars/Fedora-34-default.yml @@ -11,3 +11,54 @@ firewall_list: - permanent: 'yes' service: 'mysql' state: 'enabled' +template_list: + - dest: '/etc/my.cnf.d/client.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' + - dest: '/etc/my.cnf.d/mariadb-server.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' + - dest: '/etc/my.cnf.d/mysql-clients.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' + - dest: '/etc/my.cnf.d/spider.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' + - dest: '/etc/my.cnf.d/enable_encryption.preset' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' + - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' + - dest: '/etc/my.cnf.d/auth_gssapi.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' + - dest: '/etc/phpMyAdmin/config.inc.php' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' + - dest: '/etc/my.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' + - dest: '/templates/Fedora/34/etc/httpd/conf.d/phpMyAdmin.conf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/templates/Fedora/34/etc/httpd/conf.d/phpMyAdmin.conf' From 248787e1881038cdce5eb99aa7e81db0637c4cea Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 31 Oct 2021 01:06:48 -0500 Subject: [PATCH 06/40] Fix template pathname for phpMyAdmin... --- vars/Fedora-34-default.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vars/Fedora-34-default.yml b/vars/Fedora-34-default.yml index 8404d63..e6f3a30 100644 --- a/vars/Fedora-34-default.yml +++ b/vars/Fedora-34-default.yml @@ -57,8 +57,8 @@ template_list: mode: '0644' owner: 'root' src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' - - dest: '/templates/Fedora/34/etc/httpd/conf.d/phpMyAdmin.conf' + - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/templates/Fedora/34/etc/httpd/conf.d/phpMyAdmin.conf' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' From 1047752534b01fe7aa66a6a4988167c4e467d07f Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 31 Oct 2021 01:29:43 -0500 Subject: [PATCH 07/40] Find certificates and include them by direct name --- tasks/main.yml | 15 +++++++++++++++ templates/Fedora/34/etc/my.cnf.d/client.cnf | 2 ++ .../Fedora/34/etc/my.cnf.d/mariadb-server.cnf | 13 +++++++++++-- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 5faf5d2..a0bdd60 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -74,6 +74,21 @@ loop: '{{ ensure_mariadb.seboolean_list }}' loop_control: label: '{{ item.name }} will be {{ item.state }}' +- name: 'find certificates' + when: + - ansible_system == 'Linux' + - ensure_mariadb is defined + - ensure_mariadb.template_list is defined + - ensure_mariadb.template_list is iterable + ansible.builtin.find: + file_type: 'file' + paths: + - '/etc/httpd/md/domains/' + patterns: + - 'pubcert.pem' + - 'privkey.pem' + recursive: 'yes' + register: 'certificates' - name: 'ensure configurations' when: - ansible_system == 'Linux' diff --git a/templates/Fedora/34/etc/my.cnf.d/client.cnf b/templates/Fedora/34/etc/my.cnf.d/client.cnf index 2d4114c..05442bf 100644 --- a/templates/Fedora/34/etc/my.cnf.d/client.cnf +++ b/templates/Fedora/34/etc/my.cnf.d/client.cnf @@ -9,4 +9,6 @@ default-character-set = utf8mb4 # If you use the same .cnf file for MySQL and MariaDB, # use it for MariaDB-only client options [client-mariadb] +ssl +ssl-verify-server-cert diff --git a/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf index 18d1a69..5bed3ee 100644 --- a/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf +++ b/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf @@ -20,8 +20,17 @@ log-error=/var/log/mariadb/mariadb.log pid-file=/run/mariadb/mariadb.pid character-set-server = utf8mb4 ssl-ca=/etc/pki/tls/certs/ca-bundle.crt -ssl-cert=/etc/httpd/md/domains/*/pubcert.pem -ssl-key=/etc/httpd/md/domains/*/privkey.pem +{% for certificate in certificates.files %} +{% if certificate.path is regex('/pubcert.pem$') %} +ssl-cert={% certificate.path %} +{% endif %} +{% endfor %} +{% for certificate in certificates.files %} +{% if certificate.path is regex('/privkey.pem$') %} +ssl-key={% certificate.path %} +{% endif %} +{% endfor %} +tls-version=TLSv1.2,TLSv1.3 # From 752468e5d9488d2a1b2d2a7759673ea7c5e872ce Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 31 Oct 2021 01:40:53 -0500 Subject: [PATCH 08/40] recurse instead of recursive on find... --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index a0bdd60..ada7d3f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -87,7 +87,7 @@ patterns: - 'pubcert.pem' - 'privkey.pem' - recursive: 'yes' + recurse: 'yes' register: 'certificates' - name: 'ensure configurations' when: From e15987f2dc6eeb0be83730f844197cfe73f303bb Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 31 Oct 2021 01:45:55 -0500 Subject: [PATCH 09/40] Fix jinja2 syntax to expand a variable --- templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf index 5bed3ee..82d4c5a 100644 --- a/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf +++ b/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf @@ -22,12 +22,12 @@ character-set-server = utf8mb4 ssl-ca=/etc/pki/tls/certs/ca-bundle.crt {% for certificate in certificates.files %} {% if certificate.path is regex('/pubcert.pem$') %} -ssl-cert={% certificate.path %} +ssl-cert={{ certificate.path }} {% endif %} {% endfor %} {% for certificate in certificates.files %} {% if certificate.path is regex('/privkey.pem$') %} -ssl-key={% certificate.path %} +ssl-key={{ certificate.path }} {% endif %} {% endfor %} tls-version=TLSv1.2,TLSv1.3 From d70b23b0b1b6bac8ec92c231d81b8c689723ceb6 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 31 Oct 2021 17:55:14 -0500 Subject: [PATCH 10/40] Enable Apache mod_md Lets Encrypt Certificates with MariaDB --- .../Fedora/34/etc/my.cnf.d/mariadb-server.cnf | 12 +-- .../34/usr/lib/system/mariadb-copytls.service | 11 +++ .../34/usr/lib/system/mariadb-copytls.timer | 8 ++ .../Fedora/34/usr/lib/system/mariadb.service | 64 ++++++++++++++ .../Fedora/34/usr/lib/system/mariadb@.service | 85 +++++++++++++++++++ vars/Fedora-34-default.yml | 20 +++++ 6 files changed, 190 insertions(+), 10 deletions(-) create mode 100644 templates/Fedora/34/usr/lib/system/mariadb-copytls.service create mode 100644 templates/Fedora/34/usr/lib/system/mariadb-copytls.timer create mode 100644 templates/Fedora/34/usr/lib/system/mariadb.service create mode 100644 templates/Fedora/34/usr/lib/system/mariadb@.service diff --git a/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf index 82d4c5a..18ab50a 100644 --- a/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf +++ b/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf @@ -20,16 +20,8 @@ log-error=/var/log/mariadb/mariadb.log pid-file=/run/mariadb/mariadb.pid character-set-server = utf8mb4 ssl-ca=/etc/pki/tls/certs/ca-bundle.crt -{% for certificate in certificates.files %} -{% if certificate.path is regex('/pubcert.pem$') %} -ssl-cert={{ certificate.path }} -{% endif %} -{% endfor %} -{% for certificate in certificates.files %} -{% if certificate.path is regex('/privkey.pem$') %} -ssl-key={{ certificate.path }} -{% endif %} -{% endfor %} +ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm +ssl-key=/etc/my.cnf.d/certificates/privkey.epm tls-version=TLSv1.2,TLSv1.3 diff --git a/templates/Fedora/34/usr/lib/system/mariadb-copytls.service b/templates/Fedora/34/usr/lib/system/mariadb-copytls.service new file mode 100644 index 0000000..2c02394 --- /dev/null +++ b/templates/Fedora/34/usr/lib/system/mariadb-copytls.service @@ -0,0 +1,11 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Service] +Type=oneshot +ExecStartPre=mkdir -p /etc/my.cnf.d/certificates +ExecStart=cp /etc/httpd/md/domains/*/*.pem /etc/my.cnf.d/certificates/ +ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/34/usr/lib/system/mariadb-copytls.timer b/templates/Fedora/34/usr/lib/system/mariadb-copytls.timer new file mode 100644 index 0000000..8e5ad7b --- /dev/null +++ b/templates/Fedora/34/usr/lib/system/mariadb-copytls.timer @@ -0,0 +1,8 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Timer] +OnUnitActiveSec=5min + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/34/usr/lib/system/mariadb.service b/templates/Fedora/34/usr/lib/system/mariadb.service new file mode 100644 index 0000000..d61fd82 --- /dev/null +++ b/templates/Fedora/34/usr/lib/system/mariadb.service @@ -0,0 +1,64 @@ +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, the +# best way is to: +# +# root> systemctl edit mariadb.service +# +# Then add additonal directives under a section (probably [Service]). +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 +# + +[Unit] +Description=MariaDB 10.5 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket +# '%n' expands to 'Full unit name'; man systemd.unit +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/templates/Fedora/34/usr/lib/system/mariadb@.service b/templates/Fedora/34/usr/lib/system/mariadb@.service new file mode 100644 index 0000000..10ca8fd --- /dev/null +++ b/templates/Fedora/34/usr/lib/system/mariadb@.service @@ -0,0 +1,85 @@ +# Multi instance version of MariaDB. For if you run mutiple verions at once. +# Also used for mariadb@bootstrap to bootstrap Galera. +# +# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in +# /etc/@my.cnf to change per instance settings. A minimumal necessary +# configuration items to change to avoid conflicts between instances is: +# +# [mariadbd.instancename] +# # TCP port to make available for clients +# port=3306 +# # Socket to make available for clients +# socket=/tmp/mariadb-instancename.sock +# # Where MariaDB should store all its data +# datadir=/usr/local/mariadb-instancename/data +# +# and start the service via: +# +# root> systemctl start mariadb@{instancename}.server +# +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, for +# all instances, the best way is: +# +# root> systemctl edit mariadb@.service +# +# Then add additonal directives under a section (probably [Service]). +# +# If you only want to change a specific instance: +# +# root> systemctl edit mariadb@{instancename}.server +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 + +[Unit] +Description=MariaDB 10.5 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/vars/Fedora-34-default.yml b/vars/Fedora-34-default.yml index e6f3a30..403d699 100644 --- a/vars/Fedora-34-default.yml +++ b/vars/Fedora-34-default.yml @@ -62,3 +62,23 @@ template_list: mode: '0644' owner: 'root' src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' + - dest: '/usr/lib/system/mariadb.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/system/mariadb.service' + - dest: '/usr/lib/system/mariadb@.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/system/mariadb@.service' + - dest: '/usr/lib/system/mariadb-copytls.timer' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/system/mariadb-copytls.timer' + - dest: '/usr/lib/system/mariadb-copytls.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/system/mariadb-copytls.service' From a0cf50b7cf8ac4b009db96ab36de964c1c051463 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 31 Oct 2021 17:59:41 -0500 Subject: [PATCH 11/40] Template path corrected for systemd unit files --- vars/Fedora-34-default.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vars/Fedora-34-default.yml b/vars/Fedora-34-default.yml index 403d699..ea389b9 100644 --- a/vars/Fedora-34-default.yml +++ b/vars/Fedora-34-default.yml @@ -62,23 +62,23 @@ template_list: mode: '0644' owner: 'root' src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' - - dest: '/usr/lib/system/mariadb.service' + - dest: '/usr/lib/systemd/system/mariadb.service' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/system/mariadb.service' - - dest: '/usr/lib/system/mariadb@.service' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' + - dest: '/usr/lib/systemd/system/mariadb@.service' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/system/mariadb@.service' - - dest: '/usr/lib/system/mariadb-copytls.timer' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' + - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/system/mariadb-copytls.timer' - - dest: '/usr/lib/system/mariadb-copytls.service' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' + - dest: '/usr/lib/systemd/system/mariadb-copytls.service' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/system/mariadb-copytls.service' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' From e7eac9545397180685770035e3d074d1e306a5eb Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 31 Oct 2021 18:03:51 -0500 Subject: [PATCH 12/40] Fix path names for templates to match target system --- .../34/usr/lib/{ => systemd}/system/mariadb-copytls.service | 0 .../Fedora/34/usr/lib/{ => systemd}/system/mariadb-copytls.timer | 0 templates/Fedora/34/usr/lib/{ => systemd}/system/mariadb.service | 0 templates/Fedora/34/usr/lib/{ => systemd}/system/mariadb@.service | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename templates/Fedora/34/usr/lib/{ => systemd}/system/mariadb-copytls.service (100%) rename templates/Fedora/34/usr/lib/{ => systemd}/system/mariadb-copytls.timer (100%) rename templates/Fedora/34/usr/lib/{ => systemd}/system/mariadb.service (100%) rename templates/Fedora/34/usr/lib/{ => systemd}/system/mariadb@.service (100%) diff --git a/templates/Fedora/34/usr/lib/system/mariadb-copytls.service b/templates/Fedora/34/usr/lib/systemd/system/mariadb-copytls.service similarity index 100% rename from templates/Fedora/34/usr/lib/system/mariadb-copytls.service rename to templates/Fedora/34/usr/lib/systemd/system/mariadb-copytls.service diff --git a/templates/Fedora/34/usr/lib/system/mariadb-copytls.timer b/templates/Fedora/34/usr/lib/systemd/system/mariadb-copytls.timer similarity index 100% rename from templates/Fedora/34/usr/lib/system/mariadb-copytls.timer rename to templates/Fedora/34/usr/lib/systemd/system/mariadb-copytls.timer diff --git a/templates/Fedora/34/usr/lib/system/mariadb.service b/templates/Fedora/34/usr/lib/systemd/system/mariadb.service similarity index 100% rename from templates/Fedora/34/usr/lib/system/mariadb.service rename to templates/Fedora/34/usr/lib/systemd/system/mariadb.service diff --git a/templates/Fedora/34/usr/lib/system/mariadb@.service b/templates/Fedora/34/usr/lib/systemd/system/mariadb@.service similarity index 100% rename from templates/Fedora/34/usr/lib/system/mariadb@.service rename to templates/Fedora/34/usr/lib/systemd/system/mariadb@.service From 1daa22d7671c90b6d1db6235df7a3890eb24e4bf Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 31 Oct 2021 18:37:59 -0500 Subject: [PATCH 13/40] Fix the TLS copy error and MariaDB not liking the CA Bundle --- templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf | 1 - .../Fedora/34/usr/lib/systemd/system/mariadb-copytls.service | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf index 18ab50a..7239135 100644 --- a/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf +++ b/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf @@ -19,7 +19,6 @@ socket=/var/lib/mysql/mysql.sock log-error=/var/log/mariadb/mariadb.log pid-file=/run/mariadb/mariadb.pid character-set-server = utf8mb4 -ssl-ca=/etc/pki/tls/certs/ca-bundle.crt ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm ssl-key=/etc/my.cnf.d/certificates/privkey.epm tls-version=TLSv1.2,TLSv1.3 diff --git a/templates/Fedora/34/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/34/usr/lib/systemd/system/mariadb-copytls.service index 2c02394..625bdd1 100644 --- a/templates/Fedora/34/usr/lib/systemd/system/mariadb-copytls.service +++ b/templates/Fedora/34/usr/lib/systemd/system/mariadb-copytls.service @@ -4,7 +4,7 @@ Description=Copy TLS Certificates for Mariadb [Service] Type=oneshot ExecStartPre=mkdir -p /etc/my.cnf.d/certificates -ExecStart=cp /etc/httpd/md/domains/*/*.pem /etc/my.cnf.d/certificates/ +ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/*/*.pem /etc/my.cnf.d/certificates/' ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates [Install] From f2a99b77e42ecb93f379c4c9231891d87e923ee7 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sat, 13 Nov 2021 20:45:36 -0600 Subject: [PATCH 14/40] Add Fedora 35 Support --- .../35/etc/httpd/conf.d/phpMyAdmin.conf | 46 ++++++ templates/Fedora/35/etc/my.cnf | 11 ++ .../Fedora/35/etc/my.cnf.d/auth_gssapi.cnf | 2 + templates/Fedora/35/etc/my.cnf.d/client.cnf | 14 ++ .../etc/my.cnf.d/cracklib_password_check.cnf | 2 + .../35/etc/my.cnf.d/enable_encryption.preset | 20 +++ .../Fedora/35/etc/my.cnf.d/mariadb-server.cnf | 59 +++++++ .../Fedora/35/etc/my.cnf.d/mysql-clients.cnf | 23 +++ templates/Fedora/35/etc/my.cnf.d/spider.cnf | 7 + .../Fedora/35/etc/phpMyAdmin/config.inc.php | 153 ++++++++++++++++++ .../systemd/system/mariadb-copytls.service | 11 ++ .../lib/systemd/system/mariadb-copytls.timer | 8 + .../35/usr/lib/systemd/system/mariadb.service | 64 ++++++++ .../usr/lib/systemd/system/mariadb@.service | 85 ++++++++++ vars/Fedora-35-default.yml | 84 ++++++++++ 15 files changed, 589 insertions(+) create mode 100644 templates/Fedora/35/etc/httpd/conf.d/phpMyAdmin.conf create mode 100644 templates/Fedora/35/etc/my.cnf create mode 100644 templates/Fedora/35/etc/my.cnf.d/auth_gssapi.cnf create mode 100644 templates/Fedora/35/etc/my.cnf.d/client.cnf create mode 100644 templates/Fedora/35/etc/my.cnf.d/cracklib_password_check.cnf create mode 100644 templates/Fedora/35/etc/my.cnf.d/enable_encryption.preset create mode 100644 templates/Fedora/35/etc/my.cnf.d/mariadb-server.cnf create mode 100644 templates/Fedora/35/etc/my.cnf.d/mysql-clients.cnf create mode 100644 templates/Fedora/35/etc/my.cnf.d/spider.cnf create mode 100644 templates/Fedora/35/etc/phpMyAdmin/config.inc.php create mode 100644 templates/Fedora/35/usr/lib/systemd/system/mariadb-copytls.service create mode 100644 templates/Fedora/35/usr/lib/systemd/system/mariadb-copytls.timer create mode 100644 templates/Fedora/35/usr/lib/systemd/system/mariadb.service create mode 100644 templates/Fedora/35/usr/lib/systemd/system/mariadb@.service create mode 100644 vars/Fedora-35-default.yml diff --git a/templates/Fedora/35/etc/httpd/conf.d/phpMyAdmin.conf b/templates/Fedora/35/etc/httpd/conf.d/phpMyAdmin.conf new file mode 100644 index 0000000..98738c7 --- /dev/null +++ b/templates/Fedora/35/etc/httpd/conf.d/phpMyAdmin.conf @@ -0,0 +1,46 @@ +# phpMyAdmin - Web based MySQL browser written in php +# +# Allows only localhost by default +# +# But allowing phpMyAdmin to anyone other than localhost should be considered +# dangerous unless properly secured by SSL + +Alias /phpMyAdmin /usr/share/phpMyAdmin +Alias /phpmyadmin /usr/share/phpMyAdmin + + + AddDefaultCharset UTF-8 + Require ssl + + + + Require local + + +# These directories do not require access over HTTP - taken from the original +# phpMyAdmin upstream tarball +# + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + +# This configuration prevents mod_security at phpMyAdmin directories from +# filtering SQL etc. This may break your mod_security implementation. +# +# +# +# SecRuleInheritance Off +# +# diff --git a/templates/Fedora/35/etc/my.cnf b/templates/Fedora/35/etc/my.cnf new file mode 100644 index 0000000..913b88f --- /dev/null +++ b/templates/Fedora/35/etc/my.cnf @@ -0,0 +1,11 @@ +# +# This group is read both both by the client and the server +# use it for options that affect everything +# +[client-server] + +# +# include all files from the config directory +# +!includedir /etc/my.cnf.d + diff --git a/templates/Fedora/35/etc/my.cnf.d/auth_gssapi.cnf b/templates/Fedora/35/etc/my.cnf.d/auth_gssapi.cnf new file mode 100644 index 0000000..c7cbc78 --- /dev/null +++ b/templates/Fedora/35/etc/my.cnf.d/auth_gssapi.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=auth_gssapi.so diff --git a/templates/Fedora/35/etc/my.cnf.d/client.cnf b/templates/Fedora/35/etc/my.cnf.d/client.cnf new file mode 100644 index 0000000..05442bf --- /dev/null +++ b/templates/Fedora/35/etc/my.cnf.d/client.cnf @@ -0,0 +1,14 @@ +# +# These two groups are read by the client library +# Use it for options that affect all clients, but not the server +# +[client] +default-character-set = utf8mb4 + +# This group is not read by mysql client library, +# If you use the same .cnf file for MySQL and MariaDB, +# use it for MariaDB-only client options +[client-mariadb] +ssl +ssl-verify-server-cert + diff --git a/templates/Fedora/35/etc/my.cnf.d/cracklib_password_check.cnf b/templates/Fedora/35/etc/my.cnf.d/cracklib_password_check.cnf new file mode 100644 index 0000000..72cbcb1 --- /dev/null +++ b/templates/Fedora/35/etc/my.cnf.d/cracklib_password_check.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=cracklib_password_check.so diff --git a/templates/Fedora/35/etc/my.cnf.d/enable_encryption.preset b/templates/Fedora/35/etc/my.cnf.d/enable_encryption.preset new file mode 100644 index 0000000..722db7e --- /dev/null +++ b/templates/Fedora/35/etc/my.cnf.d/enable_encryption.preset @@ -0,0 +1,20 @@ +# +# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d) +# and it will enable data at rest encryption. This is a simple way to +# ensure that everything that can be encrypted will be and your +# data will not leak unencrypted. +# +# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a +# newer version and your edits will be lost. Instead, add your edits +# to the .cnf file after the !include directive. +# +# NOTE that you also need to install an encryption plugin for the encryption +# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management +# +[mariadb] +aria-encrypt-tables +encrypt-binlog +encrypt-tmp-disk-tables +encrypt-tmp-files +loose-innodb-encrypt-log +loose-innodb-encrypt-tables diff --git a/templates/Fedora/35/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/35/etc/my.cnf.d/mariadb-server.cnf new file mode 100644 index 0000000..7239135 --- /dev/null +++ b/templates/Fedora/35/etc/my.cnf.d/mariadb-server.cnf @@ -0,0 +1,59 @@ +# +# These groups are read by MariaDB server. +# Use it for options that only the server (but not clients) should see +# +# See the examples of server my.cnf files in /usr/share/mysql/ +# + +# this is read by the standalone daemon and embedded servers +[server] + +# this is only for the mysqld standalone daemon +# Settings user and group are ignored when systemd is used. +# If you need to run mysqld under a different user or group, +# customize your systemd unit file for mysqld/mariadb according to the +# instructions in http://fedoraproject.org/wiki/Systemd +[mysqld] +datadir=/var/lib/mysql +socket=/var/lib/mysql/mysql.sock +log-error=/var/log/mariadb/mariadb.log +pid-file=/run/mariadb/mariadb.pid +character-set-server = utf8mb4 +ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm +ssl-key=/etc/my.cnf.d/certificates/privkey.epm +tls-version=TLSv1.2,TLSv1.3 + + +# +# * Galera-related settings +# +[galera] +# Mandatory settings +#wsrep_on=ON +#wsrep_provider= +#wsrep_cluster_address= +#binlog_format=row +#default_storage_engine=InnoDB +#innodb_autoinc_lock_mode=2 +# +# Allow server to accept connections on all interfaces. +# +#bind-address=0.0.0.0 +# +# Optional setting +#wsrep_slave_threads=1 +#innodb_flush_log_at_trx_commit=0 + +# this is only for embedded server +[embedded] + +# This group is only read by MariaDB servers, not by MySQL. +# If you use the same .cnf file for MySQL and MariaDB, +# you can put MariaDB-only options here +[mariadb] + +# This group is only read by MariaDB-10.5 servers. +# If you use the same .cnf file for MariaDB of different versions, +# use this group for options that older servers don't understand +[mariadb-10.5] + diff --git a/templates/Fedora/35/etc/my.cnf.d/mysql-clients.cnf b/templates/Fedora/35/etc/my.cnf.d/mysql-clients.cnf new file mode 100644 index 0000000..3df9b7b --- /dev/null +++ b/templates/Fedora/35/etc/my.cnf.d/mysql-clients.cnf @@ -0,0 +1,23 @@ +# +# These groups are read by MariaDB command-line tools +# Use it for options that affect only one utility +# + +[mysql] + +[mysql_upgrade] + +[mysqladmin] + +[mysqlbinlog] + +[mysqlcheck] + +[mysqldump] + +[mysqlimport] + +[mysqlshow] + +[mysqlslap] + diff --git a/templates/Fedora/35/etc/my.cnf.d/spider.cnf b/templates/Fedora/35/etc/my.cnf.d/spider.cnf new file mode 100644 index 0000000..ebc9968 --- /dev/null +++ b/templates/Fedora/35/etc/my.cnf.d/spider.cnf @@ -0,0 +1,7 @@ +[mariadb] +# +# Uncomment line to enable +# +#plugin-load-add = ha_spider + +# Read more at https://mariadb.com/kb/en/spider/ diff --git a/templates/Fedora/35/etc/phpMyAdmin/config.inc.php b/templates/Fedora/35/etc/phpMyAdmin/config.inc.php new file mode 100644 index 0000000..b973a14 --- /dev/null +++ b/templates/Fedora/35/etc/phpMyAdmin/config.inc.php @@ -0,0 +1,153 @@ +. + */ + +declare(strict_types=1); + +/** + * This is needed for cookie based authentication to encrypt password in + * cookie. Needs to be 32 chars long. + */ +$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ + +/** + * Servers configuration + */ +$i = 0; + +/** + * First server + */ +$i++; +/* Authentication type */ +$cfg['Servers'][$i]['auth_type'] = 'cookie'; +/* Server parameters */ +$cfg['Servers'][$i]['host'] = 'localhost'; +$cfg['Servers'][$i]['compress'] = false; +$cfg['Servers'][$i]['AllowNoPassword'] = false; + +/** + * phpMyAdmin configuration storage settings. + */ + +/* User used to manipulate with storage */ +// $cfg['Servers'][$i]['controlhost'] = ''; +// $cfg['Servers'][$i]['controlport'] = ''; +// $cfg['Servers'][$i]['controluser'] = 'pma'; +// $cfg['Servers'][$i]['controlpass'] = 'pmapass'; + +/* Storage database and tables */ +// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; +// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; +// $cfg['Servers'][$i]['relation'] = 'pma__relation'; +// $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; +// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; +// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; +// $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; +// $cfg['Servers'][$i]['history'] = 'pma__history'; +// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; +// $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; +// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; +// $cfg['Servers'][$i]['recent'] = 'pma__recent'; +// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; +// $cfg['Servers'][$i]['users'] = 'pma__users'; +// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; +// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; +// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; +// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; +// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; +// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; + +/** + * End of servers configuration + */ + +/** + * Directories for saving/loading files from server + */ +$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload'; +$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; + +/** + * Whether to display icons or text or both icons and text in table row + * action segment. Value can be either of 'icons', 'text' or 'both'. + * default = 'both' + */ +//$cfg['RowActionType'] = 'icons'; + +/** + * Defines whether a user should be displayed a "show all (records)" + * button in browse mode or not. + * default = false + */ +//$cfg['ShowAll'] = true; + +/** + * Number of rows displayed when browsing a result set. If the result + * set contains more rows, "Previous" and "Next". + * Possible values: 25, 50, 100, 250, 500 + * default = 25 + */ +//$cfg['MaxRows'] = 50; + +/** + * Disallow editing of binary fields + * valid values are: + * false allow editing + * 'blob' allow editing except for BLOB fields + * 'noblob' disallow editing except for BLOB fields + * 'all' disallow editing + * default = 'blob' + */ +//$cfg['ProtectBinary'] = false; + +/** + * Default language to use, if not browser-defined or user-defined + * (you find all languages in the locale folder) + * uncomment the desired line: + * default = 'en' + */ +//$cfg['DefaultLang'] = 'en'; +//$cfg['DefaultLang'] = 'de'; + +/** + * How many columns should be used for table display of a database? + * (a value larger than 1 results in some information being hidden) + * default = 1 + */ +//$cfg['PropertiesNumColumns'] = 2; + +/** + * Set to true if you want DB-based query history.If false, this utilizes + * JS-routines to display query history (lost by window close) + * + * This requires configuration storage enabled, see above. + * default = false + */ +//$cfg['QueryHistoryDB'] = true; + +/** + * When using DB-based query history, how many entries should be kept? + * default = 25 + */ +//$cfg['QueryHistoryMax'] = 100; + +/** + * Whether or not to query the user before sending the error report to + * the phpMyAdmin team when a JavaScript error occurs + * + * Available options + * ('ask' | 'always' | 'never') + * default = 'ask' + */ +//$cfg['SendErrorReports'] = 'always'; + +/** + * You can find more configuration options in the documentation + * in the doc/ folder or at . + */ diff --git a/templates/Fedora/35/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/35/usr/lib/systemd/system/mariadb-copytls.service new file mode 100644 index 0000000..625bdd1 --- /dev/null +++ b/templates/Fedora/35/usr/lib/systemd/system/mariadb-copytls.service @@ -0,0 +1,11 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Service] +Type=oneshot +ExecStartPre=mkdir -p /etc/my.cnf.d/certificates +ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/*/*.pem /etc/my.cnf.d/certificates/' +ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/35/usr/lib/systemd/system/mariadb-copytls.timer b/templates/Fedora/35/usr/lib/systemd/system/mariadb-copytls.timer new file mode 100644 index 0000000..8e5ad7b --- /dev/null +++ b/templates/Fedora/35/usr/lib/systemd/system/mariadb-copytls.timer @@ -0,0 +1,8 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Timer] +OnUnitActiveSec=5min + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/35/usr/lib/systemd/system/mariadb.service b/templates/Fedora/35/usr/lib/systemd/system/mariadb.service new file mode 100644 index 0000000..d61fd82 --- /dev/null +++ b/templates/Fedora/35/usr/lib/systemd/system/mariadb.service @@ -0,0 +1,64 @@ +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, the +# best way is to: +# +# root> systemctl edit mariadb.service +# +# Then add additonal directives under a section (probably [Service]). +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 +# + +[Unit] +Description=MariaDB 10.5 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket +# '%n' expands to 'Full unit name'; man systemd.unit +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/templates/Fedora/35/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/35/usr/lib/systemd/system/mariadb@.service new file mode 100644 index 0000000..10ca8fd --- /dev/null +++ b/templates/Fedora/35/usr/lib/systemd/system/mariadb@.service @@ -0,0 +1,85 @@ +# Multi instance version of MariaDB. For if you run mutiple verions at once. +# Also used for mariadb@bootstrap to bootstrap Galera. +# +# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in +# /etc/@my.cnf to change per instance settings. A minimumal necessary +# configuration items to change to avoid conflicts between instances is: +# +# [mariadbd.instancename] +# # TCP port to make available for clients +# port=3306 +# # Socket to make available for clients +# socket=/tmp/mariadb-instancename.sock +# # Where MariaDB should store all its data +# datadir=/usr/local/mariadb-instancename/data +# +# and start the service via: +# +# root> systemctl start mariadb@{instancename}.server +# +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, for +# all instances, the best way is: +# +# root> systemctl edit mariadb@.service +# +# Then add additonal directives under a section (probably [Service]). +# +# If you only want to change a specific instance: +# +# root> systemctl edit mariadb@{instancename}.server +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 + +[Unit] +Description=MariaDB 10.5 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/vars/Fedora-35-default.yml b/vars/Fedora-35-default.yml new file mode 100644 index 0000000..ea389b9 --- /dev/null +++ b/vars/Fedora-35-default.yml @@ -0,0 +1,84 @@ +--- +# vars file for ensure_mariadb +package_list: + - name: 'mariadb' + state: 'present' + - name: 'mariadb-server' + state: 'present' + - name: 'phpMyAdmin' + state: 'present' +firewall_list: + - permanent: 'yes' + service: 'mysql' + state: 'enabled' +template_list: + - dest: '/etc/my.cnf.d/client.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' + - dest: '/etc/my.cnf.d/mariadb-server.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' + - dest: '/etc/my.cnf.d/mysql-clients.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' + - dest: '/etc/my.cnf.d/spider.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' + - dest: '/etc/my.cnf.d/enable_encryption.preset' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' + - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' + - dest: '/etc/my.cnf.d/auth_gssapi.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' + - dest: '/etc/phpMyAdmin/config.inc.php' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' + - dest: '/etc/my.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' + - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' + - dest: '/usr/lib/systemd/system/mariadb.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' + - dest: '/usr/lib/systemd/system/mariadb@.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' + - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' + - dest: '/usr/lib/systemd/system/mariadb-copytls.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' From d2fa1b290a430538187d261ac8508039da8bc441 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 23 Jan 2022 17:07:18 -0600 Subject: [PATCH 15/40] Allow choice in TLS Certificate from mod_md --- README.md | 4 +++- defaults/main.yml | 3 ++- .../Fedora/34/usr/lib/systemd/system/mariadb-copytls.service | 2 +- .../Fedora/35/usr/lib/systemd/system/mariadb-copytls.service | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 225dd44..8b230d9 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,9 @@ Any pre-requisites that may not be covered by Ansible itself or the role should Role Variables -------------- -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. +| variable | default | description | +|-|-|-| +| mariadb_vhost | inventory_hostname | What mod_md certificate should be used for MariaDB | Dependencies ------------ diff --git a/defaults/main.yml b/defaults/main.yml index 919c492..4eadb0c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,2 +1,3 @@ --- -# defaults file for ensure_mariadb \ No newline at end of file +# defaults file for ensure_mariadb +mariadb_vhost: '{{ inventory_hostname }}' diff --git a/templates/Fedora/34/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/34/usr/lib/systemd/system/mariadb-copytls.service index 625bdd1..3f63078 100644 --- a/templates/Fedora/34/usr/lib/systemd/system/mariadb-copytls.service +++ b/templates/Fedora/34/usr/lib/systemd/system/mariadb-copytls.service @@ -4,7 +4,7 @@ Description=Copy TLS Certificates for Mariadb [Service] Type=oneshot ExecStartPre=mkdir -p /etc/my.cnf.d/certificates -ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/*/*.pem /etc/my.cnf.d/certificates/' +ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/{{ mariadb_vhost }}/*.pem /etc/my.cnf.d/certificates/' ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates [Install] diff --git a/templates/Fedora/35/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/35/usr/lib/systemd/system/mariadb-copytls.service index 625bdd1..3f63078 100644 --- a/templates/Fedora/35/usr/lib/systemd/system/mariadb-copytls.service +++ b/templates/Fedora/35/usr/lib/systemd/system/mariadb-copytls.service @@ -4,7 +4,7 @@ Description=Copy TLS Certificates for Mariadb [Service] Type=oneshot ExecStartPre=mkdir -p /etc/my.cnf.d/certificates -ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/*/*.pem /etc/my.cnf.d/certificates/' +ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/{{ mariadb_vhost }}/*.pem /etc/my.cnf.d/certificates/' ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates [Install] From f4bb7b9d035bac9d28be6d1455aa8e1eae303190 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 23 Jan 2022 18:53:11 -0600 Subject: [PATCH 16/40] Make the certificates directory instead of find it --- tasks/main.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index ada7d3f..6328ef5 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -74,21 +74,15 @@ loop: '{{ ensure_mariadb.seboolean_list }}' loop_control: label: '{{ item.name }} will be {{ item.state }}' -- name: 'find certificates' +- name: 'mkdir certificates' when: - ansible_system == 'Linux' - ensure_mariadb is defined - ensure_mariadb.template_list is defined - ensure_mariadb.template_list is iterable - ansible.builtin.find: - file_type: 'file' - paths: - - '/etc/httpd/md/domains/' - patterns: - - 'pubcert.pem' - - 'privkey.pem' - recurse: 'yes' - register: 'certificates' + ansible.builtin.file: + path: '/etc/my.cnf.d/certificates' + state: 'directory' - name: 'ensure configurations' when: - ansible_system == 'Linux' From f4e0e923b2bbb2628796e4853305c1cd6d5b8d7b Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 30 Jan 2022 18:58:42 -0600 Subject: [PATCH 17/40] Adding services to validate are running --- vars/Fedora-34-default.yml | 16 ++++++++++++++++ vars/Fedora-35-default.yml | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/vars/Fedora-34-default.yml b/vars/Fedora-34-default.yml index ea389b9..be65d9f 100644 --- a/vars/Fedora-34-default.yml +++ b/vars/Fedora-34-default.yml @@ -11,6 +11,22 @@ firewall_list: - permanent: 'yes' service: 'mysql' state: 'enabled' +service_list: + - name: 'httpd.service' + state: 'started' + enabled: 'yes' + - name: 'httpd-reload.timer' + state: 'started' + enabled: 'yes' + - name: 'php-fpm.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb-copytls.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb.service' + state: 'started' + enabled: 'yes' template_list: - dest: '/etc/my.cnf.d/client.cnf' group: 'root' diff --git a/vars/Fedora-35-default.yml b/vars/Fedora-35-default.yml index ea389b9..be65d9f 100644 --- a/vars/Fedora-35-default.yml +++ b/vars/Fedora-35-default.yml @@ -11,6 +11,22 @@ firewall_list: - permanent: 'yes' service: 'mysql' state: 'enabled' +service_list: + - name: 'httpd.service' + state: 'started' + enabled: 'yes' + - name: 'httpd-reload.timer' + state: 'started' + enabled: 'yes' + - name: 'php-fpm.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb-copytls.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb.service' + state: 'started' + enabled: 'yes' template_list: - dest: '/etc/my.cnf.d/client.cnf' group: 'root' From c926e408dc3f96b5246fc27e46d4620ff0530869 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 30 Jan 2022 21:36:26 -0600 Subject: [PATCH 18/40] If things change, always notify all the handlers --- tasks/main.yml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 6328ef5..9ec8c31 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -45,6 +45,11 @@ loop: '{{ ensure_mariadb.sysctl_list }}' loop_control: label: '{{ item.name }} will be {{ item.value }}' + notify: + - 'ensure_mariadb.package_facts' + - 'ensure_mariadb.service_facts' + - 'ensure_mariadb.service_reload' + - 'ensure_mariadb.services' - name: 'ensure packages' when: - ansible_system == 'Linux' @@ -61,6 +66,8 @@ notify: - 'ensure_mariadb.package_facts' - 'ensure_mariadb.service_facts' + - 'ensure_mariadb.service_reload' + - 'ensure_mariadb.services' - name: 'ensure seboolean' when: - ansible_system == 'Linux' @@ -74,15 +81,11 @@ loop: '{{ ensure_mariadb.seboolean_list }}' loop_control: label: '{{ item.name }} will be {{ item.state }}' -- name: 'mkdir certificates' - when: - - ansible_system == 'Linux' - - ensure_mariadb is defined - - ensure_mariadb.template_list is defined - - ensure_mariadb.template_list is iterable - ansible.builtin.file: - path: '/etc/my.cnf.d/certificates' - state: 'directory' + notify: + - 'ensure_mariadb.package_facts' + - 'ensure_mariadb.service_facts' + - 'ensure_mariadb.service_reload' + - 'ensure_mariadb.services' - name: 'ensure configurations' when: - ansible_system == 'Linux' @@ -123,6 +126,11 @@ loop: '{{ ensure_mariadb.firewall_list }}' loop_control: label: '{{ item.service }} will be {{ item.state }}' + notify: + - 'ensure_mariadb.package_facts' + - 'ensure_mariadb.service_facts' + - 'ensure_mariadb.service_reload' + - 'ensure_mariadb.services' - name: 'ensure services' when: - ansible_system == 'Linux' @@ -139,5 +147,7 @@ notify: - 'ensure_mariadb.package_facts' - 'ensure_mariadb.service_facts' + - 'ensure_mariadb.service_reload' + - 'ensure_mariadb.services' - name: 'flush handlers' meta: 'flush_handlers' From 604da46a69c3c3feaf435918d1c47aefddaef13a Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 5 Jun 2022 16:48:01 -0500 Subject: [PATCH 19/40] Update tasks --- tasks/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 9ec8c31..5efad0a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -56,7 +56,6 @@ - ensure_mariadb is defined - ensure_mariadb.package_list is defined - ensure_mariadb.package_list is iterable - - packages[item.name] is not defined ansible.builtin.package: name: '{{ item.name }}' state: '{{ item.state }}' From 902503f4be4c3e465a81f6ff3a3b591656c8e160 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 5 Jun 2022 18:27:57 -0500 Subject: [PATCH 20/40] Enable Fedora 36 --- .../36/etc/httpd/conf.d/phpMyAdmin.conf | 46 ++++++ templates/Fedora/36/etc/my.cnf | 11 ++ .../Fedora/36/etc/my.cnf.d/auth_gssapi.cnf | 2 + templates/Fedora/36/etc/my.cnf.d/client.cnf | 14 ++ .../etc/my.cnf.d/cracklib_password_check.cnf | 2 + .../36/etc/my.cnf.d/enable_encryption.preset | 20 +++ .../Fedora/36/etc/my.cnf.d/mariadb-server.cnf | 59 +++++++ .../Fedora/36/etc/my.cnf.d/mysql-clients.cnf | 23 +++ templates/Fedora/36/etc/my.cnf.d/spider.cnf | 7 + .../Fedora/36/etc/phpMyAdmin/config.inc.php | 153 ++++++++++++++++++ .../systemd/system/mariadb-copytls.service | 11 ++ .../lib/systemd/system/mariadb-copytls.timer | 8 + .../36/usr/lib/systemd/system/mariadb.service | 64 ++++++++ .../usr/lib/systemd/system/mariadb@.service | 85 ++++++++++ vars/Fedora-36-default.yml | 100 ++++++++++++ 15 files changed, 605 insertions(+) create mode 100644 templates/Fedora/36/etc/httpd/conf.d/phpMyAdmin.conf create mode 100644 templates/Fedora/36/etc/my.cnf create mode 100644 templates/Fedora/36/etc/my.cnf.d/auth_gssapi.cnf create mode 100644 templates/Fedora/36/etc/my.cnf.d/client.cnf create mode 100644 templates/Fedora/36/etc/my.cnf.d/cracklib_password_check.cnf create mode 100644 templates/Fedora/36/etc/my.cnf.d/enable_encryption.preset create mode 100644 templates/Fedora/36/etc/my.cnf.d/mariadb-server.cnf create mode 100644 templates/Fedora/36/etc/my.cnf.d/mysql-clients.cnf create mode 100644 templates/Fedora/36/etc/my.cnf.d/spider.cnf create mode 100644 templates/Fedora/36/etc/phpMyAdmin/config.inc.php create mode 100644 templates/Fedora/36/usr/lib/systemd/system/mariadb-copytls.service create mode 100644 templates/Fedora/36/usr/lib/systemd/system/mariadb-copytls.timer create mode 100644 templates/Fedora/36/usr/lib/systemd/system/mariadb.service create mode 100644 templates/Fedora/36/usr/lib/systemd/system/mariadb@.service create mode 100644 vars/Fedora-36-default.yml diff --git a/templates/Fedora/36/etc/httpd/conf.d/phpMyAdmin.conf b/templates/Fedora/36/etc/httpd/conf.d/phpMyAdmin.conf new file mode 100644 index 0000000..98738c7 --- /dev/null +++ b/templates/Fedora/36/etc/httpd/conf.d/phpMyAdmin.conf @@ -0,0 +1,46 @@ +# phpMyAdmin - Web based MySQL browser written in php +# +# Allows only localhost by default +# +# But allowing phpMyAdmin to anyone other than localhost should be considered +# dangerous unless properly secured by SSL + +Alias /phpMyAdmin /usr/share/phpMyAdmin +Alias /phpmyadmin /usr/share/phpMyAdmin + + + AddDefaultCharset UTF-8 + Require ssl + + + + Require local + + +# These directories do not require access over HTTP - taken from the original +# phpMyAdmin upstream tarball +# + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + +# This configuration prevents mod_security at phpMyAdmin directories from +# filtering SQL etc. This may break your mod_security implementation. +# +# +# +# SecRuleInheritance Off +# +# diff --git a/templates/Fedora/36/etc/my.cnf b/templates/Fedora/36/etc/my.cnf new file mode 100644 index 0000000..913b88f --- /dev/null +++ b/templates/Fedora/36/etc/my.cnf @@ -0,0 +1,11 @@ +# +# This group is read both both by the client and the server +# use it for options that affect everything +# +[client-server] + +# +# include all files from the config directory +# +!includedir /etc/my.cnf.d + diff --git a/templates/Fedora/36/etc/my.cnf.d/auth_gssapi.cnf b/templates/Fedora/36/etc/my.cnf.d/auth_gssapi.cnf new file mode 100644 index 0000000..c7cbc78 --- /dev/null +++ b/templates/Fedora/36/etc/my.cnf.d/auth_gssapi.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=auth_gssapi.so diff --git a/templates/Fedora/36/etc/my.cnf.d/client.cnf b/templates/Fedora/36/etc/my.cnf.d/client.cnf new file mode 100644 index 0000000..05442bf --- /dev/null +++ b/templates/Fedora/36/etc/my.cnf.d/client.cnf @@ -0,0 +1,14 @@ +# +# These two groups are read by the client library +# Use it for options that affect all clients, but not the server +# +[client] +default-character-set = utf8mb4 + +# This group is not read by mysql client library, +# If you use the same .cnf file for MySQL and MariaDB, +# use it for MariaDB-only client options +[client-mariadb] +ssl +ssl-verify-server-cert + diff --git a/templates/Fedora/36/etc/my.cnf.d/cracklib_password_check.cnf b/templates/Fedora/36/etc/my.cnf.d/cracklib_password_check.cnf new file mode 100644 index 0000000..72cbcb1 --- /dev/null +++ b/templates/Fedora/36/etc/my.cnf.d/cracklib_password_check.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=cracklib_password_check.so diff --git a/templates/Fedora/36/etc/my.cnf.d/enable_encryption.preset b/templates/Fedora/36/etc/my.cnf.d/enable_encryption.preset new file mode 100644 index 0000000..722db7e --- /dev/null +++ b/templates/Fedora/36/etc/my.cnf.d/enable_encryption.preset @@ -0,0 +1,20 @@ +# +# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d) +# and it will enable data at rest encryption. This is a simple way to +# ensure that everything that can be encrypted will be and your +# data will not leak unencrypted. +# +# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a +# newer version and your edits will be lost. Instead, add your edits +# to the .cnf file after the !include directive. +# +# NOTE that you also need to install an encryption plugin for the encryption +# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management +# +[mariadb] +aria-encrypt-tables +encrypt-binlog +encrypt-tmp-disk-tables +encrypt-tmp-files +loose-innodb-encrypt-log +loose-innodb-encrypt-tables diff --git a/templates/Fedora/36/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/36/etc/my.cnf.d/mariadb-server.cnf new file mode 100644 index 0000000..7239135 --- /dev/null +++ b/templates/Fedora/36/etc/my.cnf.d/mariadb-server.cnf @@ -0,0 +1,59 @@ +# +# These groups are read by MariaDB server. +# Use it for options that only the server (but not clients) should see +# +# See the examples of server my.cnf files in /usr/share/mysql/ +# + +# this is read by the standalone daemon and embedded servers +[server] + +# this is only for the mysqld standalone daemon +# Settings user and group are ignored when systemd is used. +# If you need to run mysqld under a different user or group, +# customize your systemd unit file for mysqld/mariadb according to the +# instructions in http://fedoraproject.org/wiki/Systemd +[mysqld] +datadir=/var/lib/mysql +socket=/var/lib/mysql/mysql.sock +log-error=/var/log/mariadb/mariadb.log +pid-file=/run/mariadb/mariadb.pid +character-set-server = utf8mb4 +ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm +ssl-key=/etc/my.cnf.d/certificates/privkey.epm +tls-version=TLSv1.2,TLSv1.3 + + +# +# * Galera-related settings +# +[galera] +# Mandatory settings +#wsrep_on=ON +#wsrep_provider= +#wsrep_cluster_address= +#binlog_format=row +#default_storage_engine=InnoDB +#innodb_autoinc_lock_mode=2 +# +# Allow server to accept connections on all interfaces. +# +#bind-address=0.0.0.0 +# +# Optional setting +#wsrep_slave_threads=1 +#innodb_flush_log_at_trx_commit=0 + +# this is only for embedded server +[embedded] + +# This group is only read by MariaDB servers, not by MySQL. +# If you use the same .cnf file for MySQL and MariaDB, +# you can put MariaDB-only options here +[mariadb] + +# This group is only read by MariaDB-10.5 servers. +# If you use the same .cnf file for MariaDB of different versions, +# use this group for options that older servers don't understand +[mariadb-10.5] + diff --git a/templates/Fedora/36/etc/my.cnf.d/mysql-clients.cnf b/templates/Fedora/36/etc/my.cnf.d/mysql-clients.cnf new file mode 100644 index 0000000..3df9b7b --- /dev/null +++ b/templates/Fedora/36/etc/my.cnf.d/mysql-clients.cnf @@ -0,0 +1,23 @@ +# +# These groups are read by MariaDB command-line tools +# Use it for options that affect only one utility +# + +[mysql] + +[mysql_upgrade] + +[mysqladmin] + +[mysqlbinlog] + +[mysqlcheck] + +[mysqldump] + +[mysqlimport] + +[mysqlshow] + +[mysqlslap] + diff --git a/templates/Fedora/36/etc/my.cnf.d/spider.cnf b/templates/Fedora/36/etc/my.cnf.d/spider.cnf new file mode 100644 index 0000000..ebc9968 --- /dev/null +++ b/templates/Fedora/36/etc/my.cnf.d/spider.cnf @@ -0,0 +1,7 @@ +[mariadb] +# +# Uncomment line to enable +# +#plugin-load-add = ha_spider + +# Read more at https://mariadb.com/kb/en/spider/ diff --git a/templates/Fedora/36/etc/phpMyAdmin/config.inc.php b/templates/Fedora/36/etc/phpMyAdmin/config.inc.php new file mode 100644 index 0000000..b973a14 --- /dev/null +++ b/templates/Fedora/36/etc/phpMyAdmin/config.inc.php @@ -0,0 +1,153 @@ +. + */ + +declare(strict_types=1); + +/** + * This is needed for cookie based authentication to encrypt password in + * cookie. Needs to be 32 chars long. + */ +$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ + +/** + * Servers configuration + */ +$i = 0; + +/** + * First server + */ +$i++; +/* Authentication type */ +$cfg['Servers'][$i]['auth_type'] = 'cookie'; +/* Server parameters */ +$cfg['Servers'][$i]['host'] = 'localhost'; +$cfg['Servers'][$i]['compress'] = false; +$cfg['Servers'][$i]['AllowNoPassword'] = false; + +/** + * phpMyAdmin configuration storage settings. + */ + +/* User used to manipulate with storage */ +// $cfg['Servers'][$i]['controlhost'] = ''; +// $cfg['Servers'][$i]['controlport'] = ''; +// $cfg['Servers'][$i]['controluser'] = 'pma'; +// $cfg['Servers'][$i]['controlpass'] = 'pmapass'; + +/* Storage database and tables */ +// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; +// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; +// $cfg['Servers'][$i]['relation'] = 'pma__relation'; +// $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; +// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; +// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; +// $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; +// $cfg['Servers'][$i]['history'] = 'pma__history'; +// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; +// $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; +// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; +// $cfg['Servers'][$i]['recent'] = 'pma__recent'; +// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; +// $cfg['Servers'][$i]['users'] = 'pma__users'; +// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; +// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; +// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; +// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; +// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; +// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; + +/** + * End of servers configuration + */ + +/** + * Directories for saving/loading files from server + */ +$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload'; +$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; + +/** + * Whether to display icons or text or both icons and text in table row + * action segment. Value can be either of 'icons', 'text' or 'both'. + * default = 'both' + */ +//$cfg['RowActionType'] = 'icons'; + +/** + * Defines whether a user should be displayed a "show all (records)" + * button in browse mode or not. + * default = false + */ +//$cfg['ShowAll'] = true; + +/** + * Number of rows displayed when browsing a result set. If the result + * set contains more rows, "Previous" and "Next". + * Possible values: 25, 50, 100, 250, 500 + * default = 25 + */ +//$cfg['MaxRows'] = 50; + +/** + * Disallow editing of binary fields + * valid values are: + * false allow editing + * 'blob' allow editing except for BLOB fields + * 'noblob' disallow editing except for BLOB fields + * 'all' disallow editing + * default = 'blob' + */ +//$cfg['ProtectBinary'] = false; + +/** + * Default language to use, if not browser-defined or user-defined + * (you find all languages in the locale folder) + * uncomment the desired line: + * default = 'en' + */ +//$cfg['DefaultLang'] = 'en'; +//$cfg['DefaultLang'] = 'de'; + +/** + * How many columns should be used for table display of a database? + * (a value larger than 1 results in some information being hidden) + * default = 1 + */ +//$cfg['PropertiesNumColumns'] = 2; + +/** + * Set to true if you want DB-based query history.If false, this utilizes + * JS-routines to display query history (lost by window close) + * + * This requires configuration storage enabled, see above. + * default = false + */ +//$cfg['QueryHistoryDB'] = true; + +/** + * When using DB-based query history, how many entries should be kept? + * default = 25 + */ +//$cfg['QueryHistoryMax'] = 100; + +/** + * Whether or not to query the user before sending the error report to + * the phpMyAdmin team when a JavaScript error occurs + * + * Available options + * ('ask' | 'always' | 'never') + * default = 'ask' + */ +//$cfg['SendErrorReports'] = 'always'; + +/** + * You can find more configuration options in the documentation + * in the doc/ folder or at . + */ diff --git a/templates/Fedora/36/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/36/usr/lib/systemd/system/mariadb-copytls.service new file mode 100644 index 0000000..3f63078 --- /dev/null +++ b/templates/Fedora/36/usr/lib/systemd/system/mariadb-copytls.service @@ -0,0 +1,11 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Service] +Type=oneshot +ExecStartPre=mkdir -p /etc/my.cnf.d/certificates +ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/{{ mariadb_vhost }}/*.pem /etc/my.cnf.d/certificates/' +ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/36/usr/lib/systemd/system/mariadb-copytls.timer b/templates/Fedora/36/usr/lib/systemd/system/mariadb-copytls.timer new file mode 100644 index 0000000..8e5ad7b --- /dev/null +++ b/templates/Fedora/36/usr/lib/systemd/system/mariadb-copytls.timer @@ -0,0 +1,8 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Timer] +OnUnitActiveSec=5min + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/36/usr/lib/systemd/system/mariadb.service b/templates/Fedora/36/usr/lib/systemd/system/mariadb.service new file mode 100644 index 0000000..d61fd82 --- /dev/null +++ b/templates/Fedora/36/usr/lib/systemd/system/mariadb.service @@ -0,0 +1,64 @@ +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, the +# best way is to: +# +# root> systemctl edit mariadb.service +# +# Then add additonal directives under a section (probably [Service]). +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 +# + +[Unit] +Description=MariaDB 10.5 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket +# '%n' expands to 'Full unit name'; man systemd.unit +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/templates/Fedora/36/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/36/usr/lib/systemd/system/mariadb@.service new file mode 100644 index 0000000..10ca8fd --- /dev/null +++ b/templates/Fedora/36/usr/lib/systemd/system/mariadb@.service @@ -0,0 +1,85 @@ +# Multi instance version of MariaDB. For if you run mutiple verions at once. +# Also used for mariadb@bootstrap to bootstrap Galera. +# +# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in +# /etc/@my.cnf to change per instance settings. A minimumal necessary +# configuration items to change to avoid conflicts between instances is: +# +# [mariadbd.instancename] +# # TCP port to make available for clients +# port=3306 +# # Socket to make available for clients +# socket=/tmp/mariadb-instancename.sock +# # Where MariaDB should store all its data +# datadir=/usr/local/mariadb-instancename/data +# +# and start the service via: +# +# root> systemctl start mariadb@{instancename}.server +# +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, for +# all instances, the best way is: +# +# root> systemctl edit mariadb@.service +# +# Then add additonal directives under a section (probably [Service]). +# +# If you only want to change a specific instance: +# +# root> systemctl edit mariadb@{instancename}.server +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 + +[Unit] +Description=MariaDB 10.5 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/vars/Fedora-36-default.yml b/vars/Fedora-36-default.yml new file mode 100644 index 0000000..be65d9f --- /dev/null +++ b/vars/Fedora-36-default.yml @@ -0,0 +1,100 @@ +--- +# vars file for ensure_mariadb +package_list: + - name: 'mariadb' + state: 'present' + - name: 'mariadb-server' + state: 'present' + - name: 'phpMyAdmin' + state: 'present' +firewall_list: + - permanent: 'yes' + service: 'mysql' + state: 'enabled' +service_list: + - name: 'httpd.service' + state: 'started' + enabled: 'yes' + - name: 'httpd-reload.timer' + state: 'started' + enabled: 'yes' + - name: 'php-fpm.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb-copytls.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb.service' + state: 'started' + enabled: 'yes' +template_list: + - dest: '/etc/my.cnf.d/client.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' + - dest: '/etc/my.cnf.d/mariadb-server.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' + - dest: '/etc/my.cnf.d/mysql-clients.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' + - dest: '/etc/my.cnf.d/spider.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' + - dest: '/etc/my.cnf.d/enable_encryption.preset' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' + - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' + - dest: '/etc/my.cnf.d/auth_gssapi.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' + - dest: '/etc/phpMyAdmin/config.inc.php' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' + - dest: '/etc/my.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' + - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' + - dest: '/usr/lib/systemd/system/mariadb.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' + - dest: '/usr/lib/systemd/system/mariadb@.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' + - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' + - dest: '/usr/lib/systemd/system/mariadb-copytls.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' From 064eecaec171f66536bf4a9da69097359c333a82 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Tue, 6 Dec 2022 21:55:08 -0600 Subject: [PATCH 21/40] Add Fedora 37 --- .../37/etc/httpd/conf.d/phpMyAdmin.conf | 46 ++++++ templates/Fedora/37/etc/my.cnf | 11 ++ .../Fedora/37/etc/my.cnf.d/auth_gssapi.cnf | 2 + templates/Fedora/37/etc/my.cnf.d/client.cnf | 14 ++ .../etc/my.cnf.d/cracklib_password_check.cnf | 2 + .../37/etc/my.cnf.d/enable_encryption.preset | 20 +++ .../Fedora/37/etc/my.cnf.d/mariadb-server.cnf | 59 +++++++ .../Fedora/37/etc/my.cnf.d/mysql-clients.cnf | 23 +++ templates/Fedora/37/etc/my.cnf.d/spider.cnf | 7 + .../Fedora/37/etc/phpMyAdmin/config.inc.php | 153 ++++++++++++++++++ .../systemd/system/mariadb-copytls.service | 11 ++ .../lib/systemd/system/mariadb-copytls.timer | 8 + .../37/usr/lib/systemd/system/mariadb.service | 64 ++++++++ .../usr/lib/systemd/system/mariadb@.service | 85 ++++++++++ vars/Fedora-37-default.yml | 100 ++++++++++++ 15 files changed, 605 insertions(+) create mode 100644 templates/Fedora/37/etc/httpd/conf.d/phpMyAdmin.conf create mode 100644 templates/Fedora/37/etc/my.cnf create mode 100644 templates/Fedora/37/etc/my.cnf.d/auth_gssapi.cnf create mode 100644 templates/Fedora/37/etc/my.cnf.d/client.cnf create mode 100644 templates/Fedora/37/etc/my.cnf.d/cracklib_password_check.cnf create mode 100644 templates/Fedora/37/etc/my.cnf.d/enable_encryption.preset create mode 100644 templates/Fedora/37/etc/my.cnf.d/mariadb-server.cnf create mode 100644 templates/Fedora/37/etc/my.cnf.d/mysql-clients.cnf create mode 100644 templates/Fedora/37/etc/my.cnf.d/spider.cnf create mode 100644 templates/Fedora/37/etc/phpMyAdmin/config.inc.php create mode 100644 templates/Fedora/37/usr/lib/systemd/system/mariadb-copytls.service create mode 100644 templates/Fedora/37/usr/lib/systemd/system/mariadb-copytls.timer create mode 100644 templates/Fedora/37/usr/lib/systemd/system/mariadb.service create mode 100644 templates/Fedora/37/usr/lib/systemd/system/mariadb@.service create mode 100644 vars/Fedora-37-default.yml diff --git a/templates/Fedora/37/etc/httpd/conf.d/phpMyAdmin.conf b/templates/Fedora/37/etc/httpd/conf.d/phpMyAdmin.conf new file mode 100644 index 0000000..98738c7 --- /dev/null +++ b/templates/Fedora/37/etc/httpd/conf.d/phpMyAdmin.conf @@ -0,0 +1,46 @@ +# phpMyAdmin - Web based MySQL browser written in php +# +# Allows only localhost by default +# +# But allowing phpMyAdmin to anyone other than localhost should be considered +# dangerous unless properly secured by SSL + +Alias /phpMyAdmin /usr/share/phpMyAdmin +Alias /phpmyadmin /usr/share/phpMyAdmin + + + AddDefaultCharset UTF-8 + Require ssl + + + + Require local + + +# These directories do not require access over HTTP - taken from the original +# phpMyAdmin upstream tarball +# + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + +# This configuration prevents mod_security at phpMyAdmin directories from +# filtering SQL etc. This may break your mod_security implementation. +# +# +# +# SecRuleInheritance Off +# +# diff --git a/templates/Fedora/37/etc/my.cnf b/templates/Fedora/37/etc/my.cnf new file mode 100644 index 0000000..913b88f --- /dev/null +++ b/templates/Fedora/37/etc/my.cnf @@ -0,0 +1,11 @@ +# +# This group is read both both by the client and the server +# use it for options that affect everything +# +[client-server] + +# +# include all files from the config directory +# +!includedir /etc/my.cnf.d + diff --git a/templates/Fedora/37/etc/my.cnf.d/auth_gssapi.cnf b/templates/Fedora/37/etc/my.cnf.d/auth_gssapi.cnf new file mode 100644 index 0000000..c7cbc78 --- /dev/null +++ b/templates/Fedora/37/etc/my.cnf.d/auth_gssapi.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=auth_gssapi.so diff --git a/templates/Fedora/37/etc/my.cnf.d/client.cnf b/templates/Fedora/37/etc/my.cnf.d/client.cnf new file mode 100644 index 0000000..05442bf --- /dev/null +++ b/templates/Fedora/37/etc/my.cnf.d/client.cnf @@ -0,0 +1,14 @@ +# +# These two groups are read by the client library +# Use it for options that affect all clients, but not the server +# +[client] +default-character-set = utf8mb4 + +# This group is not read by mysql client library, +# If you use the same .cnf file for MySQL and MariaDB, +# use it for MariaDB-only client options +[client-mariadb] +ssl +ssl-verify-server-cert + diff --git a/templates/Fedora/37/etc/my.cnf.d/cracklib_password_check.cnf b/templates/Fedora/37/etc/my.cnf.d/cracklib_password_check.cnf new file mode 100644 index 0000000..72cbcb1 --- /dev/null +++ b/templates/Fedora/37/etc/my.cnf.d/cracklib_password_check.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=cracklib_password_check.so diff --git a/templates/Fedora/37/etc/my.cnf.d/enable_encryption.preset b/templates/Fedora/37/etc/my.cnf.d/enable_encryption.preset new file mode 100644 index 0000000..722db7e --- /dev/null +++ b/templates/Fedora/37/etc/my.cnf.d/enable_encryption.preset @@ -0,0 +1,20 @@ +# +# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d) +# and it will enable data at rest encryption. This is a simple way to +# ensure that everything that can be encrypted will be and your +# data will not leak unencrypted. +# +# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a +# newer version and your edits will be lost. Instead, add your edits +# to the .cnf file after the !include directive. +# +# NOTE that you also need to install an encryption plugin for the encryption +# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management +# +[mariadb] +aria-encrypt-tables +encrypt-binlog +encrypt-tmp-disk-tables +encrypt-tmp-files +loose-innodb-encrypt-log +loose-innodb-encrypt-tables diff --git a/templates/Fedora/37/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/37/etc/my.cnf.d/mariadb-server.cnf new file mode 100644 index 0000000..7239135 --- /dev/null +++ b/templates/Fedora/37/etc/my.cnf.d/mariadb-server.cnf @@ -0,0 +1,59 @@ +# +# These groups are read by MariaDB server. +# Use it for options that only the server (but not clients) should see +# +# See the examples of server my.cnf files in /usr/share/mysql/ +# + +# this is read by the standalone daemon and embedded servers +[server] + +# this is only for the mysqld standalone daemon +# Settings user and group are ignored when systemd is used. +# If you need to run mysqld under a different user or group, +# customize your systemd unit file for mysqld/mariadb according to the +# instructions in http://fedoraproject.org/wiki/Systemd +[mysqld] +datadir=/var/lib/mysql +socket=/var/lib/mysql/mysql.sock +log-error=/var/log/mariadb/mariadb.log +pid-file=/run/mariadb/mariadb.pid +character-set-server = utf8mb4 +ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm +ssl-key=/etc/my.cnf.d/certificates/privkey.epm +tls-version=TLSv1.2,TLSv1.3 + + +# +# * Galera-related settings +# +[galera] +# Mandatory settings +#wsrep_on=ON +#wsrep_provider= +#wsrep_cluster_address= +#binlog_format=row +#default_storage_engine=InnoDB +#innodb_autoinc_lock_mode=2 +# +# Allow server to accept connections on all interfaces. +# +#bind-address=0.0.0.0 +# +# Optional setting +#wsrep_slave_threads=1 +#innodb_flush_log_at_trx_commit=0 + +# this is only for embedded server +[embedded] + +# This group is only read by MariaDB servers, not by MySQL. +# If you use the same .cnf file for MySQL and MariaDB, +# you can put MariaDB-only options here +[mariadb] + +# This group is only read by MariaDB-10.5 servers. +# If you use the same .cnf file for MariaDB of different versions, +# use this group for options that older servers don't understand +[mariadb-10.5] + diff --git a/templates/Fedora/37/etc/my.cnf.d/mysql-clients.cnf b/templates/Fedora/37/etc/my.cnf.d/mysql-clients.cnf new file mode 100644 index 0000000..3df9b7b --- /dev/null +++ b/templates/Fedora/37/etc/my.cnf.d/mysql-clients.cnf @@ -0,0 +1,23 @@ +# +# These groups are read by MariaDB command-line tools +# Use it for options that affect only one utility +# + +[mysql] + +[mysql_upgrade] + +[mysqladmin] + +[mysqlbinlog] + +[mysqlcheck] + +[mysqldump] + +[mysqlimport] + +[mysqlshow] + +[mysqlslap] + diff --git a/templates/Fedora/37/etc/my.cnf.d/spider.cnf b/templates/Fedora/37/etc/my.cnf.d/spider.cnf new file mode 100644 index 0000000..ebc9968 --- /dev/null +++ b/templates/Fedora/37/etc/my.cnf.d/spider.cnf @@ -0,0 +1,7 @@ +[mariadb] +# +# Uncomment line to enable +# +#plugin-load-add = ha_spider + +# Read more at https://mariadb.com/kb/en/spider/ diff --git a/templates/Fedora/37/etc/phpMyAdmin/config.inc.php b/templates/Fedora/37/etc/phpMyAdmin/config.inc.php new file mode 100644 index 0000000..b973a14 --- /dev/null +++ b/templates/Fedora/37/etc/phpMyAdmin/config.inc.php @@ -0,0 +1,153 @@ +. + */ + +declare(strict_types=1); + +/** + * This is needed for cookie based authentication to encrypt password in + * cookie. Needs to be 32 chars long. + */ +$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ + +/** + * Servers configuration + */ +$i = 0; + +/** + * First server + */ +$i++; +/* Authentication type */ +$cfg['Servers'][$i]['auth_type'] = 'cookie'; +/* Server parameters */ +$cfg['Servers'][$i]['host'] = 'localhost'; +$cfg['Servers'][$i]['compress'] = false; +$cfg['Servers'][$i]['AllowNoPassword'] = false; + +/** + * phpMyAdmin configuration storage settings. + */ + +/* User used to manipulate with storage */ +// $cfg['Servers'][$i]['controlhost'] = ''; +// $cfg['Servers'][$i]['controlport'] = ''; +// $cfg['Servers'][$i]['controluser'] = 'pma'; +// $cfg['Servers'][$i]['controlpass'] = 'pmapass'; + +/* Storage database and tables */ +// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; +// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; +// $cfg['Servers'][$i]['relation'] = 'pma__relation'; +// $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; +// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; +// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; +// $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; +// $cfg['Servers'][$i]['history'] = 'pma__history'; +// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; +// $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; +// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; +// $cfg['Servers'][$i]['recent'] = 'pma__recent'; +// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; +// $cfg['Servers'][$i]['users'] = 'pma__users'; +// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; +// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; +// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; +// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; +// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; +// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; + +/** + * End of servers configuration + */ + +/** + * Directories for saving/loading files from server + */ +$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload'; +$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; + +/** + * Whether to display icons or text or both icons and text in table row + * action segment. Value can be either of 'icons', 'text' or 'both'. + * default = 'both' + */ +//$cfg['RowActionType'] = 'icons'; + +/** + * Defines whether a user should be displayed a "show all (records)" + * button in browse mode or not. + * default = false + */ +//$cfg['ShowAll'] = true; + +/** + * Number of rows displayed when browsing a result set. If the result + * set contains more rows, "Previous" and "Next". + * Possible values: 25, 50, 100, 250, 500 + * default = 25 + */ +//$cfg['MaxRows'] = 50; + +/** + * Disallow editing of binary fields + * valid values are: + * false allow editing + * 'blob' allow editing except for BLOB fields + * 'noblob' disallow editing except for BLOB fields + * 'all' disallow editing + * default = 'blob' + */ +//$cfg['ProtectBinary'] = false; + +/** + * Default language to use, if not browser-defined or user-defined + * (you find all languages in the locale folder) + * uncomment the desired line: + * default = 'en' + */ +//$cfg['DefaultLang'] = 'en'; +//$cfg['DefaultLang'] = 'de'; + +/** + * How many columns should be used for table display of a database? + * (a value larger than 1 results in some information being hidden) + * default = 1 + */ +//$cfg['PropertiesNumColumns'] = 2; + +/** + * Set to true if you want DB-based query history.If false, this utilizes + * JS-routines to display query history (lost by window close) + * + * This requires configuration storage enabled, see above. + * default = false + */ +//$cfg['QueryHistoryDB'] = true; + +/** + * When using DB-based query history, how many entries should be kept? + * default = 25 + */ +//$cfg['QueryHistoryMax'] = 100; + +/** + * Whether or not to query the user before sending the error report to + * the phpMyAdmin team when a JavaScript error occurs + * + * Available options + * ('ask' | 'always' | 'never') + * default = 'ask' + */ +//$cfg['SendErrorReports'] = 'always'; + +/** + * You can find more configuration options in the documentation + * in the doc/ folder or at . + */ diff --git a/templates/Fedora/37/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/37/usr/lib/systemd/system/mariadb-copytls.service new file mode 100644 index 0000000..3f63078 --- /dev/null +++ b/templates/Fedora/37/usr/lib/systemd/system/mariadb-copytls.service @@ -0,0 +1,11 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Service] +Type=oneshot +ExecStartPre=mkdir -p /etc/my.cnf.d/certificates +ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/{{ mariadb_vhost }}/*.pem /etc/my.cnf.d/certificates/' +ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/37/usr/lib/systemd/system/mariadb-copytls.timer b/templates/Fedora/37/usr/lib/systemd/system/mariadb-copytls.timer new file mode 100644 index 0000000..8e5ad7b --- /dev/null +++ b/templates/Fedora/37/usr/lib/systemd/system/mariadb-copytls.timer @@ -0,0 +1,8 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Timer] +OnUnitActiveSec=5min + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/37/usr/lib/systemd/system/mariadb.service b/templates/Fedora/37/usr/lib/systemd/system/mariadb.service new file mode 100644 index 0000000..d61fd82 --- /dev/null +++ b/templates/Fedora/37/usr/lib/systemd/system/mariadb.service @@ -0,0 +1,64 @@ +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, the +# best way is to: +# +# root> systemctl edit mariadb.service +# +# Then add additonal directives under a section (probably [Service]). +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 +# + +[Unit] +Description=MariaDB 10.5 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket +# '%n' expands to 'Full unit name'; man systemd.unit +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/templates/Fedora/37/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/37/usr/lib/systemd/system/mariadb@.service new file mode 100644 index 0000000..10ca8fd --- /dev/null +++ b/templates/Fedora/37/usr/lib/systemd/system/mariadb@.service @@ -0,0 +1,85 @@ +# Multi instance version of MariaDB. For if you run mutiple verions at once. +# Also used for mariadb@bootstrap to bootstrap Galera. +# +# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in +# /etc/@my.cnf to change per instance settings. A minimumal necessary +# configuration items to change to avoid conflicts between instances is: +# +# [mariadbd.instancename] +# # TCP port to make available for clients +# port=3306 +# # Socket to make available for clients +# socket=/tmp/mariadb-instancename.sock +# # Where MariaDB should store all its data +# datadir=/usr/local/mariadb-instancename/data +# +# and start the service via: +# +# root> systemctl start mariadb@{instancename}.server +# +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, for +# all instances, the best way is: +# +# root> systemctl edit mariadb@.service +# +# Then add additonal directives under a section (probably [Service]). +# +# If you only want to change a specific instance: +# +# root> systemctl edit mariadb@{instancename}.server +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 + +[Unit] +Description=MariaDB 10.5 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/vars/Fedora-37-default.yml b/vars/Fedora-37-default.yml new file mode 100644 index 0000000..be65d9f --- /dev/null +++ b/vars/Fedora-37-default.yml @@ -0,0 +1,100 @@ +--- +# vars file for ensure_mariadb +package_list: + - name: 'mariadb' + state: 'present' + - name: 'mariadb-server' + state: 'present' + - name: 'phpMyAdmin' + state: 'present' +firewall_list: + - permanent: 'yes' + service: 'mysql' + state: 'enabled' +service_list: + - name: 'httpd.service' + state: 'started' + enabled: 'yes' + - name: 'httpd-reload.timer' + state: 'started' + enabled: 'yes' + - name: 'php-fpm.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb-copytls.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb.service' + state: 'started' + enabled: 'yes' +template_list: + - dest: '/etc/my.cnf.d/client.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' + - dest: '/etc/my.cnf.d/mariadb-server.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' + - dest: '/etc/my.cnf.d/mysql-clients.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' + - dest: '/etc/my.cnf.d/spider.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' + - dest: '/etc/my.cnf.d/enable_encryption.preset' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' + - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' + - dest: '/etc/my.cnf.d/auth_gssapi.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' + - dest: '/etc/phpMyAdmin/config.inc.php' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' + - dest: '/etc/my.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' + - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' + - dest: '/usr/lib/systemd/system/mariadb.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' + - dest: '/usr/lib/systemd/system/mariadb@.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' + - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' + - dest: '/usr/lib/systemd/system/mariadb-copytls.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' From 24294e708b44d891ea00e09a6e62be70ce497a75 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 30 Apr 2023 17:47:39 -0500 Subject: [PATCH 22/40] Add Fedora 38 --- .../38/etc/httpd/conf.d/phpMyAdmin.conf | 46 ++++++ templates/Fedora/38/etc/my.cnf | 11 ++ .../Fedora/38/etc/my.cnf.d/auth_gssapi.cnf | 2 + templates/Fedora/38/etc/my.cnf.d/client.cnf | 14 ++ .../etc/my.cnf.d/cracklib_password_check.cnf | 2 + .../38/etc/my.cnf.d/enable_encryption.preset | 20 +++ .../Fedora/38/etc/my.cnf.d/mariadb-server.cnf | 59 +++++++ .../Fedora/38/etc/my.cnf.d/mysql-clients.cnf | 23 +++ templates/Fedora/38/etc/my.cnf.d/spider.cnf | 7 + .../Fedora/38/etc/phpMyAdmin/config.inc.php | 153 ++++++++++++++++++ .../systemd/system/mariadb-copytls.service | 11 ++ .../lib/systemd/system/mariadb-copytls.timer | 8 + .../38/usr/lib/systemd/system/mariadb.service | 64 ++++++++ .../usr/lib/systemd/system/mariadb@.service | 85 ++++++++++ vars/Fedora-38-default.yml | 100 ++++++++++++ 15 files changed, 605 insertions(+) create mode 100644 templates/Fedora/38/etc/httpd/conf.d/phpMyAdmin.conf create mode 100644 templates/Fedora/38/etc/my.cnf create mode 100644 templates/Fedora/38/etc/my.cnf.d/auth_gssapi.cnf create mode 100644 templates/Fedora/38/etc/my.cnf.d/client.cnf create mode 100644 templates/Fedora/38/etc/my.cnf.d/cracklib_password_check.cnf create mode 100644 templates/Fedora/38/etc/my.cnf.d/enable_encryption.preset create mode 100644 templates/Fedora/38/etc/my.cnf.d/mariadb-server.cnf create mode 100644 templates/Fedora/38/etc/my.cnf.d/mysql-clients.cnf create mode 100644 templates/Fedora/38/etc/my.cnf.d/spider.cnf create mode 100644 templates/Fedora/38/etc/phpMyAdmin/config.inc.php create mode 100644 templates/Fedora/38/usr/lib/systemd/system/mariadb-copytls.service create mode 100644 templates/Fedora/38/usr/lib/systemd/system/mariadb-copytls.timer create mode 100644 templates/Fedora/38/usr/lib/systemd/system/mariadb.service create mode 100644 templates/Fedora/38/usr/lib/systemd/system/mariadb@.service create mode 100644 vars/Fedora-38-default.yml diff --git a/templates/Fedora/38/etc/httpd/conf.d/phpMyAdmin.conf b/templates/Fedora/38/etc/httpd/conf.d/phpMyAdmin.conf new file mode 100644 index 0000000..98738c7 --- /dev/null +++ b/templates/Fedora/38/etc/httpd/conf.d/phpMyAdmin.conf @@ -0,0 +1,46 @@ +# phpMyAdmin - Web based MySQL browser written in php +# +# Allows only localhost by default +# +# But allowing phpMyAdmin to anyone other than localhost should be considered +# dangerous unless properly secured by SSL + +Alias /phpMyAdmin /usr/share/phpMyAdmin +Alias /phpmyadmin /usr/share/phpMyAdmin + + + AddDefaultCharset UTF-8 + Require ssl + + + + Require local + + +# These directories do not require access over HTTP - taken from the original +# phpMyAdmin upstream tarball +# + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + +# This configuration prevents mod_security at phpMyAdmin directories from +# filtering SQL etc. This may break your mod_security implementation. +# +# +# +# SecRuleInheritance Off +# +# diff --git a/templates/Fedora/38/etc/my.cnf b/templates/Fedora/38/etc/my.cnf new file mode 100644 index 0000000..913b88f --- /dev/null +++ b/templates/Fedora/38/etc/my.cnf @@ -0,0 +1,11 @@ +# +# This group is read both both by the client and the server +# use it for options that affect everything +# +[client-server] + +# +# include all files from the config directory +# +!includedir /etc/my.cnf.d + diff --git a/templates/Fedora/38/etc/my.cnf.d/auth_gssapi.cnf b/templates/Fedora/38/etc/my.cnf.d/auth_gssapi.cnf new file mode 100644 index 0000000..c7cbc78 --- /dev/null +++ b/templates/Fedora/38/etc/my.cnf.d/auth_gssapi.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=auth_gssapi.so diff --git a/templates/Fedora/38/etc/my.cnf.d/client.cnf b/templates/Fedora/38/etc/my.cnf.d/client.cnf new file mode 100644 index 0000000..05442bf --- /dev/null +++ b/templates/Fedora/38/etc/my.cnf.d/client.cnf @@ -0,0 +1,14 @@ +# +# These two groups are read by the client library +# Use it for options that affect all clients, but not the server +# +[client] +default-character-set = utf8mb4 + +# This group is not read by mysql client library, +# If you use the same .cnf file for MySQL and MariaDB, +# use it for MariaDB-only client options +[client-mariadb] +ssl +ssl-verify-server-cert + diff --git a/templates/Fedora/38/etc/my.cnf.d/cracklib_password_check.cnf b/templates/Fedora/38/etc/my.cnf.d/cracklib_password_check.cnf new file mode 100644 index 0000000..72cbcb1 --- /dev/null +++ b/templates/Fedora/38/etc/my.cnf.d/cracklib_password_check.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=cracklib_password_check.so diff --git a/templates/Fedora/38/etc/my.cnf.d/enable_encryption.preset b/templates/Fedora/38/etc/my.cnf.d/enable_encryption.preset new file mode 100644 index 0000000..722db7e --- /dev/null +++ b/templates/Fedora/38/etc/my.cnf.d/enable_encryption.preset @@ -0,0 +1,20 @@ +# +# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d) +# and it will enable data at rest encryption. This is a simple way to +# ensure that everything that can be encrypted will be and your +# data will not leak unencrypted. +# +# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a +# newer version and your edits will be lost. Instead, add your edits +# to the .cnf file after the !include directive. +# +# NOTE that you also need to install an encryption plugin for the encryption +# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management +# +[mariadb] +aria-encrypt-tables +encrypt-binlog +encrypt-tmp-disk-tables +encrypt-tmp-files +loose-innodb-encrypt-log +loose-innodb-encrypt-tables diff --git a/templates/Fedora/38/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/38/etc/my.cnf.d/mariadb-server.cnf new file mode 100644 index 0000000..7239135 --- /dev/null +++ b/templates/Fedora/38/etc/my.cnf.d/mariadb-server.cnf @@ -0,0 +1,59 @@ +# +# These groups are read by MariaDB server. +# Use it for options that only the server (but not clients) should see +# +# See the examples of server my.cnf files in /usr/share/mysql/ +# + +# this is read by the standalone daemon and embedded servers +[server] + +# this is only for the mysqld standalone daemon +# Settings user and group are ignored when systemd is used. +# If you need to run mysqld under a different user or group, +# customize your systemd unit file for mysqld/mariadb according to the +# instructions in http://fedoraproject.org/wiki/Systemd +[mysqld] +datadir=/var/lib/mysql +socket=/var/lib/mysql/mysql.sock +log-error=/var/log/mariadb/mariadb.log +pid-file=/run/mariadb/mariadb.pid +character-set-server = utf8mb4 +ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm +ssl-key=/etc/my.cnf.d/certificates/privkey.epm +tls-version=TLSv1.2,TLSv1.3 + + +# +# * Galera-related settings +# +[galera] +# Mandatory settings +#wsrep_on=ON +#wsrep_provider= +#wsrep_cluster_address= +#binlog_format=row +#default_storage_engine=InnoDB +#innodb_autoinc_lock_mode=2 +# +# Allow server to accept connections on all interfaces. +# +#bind-address=0.0.0.0 +# +# Optional setting +#wsrep_slave_threads=1 +#innodb_flush_log_at_trx_commit=0 + +# this is only for embedded server +[embedded] + +# This group is only read by MariaDB servers, not by MySQL. +# If you use the same .cnf file for MySQL and MariaDB, +# you can put MariaDB-only options here +[mariadb] + +# This group is only read by MariaDB-10.5 servers. +# If you use the same .cnf file for MariaDB of different versions, +# use this group for options that older servers don't understand +[mariadb-10.5] + diff --git a/templates/Fedora/38/etc/my.cnf.d/mysql-clients.cnf b/templates/Fedora/38/etc/my.cnf.d/mysql-clients.cnf new file mode 100644 index 0000000..3df9b7b --- /dev/null +++ b/templates/Fedora/38/etc/my.cnf.d/mysql-clients.cnf @@ -0,0 +1,23 @@ +# +# These groups are read by MariaDB command-line tools +# Use it for options that affect only one utility +# + +[mysql] + +[mysql_upgrade] + +[mysqladmin] + +[mysqlbinlog] + +[mysqlcheck] + +[mysqldump] + +[mysqlimport] + +[mysqlshow] + +[mysqlslap] + diff --git a/templates/Fedora/38/etc/my.cnf.d/spider.cnf b/templates/Fedora/38/etc/my.cnf.d/spider.cnf new file mode 100644 index 0000000..ebc9968 --- /dev/null +++ b/templates/Fedora/38/etc/my.cnf.d/spider.cnf @@ -0,0 +1,7 @@ +[mariadb] +# +# Uncomment line to enable +# +#plugin-load-add = ha_spider + +# Read more at https://mariadb.com/kb/en/spider/ diff --git a/templates/Fedora/38/etc/phpMyAdmin/config.inc.php b/templates/Fedora/38/etc/phpMyAdmin/config.inc.php new file mode 100644 index 0000000..b973a14 --- /dev/null +++ b/templates/Fedora/38/etc/phpMyAdmin/config.inc.php @@ -0,0 +1,153 @@ +. + */ + +declare(strict_types=1); + +/** + * This is needed for cookie based authentication to encrypt password in + * cookie. Needs to be 32 chars long. + */ +$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ + +/** + * Servers configuration + */ +$i = 0; + +/** + * First server + */ +$i++; +/* Authentication type */ +$cfg['Servers'][$i]['auth_type'] = 'cookie'; +/* Server parameters */ +$cfg['Servers'][$i]['host'] = 'localhost'; +$cfg['Servers'][$i]['compress'] = false; +$cfg['Servers'][$i]['AllowNoPassword'] = false; + +/** + * phpMyAdmin configuration storage settings. + */ + +/* User used to manipulate with storage */ +// $cfg['Servers'][$i]['controlhost'] = ''; +// $cfg['Servers'][$i]['controlport'] = ''; +// $cfg['Servers'][$i]['controluser'] = 'pma'; +// $cfg['Servers'][$i]['controlpass'] = 'pmapass'; + +/* Storage database and tables */ +// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; +// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; +// $cfg['Servers'][$i]['relation'] = 'pma__relation'; +// $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; +// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; +// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; +// $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; +// $cfg['Servers'][$i]['history'] = 'pma__history'; +// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; +// $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; +// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; +// $cfg['Servers'][$i]['recent'] = 'pma__recent'; +// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; +// $cfg['Servers'][$i]['users'] = 'pma__users'; +// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; +// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; +// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; +// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; +// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; +// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; + +/** + * End of servers configuration + */ + +/** + * Directories for saving/loading files from server + */ +$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload'; +$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; + +/** + * Whether to display icons or text or both icons and text in table row + * action segment. Value can be either of 'icons', 'text' or 'both'. + * default = 'both' + */ +//$cfg['RowActionType'] = 'icons'; + +/** + * Defines whether a user should be displayed a "show all (records)" + * button in browse mode or not. + * default = false + */ +//$cfg['ShowAll'] = true; + +/** + * Number of rows displayed when browsing a result set. If the result + * set contains more rows, "Previous" and "Next". + * Possible values: 25, 50, 100, 250, 500 + * default = 25 + */ +//$cfg['MaxRows'] = 50; + +/** + * Disallow editing of binary fields + * valid values are: + * false allow editing + * 'blob' allow editing except for BLOB fields + * 'noblob' disallow editing except for BLOB fields + * 'all' disallow editing + * default = 'blob' + */ +//$cfg['ProtectBinary'] = false; + +/** + * Default language to use, if not browser-defined or user-defined + * (you find all languages in the locale folder) + * uncomment the desired line: + * default = 'en' + */ +//$cfg['DefaultLang'] = 'en'; +//$cfg['DefaultLang'] = 'de'; + +/** + * How many columns should be used for table display of a database? + * (a value larger than 1 results in some information being hidden) + * default = 1 + */ +//$cfg['PropertiesNumColumns'] = 2; + +/** + * Set to true if you want DB-based query history.If false, this utilizes + * JS-routines to display query history (lost by window close) + * + * This requires configuration storage enabled, see above. + * default = false + */ +//$cfg['QueryHistoryDB'] = true; + +/** + * When using DB-based query history, how many entries should be kept? + * default = 25 + */ +//$cfg['QueryHistoryMax'] = 100; + +/** + * Whether or not to query the user before sending the error report to + * the phpMyAdmin team when a JavaScript error occurs + * + * Available options + * ('ask' | 'always' | 'never') + * default = 'ask' + */ +//$cfg['SendErrorReports'] = 'always'; + +/** + * You can find more configuration options in the documentation + * in the doc/ folder or at . + */ diff --git a/templates/Fedora/38/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/38/usr/lib/systemd/system/mariadb-copytls.service new file mode 100644 index 0000000..3f63078 --- /dev/null +++ b/templates/Fedora/38/usr/lib/systemd/system/mariadb-copytls.service @@ -0,0 +1,11 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Service] +Type=oneshot +ExecStartPre=mkdir -p /etc/my.cnf.d/certificates +ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/{{ mariadb_vhost }}/*.pem /etc/my.cnf.d/certificates/' +ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/38/usr/lib/systemd/system/mariadb-copytls.timer b/templates/Fedora/38/usr/lib/systemd/system/mariadb-copytls.timer new file mode 100644 index 0000000..8e5ad7b --- /dev/null +++ b/templates/Fedora/38/usr/lib/systemd/system/mariadb-copytls.timer @@ -0,0 +1,8 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Timer] +OnUnitActiveSec=5min + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/38/usr/lib/systemd/system/mariadb.service b/templates/Fedora/38/usr/lib/systemd/system/mariadb.service new file mode 100644 index 0000000..d61fd82 --- /dev/null +++ b/templates/Fedora/38/usr/lib/systemd/system/mariadb.service @@ -0,0 +1,64 @@ +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, the +# best way is to: +# +# root> systemctl edit mariadb.service +# +# Then add additonal directives under a section (probably [Service]). +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 +# + +[Unit] +Description=MariaDB 10.5 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket +# '%n' expands to 'Full unit name'; man systemd.unit +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/templates/Fedora/38/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/38/usr/lib/systemd/system/mariadb@.service new file mode 100644 index 0000000..10ca8fd --- /dev/null +++ b/templates/Fedora/38/usr/lib/systemd/system/mariadb@.service @@ -0,0 +1,85 @@ +# Multi instance version of MariaDB. For if you run mutiple verions at once. +# Also used for mariadb@bootstrap to bootstrap Galera. +# +# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in +# /etc/@my.cnf to change per instance settings. A minimumal necessary +# configuration items to change to avoid conflicts between instances is: +# +# [mariadbd.instancename] +# # TCP port to make available for clients +# port=3306 +# # Socket to make available for clients +# socket=/tmp/mariadb-instancename.sock +# # Where MariaDB should store all its data +# datadir=/usr/local/mariadb-instancename/data +# +# and start the service via: +# +# root> systemctl start mariadb@{instancename}.server +# +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, for +# all instances, the best way is: +# +# root> systemctl edit mariadb@.service +# +# Then add additonal directives under a section (probably [Service]). +# +# If you only want to change a specific instance: +# +# root> systemctl edit mariadb@{instancename}.server +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 + +[Unit] +Description=MariaDB 10.5 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/vars/Fedora-38-default.yml b/vars/Fedora-38-default.yml new file mode 100644 index 0000000..be65d9f --- /dev/null +++ b/vars/Fedora-38-default.yml @@ -0,0 +1,100 @@ +--- +# vars file for ensure_mariadb +package_list: + - name: 'mariadb' + state: 'present' + - name: 'mariadb-server' + state: 'present' + - name: 'phpMyAdmin' + state: 'present' +firewall_list: + - permanent: 'yes' + service: 'mysql' + state: 'enabled' +service_list: + - name: 'httpd.service' + state: 'started' + enabled: 'yes' + - name: 'httpd-reload.timer' + state: 'started' + enabled: 'yes' + - name: 'php-fpm.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb-copytls.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb.service' + state: 'started' + enabled: 'yes' +template_list: + - dest: '/etc/my.cnf.d/client.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' + - dest: '/etc/my.cnf.d/mariadb-server.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' + - dest: '/etc/my.cnf.d/mysql-clients.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' + - dest: '/etc/my.cnf.d/spider.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' + - dest: '/etc/my.cnf.d/enable_encryption.preset' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' + - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' + - dest: '/etc/my.cnf.d/auth_gssapi.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' + - dest: '/etc/phpMyAdmin/config.inc.php' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' + - dest: '/etc/my.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' + - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' + - dest: '/usr/lib/systemd/system/mariadb.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' + - dest: '/usr/lib/systemd/system/mariadb@.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' + - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' + - dest: '/usr/lib/systemd/system/mariadb-copytls.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' From 3db2f145e1c3a512e949c9e5f0742c6e57c344b5 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sat, 16 Mar 2024 21:01:52 -0500 Subject: [PATCH 23/40] Add Fedora 39 --- .../39/etc/httpd/conf.d/phpMyAdmin.conf | 46 ++++++ templates/Fedora/39/etc/my.cnf | 11 ++ .../Fedora/39/etc/my.cnf.d/auth_gssapi.cnf | 2 + templates/Fedora/39/etc/my.cnf.d/client.cnf | 14 ++ .../etc/my.cnf.d/cracklib_password_check.cnf | 2 + .../39/etc/my.cnf.d/enable_encryption.preset | 20 +++ .../Fedora/39/etc/my.cnf.d/mariadb-server.cnf | 59 +++++++ .../Fedora/39/etc/my.cnf.d/mysql-clients.cnf | 23 +++ templates/Fedora/39/etc/my.cnf.d/spider.cnf | 7 + .../Fedora/39/etc/phpMyAdmin/config.inc.php | 153 ++++++++++++++++++ .../systemd/system/mariadb-copytls.service | 11 ++ .../lib/systemd/system/mariadb-copytls.timer | 8 + .../39/usr/lib/systemd/system/mariadb.service | 64 ++++++++ .../usr/lib/systemd/system/mariadb@.service | 85 ++++++++++ vars/Fedora-39-default.yml | 100 ++++++++++++ 15 files changed, 605 insertions(+) create mode 100644 templates/Fedora/39/etc/httpd/conf.d/phpMyAdmin.conf create mode 100644 templates/Fedora/39/etc/my.cnf create mode 100644 templates/Fedora/39/etc/my.cnf.d/auth_gssapi.cnf create mode 100644 templates/Fedora/39/etc/my.cnf.d/client.cnf create mode 100644 templates/Fedora/39/etc/my.cnf.d/cracklib_password_check.cnf create mode 100644 templates/Fedora/39/etc/my.cnf.d/enable_encryption.preset create mode 100644 templates/Fedora/39/etc/my.cnf.d/mariadb-server.cnf create mode 100644 templates/Fedora/39/etc/my.cnf.d/mysql-clients.cnf create mode 100644 templates/Fedora/39/etc/my.cnf.d/spider.cnf create mode 100644 templates/Fedora/39/etc/phpMyAdmin/config.inc.php create mode 100644 templates/Fedora/39/usr/lib/systemd/system/mariadb-copytls.service create mode 100644 templates/Fedora/39/usr/lib/systemd/system/mariadb-copytls.timer create mode 100644 templates/Fedora/39/usr/lib/systemd/system/mariadb.service create mode 100644 templates/Fedora/39/usr/lib/systemd/system/mariadb@.service create mode 100644 vars/Fedora-39-default.yml diff --git a/templates/Fedora/39/etc/httpd/conf.d/phpMyAdmin.conf b/templates/Fedora/39/etc/httpd/conf.d/phpMyAdmin.conf new file mode 100644 index 0000000..98738c7 --- /dev/null +++ b/templates/Fedora/39/etc/httpd/conf.d/phpMyAdmin.conf @@ -0,0 +1,46 @@ +# phpMyAdmin - Web based MySQL browser written in php +# +# Allows only localhost by default +# +# But allowing phpMyAdmin to anyone other than localhost should be considered +# dangerous unless properly secured by SSL + +Alias /phpMyAdmin /usr/share/phpMyAdmin +Alias /phpmyadmin /usr/share/phpMyAdmin + + + AddDefaultCharset UTF-8 + Require ssl + + + + Require local + + +# These directories do not require access over HTTP - taken from the original +# phpMyAdmin upstream tarball +# + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + +# This configuration prevents mod_security at phpMyAdmin directories from +# filtering SQL etc. This may break your mod_security implementation. +# +# +# +# SecRuleInheritance Off +# +# diff --git a/templates/Fedora/39/etc/my.cnf b/templates/Fedora/39/etc/my.cnf new file mode 100644 index 0000000..913b88f --- /dev/null +++ b/templates/Fedora/39/etc/my.cnf @@ -0,0 +1,11 @@ +# +# This group is read both both by the client and the server +# use it for options that affect everything +# +[client-server] + +# +# include all files from the config directory +# +!includedir /etc/my.cnf.d + diff --git a/templates/Fedora/39/etc/my.cnf.d/auth_gssapi.cnf b/templates/Fedora/39/etc/my.cnf.d/auth_gssapi.cnf new file mode 100644 index 0000000..c7cbc78 --- /dev/null +++ b/templates/Fedora/39/etc/my.cnf.d/auth_gssapi.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=auth_gssapi.so diff --git a/templates/Fedora/39/etc/my.cnf.d/client.cnf b/templates/Fedora/39/etc/my.cnf.d/client.cnf new file mode 100644 index 0000000..05442bf --- /dev/null +++ b/templates/Fedora/39/etc/my.cnf.d/client.cnf @@ -0,0 +1,14 @@ +# +# These two groups are read by the client library +# Use it for options that affect all clients, but not the server +# +[client] +default-character-set = utf8mb4 + +# This group is not read by mysql client library, +# If you use the same .cnf file for MySQL and MariaDB, +# use it for MariaDB-only client options +[client-mariadb] +ssl +ssl-verify-server-cert + diff --git a/templates/Fedora/39/etc/my.cnf.d/cracklib_password_check.cnf b/templates/Fedora/39/etc/my.cnf.d/cracklib_password_check.cnf new file mode 100644 index 0000000..72cbcb1 --- /dev/null +++ b/templates/Fedora/39/etc/my.cnf.d/cracklib_password_check.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=cracklib_password_check.so diff --git a/templates/Fedora/39/etc/my.cnf.d/enable_encryption.preset b/templates/Fedora/39/etc/my.cnf.d/enable_encryption.preset new file mode 100644 index 0000000..722db7e --- /dev/null +++ b/templates/Fedora/39/etc/my.cnf.d/enable_encryption.preset @@ -0,0 +1,20 @@ +# +# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d) +# and it will enable data at rest encryption. This is a simple way to +# ensure that everything that can be encrypted will be and your +# data will not leak unencrypted. +# +# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a +# newer version and your edits will be lost. Instead, add your edits +# to the .cnf file after the !include directive. +# +# NOTE that you also need to install an encryption plugin for the encryption +# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management +# +[mariadb] +aria-encrypt-tables +encrypt-binlog +encrypt-tmp-disk-tables +encrypt-tmp-files +loose-innodb-encrypt-log +loose-innodb-encrypt-tables diff --git a/templates/Fedora/39/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/39/etc/my.cnf.d/mariadb-server.cnf new file mode 100644 index 0000000..7239135 --- /dev/null +++ b/templates/Fedora/39/etc/my.cnf.d/mariadb-server.cnf @@ -0,0 +1,59 @@ +# +# These groups are read by MariaDB server. +# Use it for options that only the server (but not clients) should see +# +# See the examples of server my.cnf files in /usr/share/mysql/ +# + +# this is read by the standalone daemon and embedded servers +[server] + +# this is only for the mysqld standalone daemon +# Settings user and group are ignored when systemd is used. +# If you need to run mysqld under a different user or group, +# customize your systemd unit file for mysqld/mariadb according to the +# instructions in http://fedoraproject.org/wiki/Systemd +[mysqld] +datadir=/var/lib/mysql +socket=/var/lib/mysql/mysql.sock +log-error=/var/log/mariadb/mariadb.log +pid-file=/run/mariadb/mariadb.pid +character-set-server = utf8mb4 +ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm +ssl-key=/etc/my.cnf.d/certificates/privkey.epm +tls-version=TLSv1.2,TLSv1.3 + + +# +# * Galera-related settings +# +[galera] +# Mandatory settings +#wsrep_on=ON +#wsrep_provider= +#wsrep_cluster_address= +#binlog_format=row +#default_storage_engine=InnoDB +#innodb_autoinc_lock_mode=2 +# +# Allow server to accept connections on all interfaces. +# +#bind-address=0.0.0.0 +# +# Optional setting +#wsrep_slave_threads=1 +#innodb_flush_log_at_trx_commit=0 + +# this is only for embedded server +[embedded] + +# This group is only read by MariaDB servers, not by MySQL. +# If you use the same .cnf file for MySQL and MariaDB, +# you can put MariaDB-only options here +[mariadb] + +# This group is only read by MariaDB-10.5 servers. +# If you use the same .cnf file for MariaDB of different versions, +# use this group for options that older servers don't understand +[mariadb-10.5] + diff --git a/templates/Fedora/39/etc/my.cnf.d/mysql-clients.cnf b/templates/Fedora/39/etc/my.cnf.d/mysql-clients.cnf new file mode 100644 index 0000000..3df9b7b --- /dev/null +++ b/templates/Fedora/39/etc/my.cnf.d/mysql-clients.cnf @@ -0,0 +1,23 @@ +# +# These groups are read by MariaDB command-line tools +# Use it for options that affect only one utility +# + +[mysql] + +[mysql_upgrade] + +[mysqladmin] + +[mysqlbinlog] + +[mysqlcheck] + +[mysqldump] + +[mysqlimport] + +[mysqlshow] + +[mysqlslap] + diff --git a/templates/Fedora/39/etc/my.cnf.d/spider.cnf b/templates/Fedora/39/etc/my.cnf.d/spider.cnf new file mode 100644 index 0000000..ebc9968 --- /dev/null +++ b/templates/Fedora/39/etc/my.cnf.d/spider.cnf @@ -0,0 +1,7 @@ +[mariadb] +# +# Uncomment line to enable +# +#plugin-load-add = ha_spider + +# Read more at https://mariadb.com/kb/en/spider/ diff --git a/templates/Fedora/39/etc/phpMyAdmin/config.inc.php b/templates/Fedora/39/etc/phpMyAdmin/config.inc.php new file mode 100644 index 0000000..b973a14 --- /dev/null +++ b/templates/Fedora/39/etc/phpMyAdmin/config.inc.php @@ -0,0 +1,153 @@ +. + */ + +declare(strict_types=1); + +/** + * This is needed for cookie based authentication to encrypt password in + * cookie. Needs to be 32 chars long. + */ +$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ + +/** + * Servers configuration + */ +$i = 0; + +/** + * First server + */ +$i++; +/* Authentication type */ +$cfg['Servers'][$i]['auth_type'] = 'cookie'; +/* Server parameters */ +$cfg['Servers'][$i]['host'] = 'localhost'; +$cfg['Servers'][$i]['compress'] = false; +$cfg['Servers'][$i]['AllowNoPassword'] = false; + +/** + * phpMyAdmin configuration storage settings. + */ + +/* User used to manipulate with storage */ +// $cfg['Servers'][$i]['controlhost'] = ''; +// $cfg['Servers'][$i]['controlport'] = ''; +// $cfg['Servers'][$i]['controluser'] = 'pma'; +// $cfg['Servers'][$i]['controlpass'] = 'pmapass'; + +/* Storage database and tables */ +// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; +// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; +// $cfg['Servers'][$i]['relation'] = 'pma__relation'; +// $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; +// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; +// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; +// $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; +// $cfg['Servers'][$i]['history'] = 'pma__history'; +// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; +// $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; +// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; +// $cfg['Servers'][$i]['recent'] = 'pma__recent'; +// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; +// $cfg['Servers'][$i]['users'] = 'pma__users'; +// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; +// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; +// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; +// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; +// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; +// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; + +/** + * End of servers configuration + */ + +/** + * Directories for saving/loading files from server + */ +$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload'; +$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; + +/** + * Whether to display icons or text or both icons and text in table row + * action segment. Value can be either of 'icons', 'text' or 'both'. + * default = 'both' + */ +//$cfg['RowActionType'] = 'icons'; + +/** + * Defines whether a user should be displayed a "show all (records)" + * button in browse mode or not. + * default = false + */ +//$cfg['ShowAll'] = true; + +/** + * Number of rows displayed when browsing a result set. If the result + * set contains more rows, "Previous" and "Next". + * Possible values: 25, 50, 100, 250, 500 + * default = 25 + */ +//$cfg['MaxRows'] = 50; + +/** + * Disallow editing of binary fields + * valid values are: + * false allow editing + * 'blob' allow editing except for BLOB fields + * 'noblob' disallow editing except for BLOB fields + * 'all' disallow editing + * default = 'blob' + */ +//$cfg['ProtectBinary'] = false; + +/** + * Default language to use, if not browser-defined or user-defined + * (you find all languages in the locale folder) + * uncomment the desired line: + * default = 'en' + */ +//$cfg['DefaultLang'] = 'en'; +//$cfg['DefaultLang'] = 'de'; + +/** + * How many columns should be used for table display of a database? + * (a value larger than 1 results in some information being hidden) + * default = 1 + */ +//$cfg['PropertiesNumColumns'] = 2; + +/** + * Set to true if you want DB-based query history.If false, this utilizes + * JS-routines to display query history (lost by window close) + * + * This requires configuration storage enabled, see above. + * default = false + */ +//$cfg['QueryHistoryDB'] = true; + +/** + * When using DB-based query history, how many entries should be kept? + * default = 25 + */ +//$cfg['QueryHistoryMax'] = 100; + +/** + * Whether or not to query the user before sending the error report to + * the phpMyAdmin team when a JavaScript error occurs + * + * Available options + * ('ask' | 'always' | 'never') + * default = 'ask' + */ +//$cfg['SendErrorReports'] = 'always'; + +/** + * You can find more configuration options in the documentation + * in the doc/ folder or at . + */ diff --git a/templates/Fedora/39/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/39/usr/lib/systemd/system/mariadb-copytls.service new file mode 100644 index 0000000..3f63078 --- /dev/null +++ b/templates/Fedora/39/usr/lib/systemd/system/mariadb-copytls.service @@ -0,0 +1,11 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Service] +Type=oneshot +ExecStartPre=mkdir -p /etc/my.cnf.d/certificates +ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/{{ mariadb_vhost }}/*.pem /etc/my.cnf.d/certificates/' +ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/39/usr/lib/systemd/system/mariadb-copytls.timer b/templates/Fedora/39/usr/lib/systemd/system/mariadb-copytls.timer new file mode 100644 index 0000000..8e5ad7b --- /dev/null +++ b/templates/Fedora/39/usr/lib/systemd/system/mariadb-copytls.timer @@ -0,0 +1,8 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Timer] +OnUnitActiveSec=5min + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/39/usr/lib/systemd/system/mariadb.service b/templates/Fedora/39/usr/lib/systemd/system/mariadb.service new file mode 100644 index 0000000..d61fd82 --- /dev/null +++ b/templates/Fedora/39/usr/lib/systemd/system/mariadb.service @@ -0,0 +1,64 @@ +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, the +# best way is to: +# +# root> systemctl edit mariadb.service +# +# Then add additonal directives under a section (probably [Service]). +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 +# + +[Unit] +Description=MariaDB 10.5 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket +# '%n' expands to 'Full unit name'; man systemd.unit +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/templates/Fedora/39/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/39/usr/lib/systemd/system/mariadb@.service new file mode 100644 index 0000000..10ca8fd --- /dev/null +++ b/templates/Fedora/39/usr/lib/systemd/system/mariadb@.service @@ -0,0 +1,85 @@ +# Multi instance version of MariaDB. For if you run mutiple verions at once. +# Also used for mariadb@bootstrap to bootstrap Galera. +# +# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in +# /etc/@my.cnf to change per instance settings. A minimumal necessary +# configuration items to change to avoid conflicts between instances is: +# +# [mariadbd.instancename] +# # TCP port to make available for clients +# port=3306 +# # Socket to make available for clients +# socket=/tmp/mariadb-instancename.sock +# # Where MariaDB should store all its data +# datadir=/usr/local/mariadb-instancename/data +# +# and start the service via: +# +# root> systemctl start mariadb@{instancename}.server +# +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, for +# all instances, the best way is: +# +# root> systemctl edit mariadb@.service +# +# Then add additonal directives under a section (probably [Service]). +# +# If you only want to change a specific instance: +# +# root> systemctl edit mariadb@{instancename}.server +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 + +[Unit] +Description=MariaDB 10.5 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/vars/Fedora-39-default.yml b/vars/Fedora-39-default.yml new file mode 100644 index 0000000..be65d9f --- /dev/null +++ b/vars/Fedora-39-default.yml @@ -0,0 +1,100 @@ +--- +# vars file for ensure_mariadb +package_list: + - name: 'mariadb' + state: 'present' + - name: 'mariadb-server' + state: 'present' + - name: 'phpMyAdmin' + state: 'present' +firewall_list: + - permanent: 'yes' + service: 'mysql' + state: 'enabled' +service_list: + - name: 'httpd.service' + state: 'started' + enabled: 'yes' + - name: 'httpd-reload.timer' + state: 'started' + enabled: 'yes' + - name: 'php-fpm.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb-copytls.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb.service' + state: 'started' + enabled: 'yes' +template_list: + - dest: '/etc/my.cnf.d/client.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' + - dest: '/etc/my.cnf.d/mariadb-server.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' + - dest: '/etc/my.cnf.d/mysql-clients.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' + - dest: '/etc/my.cnf.d/spider.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' + - dest: '/etc/my.cnf.d/enable_encryption.preset' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' + - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' + - dest: '/etc/my.cnf.d/auth_gssapi.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' + - dest: '/etc/phpMyAdmin/config.inc.php' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' + - dest: '/etc/my.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' + - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' + - dest: '/usr/lib/systemd/system/mariadb.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' + - dest: '/usr/lib/systemd/system/mariadb@.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' + - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' + - dest: '/usr/lib/systemd/system/mariadb-copytls.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' From ec4475ef23261edaf690428c2e313cb4c60f2e40 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 2 Jun 2024 12:19:36 -0500 Subject: [PATCH 24/40] Fedora 40 support Signed-off-by: Jason Rothstein --- .../40/etc/httpd/conf.d/phpMyAdmin.conf | 46 ++++++ templates/Fedora/40/etc/my.cnf | 11 ++ .../Fedora/40/etc/my.cnf.d/auth_gssapi.cnf | 2 + templates/Fedora/40/etc/my.cnf.d/client.cnf | 14 ++ .../etc/my.cnf.d/cracklib_password_check.cnf | 2 + .../40/etc/my.cnf.d/enable_encryption.preset | 20 +++ .../Fedora/40/etc/my.cnf.d/mariadb-server.cnf | 59 +++++++ .../Fedora/40/etc/my.cnf.d/mysql-clients.cnf | 23 +++ templates/Fedora/40/etc/my.cnf.d/spider.cnf | 7 + .../Fedora/40/etc/phpMyAdmin/config.inc.php | 153 ++++++++++++++++++ .../systemd/system/mariadb-copytls.service | 11 ++ .../lib/systemd/system/mariadb-copytls.timer | 8 + .../40/usr/lib/systemd/system/mariadb.service | 64 ++++++++ .../usr/lib/systemd/system/mariadb@.service | 85 ++++++++++ vars/Fedora-40-default.yml | 100 ++++++++++++ 15 files changed, 605 insertions(+) create mode 100644 templates/Fedora/40/etc/httpd/conf.d/phpMyAdmin.conf create mode 100644 templates/Fedora/40/etc/my.cnf create mode 100644 templates/Fedora/40/etc/my.cnf.d/auth_gssapi.cnf create mode 100644 templates/Fedora/40/etc/my.cnf.d/client.cnf create mode 100644 templates/Fedora/40/etc/my.cnf.d/cracklib_password_check.cnf create mode 100644 templates/Fedora/40/etc/my.cnf.d/enable_encryption.preset create mode 100644 templates/Fedora/40/etc/my.cnf.d/mariadb-server.cnf create mode 100644 templates/Fedora/40/etc/my.cnf.d/mysql-clients.cnf create mode 100644 templates/Fedora/40/etc/my.cnf.d/spider.cnf create mode 100644 templates/Fedora/40/etc/phpMyAdmin/config.inc.php create mode 100644 templates/Fedora/40/usr/lib/systemd/system/mariadb-copytls.service create mode 100644 templates/Fedora/40/usr/lib/systemd/system/mariadb-copytls.timer create mode 100644 templates/Fedora/40/usr/lib/systemd/system/mariadb.service create mode 100644 templates/Fedora/40/usr/lib/systemd/system/mariadb@.service create mode 100644 vars/Fedora-40-default.yml diff --git a/templates/Fedora/40/etc/httpd/conf.d/phpMyAdmin.conf b/templates/Fedora/40/etc/httpd/conf.d/phpMyAdmin.conf new file mode 100644 index 0000000..98738c7 --- /dev/null +++ b/templates/Fedora/40/etc/httpd/conf.d/phpMyAdmin.conf @@ -0,0 +1,46 @@ +# phpMyAdmin - Web based MySQL browser written in php +# +# Allows only localhost by default +# +# But allowing phpMyAdmin to anyone other than localhost should be considered +# dangerous unless properly secured by SSL + +Alias /phpMyAdmin /usr/share/phpMyAdmin +Alias /phpmyadmin /usr/share/phpMyAdmin + + + AddDefaultCharset UTF-8 + Require ssl + + + + Require local + + +# These directories do not require access over HTTP - taken from the original +# phpMyAdmin upstream tarball +# + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + +# This configuration prevents mod_security at phpMyAdmin directories from +# filtering SQL etc. This may break your mod_security implementation. +# +# +# +# SecRuleInheritance Off +# +# diff --git a/templates/Fedora/40/etc/my.cnf b/templates/Fedora/40/etc/my.cnf new file mode 100644 index 0000000..913b88f --- /dev/null +++ b/templates/Fedora/40/etc/my.cnf @@ -0,0 +1,11 @@ +# +# This group is read both both by the client and the server +# use it for options that affect everything +# +[client-server] + +# +# include all files from the config directory +# +!includedir /etc/my.cnf.d + diff --git a/templates/Fedora/40/etc/my.cnf.d/auth_gssapi.cnf b/templates/Fedora/40/etc/my.cnf.d/auth_gssapi.cnf new file mode 100644 index 0000000..c7cbc78 --- /dev/null +++ b/templates/Fedora/40/etc/my.cnf.d/auth_gssapi.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=auth_gssapi.so diff --git a/templates/Fedora/40/etc/my.cnf.d/client.cnf b/templates/Fedora/40/etc/my.cnf.d/client.cnf new file mode 100644 index 0000000..05442bf --- /dev/null +++ b/templates/Fedora/40/etc/my.cnf.d/client.cnf @@ -0,0 +1,14 @@ +# +# These two groups are read by the client library +# Use it for options that affect all clients, but not the server +# +[client] +default-character-set = utf8mb4 + +# This group is not read by mysql client library, +# If you use the same .cnf file for MySQL and MariaDB, +# use it for MariaDB-only client options +[client-mariadb] +ssl +ssl-verify-server-cert + diff --git a/templates/Fedora/40/etc/my.cnf.d/cracklib_password_check.cnf b/templates/Fedora/40/etc/my.cnf.d/cracklib_password_check.cnf new file mode 100644 index 0000000..72cbcb1 --- /dev/null +++ b/templates/Fedora/40/etc/my.cnf.d/cracklib_password_check.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=cracklib_password_check.so diff --git a/templates/Fedora/40/etc/my.cnf.d/enable_encryption.preset b/templates/Fedora/40/etc/my.cnf.d/enable_encryption.preset new file mode 100644 index 0000000..722db7e --- /dev/null +++ b/templates/Fedora/40/etc/my.cnf.d/enable_encryption.preset @@ -0,0 +1,20 @@ +# +# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d) +# and it will enable data at rest encryption. This is a simple way to +# ensure that everything that can be encrypted will be and your +# data will not leak unencrypted. +# +# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a +# newer version and your edits will be lost. Instead, add your edits +# to the .cnf file after the !include directive. +# +# NOTE that you also need to install an encryption plugin for the encryption +# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management +# +[mariadb] +aria-encrypt-tables +encrypt-binlog +encrypt-tmp-disk-tables +encrypt-tmp-files +loose-innodb-encrypt-log +loose-innodb-encrypt-tables diff --git a/templates/Fedora/40/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/40/etc/my.cnf.d/mariadb-server.cnf new file mode 100644 index 0000000..7239135 --- /dev/null +++ b/templates/Fedora/40/etc/my.cnf.d/mariadb-server.cnf @@ -0,0 +1,59 @@ +# +# These groups are read by MariaDB server. +# Use it for options that only the server (but not clients) should see +# +# See the examples of server my.cnf files in /usr/share/mysql/ +# + +# this is read by the standalone daemon and embedded servers +[server] + +# this is only for the mysqld standalone daemon +# Settings user and group are ignored when systemd is used. +# If you need to run mysqld under a different user or group, +# customize your systemd unit file for mysqld/mariadb according to the +# instructions in http://fedoraproject.org/wiki/Systemd +[mysqld] +datadir=/var/lib/mysql +socket=/var/lib/mysql/mysql.sock +log-error=/var/log/mariadb/mariadb.log +pid-file=/run/mariadb/mariadb.pid +character-set-server = utf8mb4 +ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm +ssl-key=/etc/my.cnf.d/certificates/privkey.epm +tls-version=TLSv1.2,TLSv1.3 + + +# +# * Galera-related settings +# +[galera] +# Mandatory settings +#wsrep_on=ON +#wsrep_provider= +#wsrep_cluster_address= +#binlog_format=row +#default_storage_engine=InnoDB +#innodb_autoinc_lock_mode=2 +# +# Allow server to accept connections on all interfaces. +# +#bind-address=0.0.0.0 +# +# Optional setting +#wsrep_slave_threads=1 +#innodb_flush_log_at_trx_commit=0 + +# this is only for embedded server +[embedded] + +# This group is only read by MariaDB servers, not by MySQL. +# If you use the same .cnf file for MySQL and MariaDB, +# you can put MariaDB-only options here +[mariadb] + +# This group is only read by MariaDB-10.5 servers. +# If you use the same .cnf file for MariaDB of different versions, +# use this group for options that older servers don't understand +[mariadb-10.5] + diff --git a/templates/Fedora/40/etc/my.cnf.d/mysql-clients.cnf b/templates/Fedora/40/etc/my.cnf.d/mysql-clients.cnf new file mode 100644 index 0000000..3df9b7b --- /dev/null +++ b/templates/Fedora/40/etc/my.cnf.d/mysql-clients.cnf @@ -0,0 +1,23 @@ +# +# These groups are read by MariaDB command-line tools +# Use it for options that affect only one utility +# + +[mysql] + +[mysql_upgrade] + +[mysqladmin] + +[mysqlbinlog] + +[mysqlcheck] + +[mysqldump] + +[mysqlimport] + +[mysqlshow] + +[mysqlslap] + diff --git a/templates/Fedora/40/etc/my.cnf.d/spider.cnf b/templates/Fedora/40/etc/my.cnf.d/spider.cnf new file mode 100644 index 0000000..ebc9968 --- /dev/null +++ b/templates/Fedora/40/etc/my.cnf.d/spider.cnf @@ -0,0 +1,7 @@ +[mariadb] +# +# Uncomment line to enable +# +#plugin-load-add = ha_spider + +# Read more at https://mariadb.com/kb/en/spider/ diff --git a/templates/Fedora/40/etc/phpMyAdmin/config.inc.php b/templates/Fedora/40/etc/phpMyAdmin/config.inc.php new file mode 100644 index 0000000..b973a14 --- /dev/null +++ b/templates/Fedora/40/etc/phpMyAdmin/config.inc.php @@ -0,0 +1,153 @@ +. + */ + +declare(strict_types=1); + +/** + * This is needed for cookie based authentication to encrypt password in + * cookie. Needs to be 32 chars long. + */ +$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ + +/** + * Servers configuration + */ +$i = 0; + +/** + * First server + */ +$i++; +/* Authentication type */ +$cfg['Servers'][$i]['auth_type'] = 'cookie'; +/* Server parameters */ +$cfg['Servers'][$i]['host'] = 'localhost'; +$cfg['Servers'][$i]['compress'] = false; +$cfg['Servers'][$i]['AllowNoPassword'] = false; + +/** + * phpMyAdmin configuration storage settings. + */ + +/* User used to manipulate with storage */ +// $cfg['Servers'][$i]['controlhost'] = ''; +// $cfg['Servers'][$i]['controlport'] = ''; +// $cfg['Servers'][$i]['controluser'] = 'pma'; +// $cfg['Servers'][$i]['controlpass'] = 'pmapass'; + +/* Storage database and tables */ +// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; +// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; +// $cfg['Servers'][$i]['relation'] = 'pma__relation'; +// $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; +// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; +// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; +// $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; +// $cfg['Servers'][$i]['history'] = 'pma__history'; +// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; +// $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; +// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; +// $cfg['Servers'][$i]['recent'] = 'pma__recent'; +// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; +// $cfg['Servers'][$i]['users'] = 'pma__users'; +// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; +// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; +// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; +// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; +// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; +// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; + +/** + * End of servers configuration + */ + +/** + * Directories for saving/loading files from server + */ +$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload'; +$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; + +/** + * Whether to display icons or text or both icons and text in table row + * action segment. Value can be either of 'icons', 'text' or 'both'. + * default = 'both' + */ +//$cfg['RowActionType'] = 'icons'; + +/** + * Defines whether a user should be displayed a "show all (records)" + * button in browse mode or not. + * default = false + */ +//$cfg['ShowAll'] = true; + +/** + * Number of rows displayed when browsing a result set. If the result + * set contains more rows, "Previous" and "Next". + * Possible values: 25, 50, 100, 250, 500 + * default = 25 + */ +//$cfg['MaxRows'] = 50; + +/** + * Disallow editing of binary fields + * valid values are: + * false allow editing + * 'blob' allow editing except for BLOB fields + * 'noblob' disallow editing except for BLOB fields + * 'all' disallow editing + * default = 'blob' + */ +//$cfg['ProtectBinary'] = false; + +/** + * Default language to use, if not browser-defined or user-defined + * (you find all languages in the locale folder) + * uncomment the desired line: + * default = 'en' + */ +//$cfg['DefaultLang'] = 'en'; +//$cfg['DefaultLang'] = 'de'; + +/** + * How many columns should be used for table display of a database? + * (a value larger than 1 results in some information being hidden) + * default = 1 + */ +//$cfg['PropertiesNumColumns'] = 2; + +/** + * Set to true if you want DB-based query history.If false, this utilizes + * JS-routines to display query history (lost by window close) + * + * This requires configuration storage enabled, see above. + * default = false + */ +//$cfg['QueryHistoryDB'] = true; + +/** + * When using DB-based query history, how many entries should be kept? + * default = 25 + */ +//$cfg['QueryHistoryMax'] = 100; + +/** + * Whether or not to query the user before sending the error report to + * the phpMyAdmin team when a JavaScript error occurs + * + * Available options + * ('ask' | 'always' | 'never') + * default = 'ask' + */ +//$cfg['SendErrorReports'] = 'always'; + +/** + * You can find more configuration options in the documentation + * in the doc/ folder or at . + */ diff --git a/templates/Fedora/40/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/40/usr/lib/systemd/system/mariadb-copytls.service new file mode 100644 index 0000000..3f63078 --- /dev/null +++ b/templates/Fedora/40/usr/lib/systemd/system/mariadb-copytls.service @@ -0,0 +1,11 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Service] +Type=oneshot +ExecStartPre=mkdir -p /etc/my.cnf.d/certificates +ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/{{ mariadb_vhost }}/*.pem /etc/my.cnf.d/certificates/' +ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/40/usr/lib/systemd/system/mariadb-copytls.timer b/templates/Fedora/40/usr/lib/systemd/system/mariadb-copytls.timer new file mode 100644 index 0000000..8e5ad7b --- /dev/null +++ b/templates/Fedora/40/usr/lib/systemd/system/mariadb-copytls.timer @@ -0,0 +1,8 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Timer] +OnUnitActiveSec=5min + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/40/usr/lib/systemd/system/mariadb.service b/templates/Fedora/40/usr/lib/systemd/system/mariadb.service new file mode 100644 index 0000000..d61fd82 --- /dev/null +++ b/templates/Fedora/40/usr/lib/systemd/system/mariadb.service @@ -0,0 +1,64 @@ +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, the +# best way is to: +# +# root> systemctl edit mariadb.service +# +# Then add additonal directives under a section (probably [Service]). +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 +# + +[Unit] +Description=MariaDB 10.5 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket +# '%n' expands to 'Full unit name'; man systemd.unit +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/templates/Fedora/40/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/40/usr/lib/systemd/system/mariadb@.service new file mode 100644 index 0000000..10ca8fd --- /dev/null +++ b/templates/Fedora/40/usr/lib/systemd/system/mariadb@.service @@ -0,0 +1,85 @@ +# Multi instance version of MariaDB. For if you run mutiple verions at once. +# Also used for mariadb@bootstrap to bootstrap Galera. +# +# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in +# /etc/@my.cnf to change per instance settings. A minimumal necessary +# configuration items to change to avoid conflicts between instances is: +# +# [mariadbd.instancename] +# # TCP port to make available for clients +# port=3306 +# # Socket to make available for clients +# socket=/tmp/mariadb-instancename.sock +# # Where MariaDB should store all its data +# datadir=/usr/local/mariadb-instancename/data +# +# and start the service via: +# +# root> systemctl start mariadb@{instancename}.server +# +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, for +# all instances, the best way is: +# +# root> systemctl edit mariadb@.service +# +# Then add additonal directives under a section (probably [Service]). +# +# If you only want to change a specific instance: +# +# root> systemctl edit mariadb@{instancename}.server +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 + +[Unit] +Description=MariaDB 10.5 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/vars/Fedora-40-default.yml b/vars/Fedora-40-default.yml new file mode 100644 index 0000000..be65d9f --- /dev/null +++ b/vars/Fedora-40-default.yml @@ -0,0 +1,100 @@ +--- +# vars file for ensure_mariadb +package_list: + - name: 'mariadb' + state: 'present' + - name: 'mariadb-server' + state: 'present' + - name: 'phpMyAdmin' + state: 'present' +firewall_list: + - permanent: 'yes' + service: 'mysql' + state: 'enabled' +service_list: + - name: 'httpd.service' + state: 'started' + enabled: 'yes' + - name: 'httpd-reload.timer' + state: 'started' + enabled: 'yes' + - name: 'php-fpm.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb-copytls.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb.service' + state: 'started' + enabled: 'yes' +template_list: + - dest: '/etc/my.cnf.d/client.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' + - dest: '/etc/my.cnf.d/mariadb-server.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' + - dest: '/etc/my.cnf.d/mysql-clients.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' + - dest: '/etc/my.cnf.d/spider.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' + - dest: '/etc/my.cnf.d/enable_encryption.preset' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' + - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' + - dest: '/etc/my.cnf.d/auth_gssapi.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' + - dest: '/etc/phpMyAdmin/config.inc.php' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' + - dest: '/etc/my.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' + - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' + - dest: '/usr/lib/systemd/system/mariadb.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' + - dest: '/usr/lib/systemd/system/mariadb@.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' + - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' + - dest: '/usr/lib/systemd/system/mariadb-copytls.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' From 60e0cd205e249d1dca0d6ebcc3def04f97552eec Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Fri, 27 Dec 2024 20:30:05 -0600 Subject: [PATCH 25/40] Fedora 41 Signed-off-by: Jason Rothstein --- .../41/etc/httpd/conf.d/phpMyAdmin.conf | 46 ++++++ templates/Fedora/41/etc/my.cnf | 11 ++ .../Fedora/41/etc/my.cnf.d/auth_gssapi.cnf | 2 + templates/Fedora/41/etc/my.cnf.d/client.cnf | 14 ++ .../etc/my.cnf.d/cracklib_password_check.cnf | 2 + .../41/etc/my.cnf.d/enable_encryption.preset | 20 +++ .../Fedora/41/etc/my.cnf.d/mariadb-server.cnf | 59 +++++++ .../Fedora/41/etc/my.cnf.d/mysql-clients.cnf | 23 +++ templates/Fedora/41/etc/my.cnf.d/spider.cnf | 7 + .../Fedora/41/etc/phpMyAdmin/config.inc.php | 153 ++++++++++++++++++ .../systemd/system/mariadb-copytls.service | 11 ++ .../lib/systemd/system/mariadb-copytls.timer | 8 + .../41/usr/lib/systemd/system/mariadb.service | 64 ++++++++ .../usr/lib/systemd/system/mariadb@.service | 85 ++++++++++ vars/Fedora-41-default.yml | 100 ++++++++++++ 15 files changed, 605 insertions(+) create mode 100644 templates/Fedora/41/etc/httpd/conf.d/phpMyAdmin.conf create mode 100644 templates/Fedora/41/etc/my.cnf create mode 100644 templates/Fedora/41/etc/my.cnf.d/auth_gssapi.cnf create mode 100644 templates/Fedora/41/etc/my.cnf.d/client.cnf create mode 100644 templates/Fedora/41/etc/my.cnf.d/cracklib_password_check.cnf create mode 100644 templates/Fedora/41/etc/my.cnf.d/enable_encryption.preset create mode 100644 templates/Fedora/41/etc/my.cnf.d/mariadb-server.cnf create mode 100644 templates/Fedora/41/etc/my.cnf.d/mysql-clients.cnf create mode 100644 templates/Fedora/41/etc/my.cnf.d/spider.cnf create mode 100644 templates/Fedora/41/etc/phpMyAdmin/config.inc.php create mode 100644 templates/Fedora/41/usr/lib/systemd/system/mariadb-copytls.service create mode 100644 templates/Fedora/41/usr/lib/systemd/system/mariadb-copytls.timer create mode 100644 templates/Fedora/41/usr/lib/systemd/system/mariadb.service create mode 100644 templates/Fedora/41/usr/lib/systemd/system/mariadb@.service create mode 100644 vars/Fedora-41-default.yml diff --git a/templates/Fedora/41/etc/httpd/conf.d/phpMyAdmin.conf b/templates/Fedora/41/etc/httpd/conf.d/phpMyAdmin.conf new file mode 100644 index 0000000..98738c7 --- /dev/null +++ b/templates/Fedora/41/etc/httpd/conf.d/phpMyAdmin.conf @@ -0,0 +1,46 @@ +# phpMyAdmin - Web based MySQL browser written in php +# +# Allows only localhost by default +# +# But allowing phpMyAdmin to anyone other than localhost should be considered +# dangerous unless properly secured by SSL + +Alias /phpMyAdmin /usr/share/phpMyAdmin +Alias /phpmyadmin /usr/share/phpMyAdmin + + + AddDefaultCharset UTF-8 + Require ssl + + + + Require local + + +# These directories do not require access over HTTP - taken from the original +# phpMyAdmin upstream tarball +# + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + +# This configuration prevents mod_security at phpMyAdmin directories from +# filtering SQL etc. This may break your mod_security implementation. +# +# +# +# SecRuleInheritance Off +# +# diff --git a/templates/Fedora/41/etc/my.cnf b/templates/Fedora/41/etc/my.cnf new file mode 100644 index 0000000..913b88f --- /dev/null +++ b/templates/Fedora/41/etc/my.cnf @@ -0,0 +1,11 @@ +# +# This group is read both both by the client and the server +# use it for options that affect everything +# +[client-server] + +# +# include all files from the config directory +# +!includedir /etc/my.cnf.d + diff --git a/templates/Fedora/41/etc/my.cnf.d/auth_gssapi.cnf b/templates/Fedora/41/etc/my.cnf.d/auth_gssapi.cnf new file mode 100644 index 0000000..c7cbc78 --- /dev/null +++ b/templates/Fedora/41/etc/my.cnf.d/auth_gssapi.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=auth_gssapi.so diff --git a/templates/Fedora/41/etc/my.cnf.d/client.cnf b/templates/Fedora/41/etc/my.cnf.d/client.cnf new file mode 100644 index 0000000..05442bf --- /dev/null +++ b/templates/Fedora/41/etc/my.cnf.d/client.cnf @@ -0,0 +1,14 @@ +# +# These two groups are read by the client library +# Use it for options that affect all clients, but not the server +# +[client] +default-character-set = utf8mb4 + +# This group is not read by mysql client library, +# If you use the same .cnf file for MySQL and MariaDB, +# use it for MariaDB-only client options +[client-mariadb] +ssl +ssl-verify-server-cert + diff --git a/templates/Fedora/41/etc/my.cnf.d/cracklib_password_check.cnf b/templates/Fedora/41/etc/my.cnf.d/cracklib_password_check.cnf new file mode 100644 index 0000000..72cbcb1 --- /dev/null +++ b/templates/Fedora/41/etc/my.cnf.d/cracklib_password_check.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=cracklib_password_check.so diff --git a/templates/Fedora/41/etc/my.cnf.d/enable_encryption.preset b/templates/Fedora/41/etc/my.cnf.d/enable_encryption.preset new file mode 100644 index 0000000..722db7e --- /dev/null +++ b/templates/Fedora/41/etc/my.cnf.d/enable_encryption.preset @@ -0,0 +1,20 @@ +# +# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d) +# and it will enable data at rest encryption. This is a simple way to +# ensure that everything that can be encrypted will be and your +# data will not leak unencrypted. +# +# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a +# newer version and your edits will be lost. Instead, add your edits +# to the .cnf file after the !include directive. +# +# NOTE that you also need to install an encryption plugin for the encryption +# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management +# +[mariadb] +aria-encrypt-tables +encrypt-binlog +encrypt-tmp-disk-tables +encrypt-tmp-files +loose-innodb-encrypt-log +loose-innodb-encrypt-tables diff --git a/templates/Fedora/41/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/41/etc/my.cnf.d/mariadb-server.cnf new file mode 100644 index 0000000..7239135 --- /dev/null +++ b/templates/Fedora/41/etc/my.cnf.d/mariadb-server.cnf @@ -0,0 +1,59 @@ +# +# These groups are read by MariaDB server. +# Use it for options that only the server (but not clients) should see +# +# See the examples of server my.cnf files in /usr/share/mysql/ +# + +# this is read by the standalone daemon and embedded servers +[server] + +# this is only for the mysqld standalone daemon +# Settings user and group are ignored when systemd is used. +# If you need to run mysqld under a different user or group, +# customize your systemd unit file for mysqld/mariadb according to the +# instructions in http://fedoraproject.org/wiki/Systemd +[mysqld] +datadir=/var/lib/mysql +socket=/var/lib/mysql/mysql.sock +log-error=/var/log/mariadb/mariadb.log +pid-file=/run/mariadb/mariadb.pid +character-set-server = utf8mb4 +ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm +ssl-key=/etc/my.cnf.d/certificates/privkey.epm +tls-version=TLSv1.2,TLSv1.3 + + +# +# * Galera-related settings +# +[galera] +# Mandatory settings +#wsrep_on=ON +#wsrep_provider= +#wsrep_cluster_address= +#binlog_format=row +#default_storage_engine=InnoDB +#innodb_autoinc_lock_mode=2 +# +# Allow server to accept connections on all interfaces. +# +#bind-address=0.0.0.0 +# +# Optional setting +#wsrep_slave_threads=1 +#innodb_flush_log_at_trx_commit=0 + +# this is only for embedded server +[embedded] + +# This group is only read by MariaDB servers, not by MySQL. +# If you use the same .cnf file for MySQL and MariaDB, +# you can put MariaDB-only options here +[mariadb] + +# This group is only read by MariaDB-10.5 servers. +# If you use the same .cnf file for MariaDB of different versions, +# use this group for options that older servers don't understand +[mariadb-10.5] + diff --git a/templates/Fedora/41/etc/my.cnf.d/mysql-clients.cnf b/templates/Fedora/41/etc/my.cnf.d/mysql-clients.cnf new file mode 100644 index 0000000..3df9b7b --- /dev/null +++ b/templates/Fedora/41/etc/my.cnf.d/mysql-clients.cnf @@ -0,0 +1,23 @@ +# +# These groups are read by MariaDB command-line tools +# Use it for options that affect only one utility +# + +[mysql] + +[mysql_upgrade] + +[mysqladmin] + +[mysqlbinlog] + +[mysqlcheck] + +[mysqldump] + +[mysqlimport] + +[mysqlshow] + +[mysqlslap] + diff --git a/templates/Fedora/41/etc/my.cnf.d/spider.cnf b/templates/Fedora/41/etc/my.cnf.d/spider.cnf new file mode 100644 index 0000000..ebc9968 --- /dev/null +++ b/templates/Fedora/41/etc/my.cnf.d/spider.cnf @@ -0,0 +1,7 @@ +[mariadb] +# +# Uncomment line to enable +# +#plugin-load-add = ha_spider + +# Read more at https://mariadb.com/kb/en/spider/ diff --git a/templates/Fedora/41/etc/phpMyAdmin/config.inc.php b/templates/Fedora/41/etc/phpMyAdmin/config.inc.php new file mode 100644 index 0000000..b973a14 --- /dev/null +++ b/templates/Fedora/41/etc/phpMyAdmin/config.inc.php @@ -0,0 +1,153 @@ +. + */ + +declare(strict_types=1); + +/** + * This is needed for cookie based authentication to encrypt password in + * cookie. Needs to be 32 chars long. + */ +$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ + +/** + * Servers configuration + */ +$i = 0; + +/** + * First server + */ +$i++; +/* Authentication type */ +$cfg['Servers'][$i]['auth_type'] = 'cookie'; +/* Server parameters */ +$cfg['Servers'][$i]['host'] = 'localhost'; +$cfg['Servers'][$i]['compress'] = false; +$cfg['Servers'][$i]['AllowNoPassword'] = false; + +/** + * phpMyAdmin configuration storage settings. + */ + +/* User used to manipulate with storage */ +// $cfg['Servers'][$i]['controlhost'] = ''; +// $cfg['Servers'][$i]['controlport'] = ''; +// $cfg['Servers'][$i]['controluser'] = 'pma'; +// $cfg['Servers'][$i]['controlpass'] = 'pmapass'; + +/* Storage database and tables */ +// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; +// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; +// $cfg['Servers'][$i]['relation'] = 'pma__relation'; +// $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; +// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; +// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; +// $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; +// $cfg['Servers'][$i]['history'] = 'pma__history'; +// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; +// $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; +// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; +// $cfg['Servers'][$i]['recent'] = 'pma__recent'; +// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; +// $cfg['Servers'][$i]['users'] = 'pma__users'; +// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; +// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; +// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; +// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; +// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; +// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; + +/** + * End of servers configuration + */ + +/** + * Directories for saving/loading files from server + */ +$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload'; +$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; + +/** + * Whether to display icons or text or both icons and text in table row + * action segment. Value can be either of 'icons', 'text' or 'both'. + * default = 'both' + */ +//$cfg['RowActionType'] = 'icons'; + +/** + * Defines whether a user should be displayed a "show all (records)" + * button in browse mode or not. + * default = false + */ +//$cfg['ShowAll'] = true; + +/** + * Number of rows displayed when browsing a result set. If the result + * set contains more rows, "Previous" and "Next". + * Possible values: 25, 50, 100, 250, 500 + * default = 25 + */ +//$cfg['MaxRows'] = 50; + +/** + * Disallow editing of binary fields + * valid values are: + * false allow editing + * 'blob' allow editing except for BLOB fields + * 'noblob' disallow editing except for BLOB fields + * 'all' disallow editing + * default = 'blob' + */ +//$cfg['ProtectBinary'] = false; + +/** + * Default language to use, if not browser-defined or user-defined + * (you find all languages in the locale folder) + * uncomment the desired line: + * default = 'en' + */ +//$cfg['DefaultLang'] = 'en'; +//$cfg['DefaultLang'] = 'de'; + +/** + * How many columns should be used for table display of a database? + * (a value larger than 1 results in some information being hidden) + * default = 1 + */ +//$cfg['PropertiesNumColumns'] = 2; + +/** + * Set to true if you want DB-based query history.If false, this utilizes + * JS-routines to display query history (lost by window close) + * + * This requires configuration storage enabled, see above. + * default = false + */ +//$cfg['QueryHistoryDB'] = true; + +/** + * When using DB-based query history, how many entries should be kept? + * default = 25 + */ +//$cfg['QueryHistoryMax'] = 100; + +/** + * Whether or not to query the user before sending the error report to + * the phpMyAdmin team when a JavaScript error occurs + * + * Available options + * ('ask' | 'always' | 'never') + * default = 'ask' + */ +//$cfg['SendErrorReports'] = 'always'; + +/** + * You can find more configuration options in the documentation + * in the doc/ folder or at . + */ diff --git a/templates/Fedora/41/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/41/usr/lib/systemd/system/mariadb-copytls.service new file mode 100644 index 0000000..3f63078 --- /dev/null +++ b/templates/Fedora/41/usr/lib/systemd/system/mariadb-copytls.service @@ -0,0 +1,11 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Service] +Type=oneshot +ExecStartPre=mkdir -p /etc/my.cnf.d/certificates +ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/{{ mariadb_vhost }}/*.pem /etc/my.cnf.d/certificates/' +ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/41/usr/lib/systemd/system/mariadb-copytls.timer b/templates/Fedora/41/usr/lib/systemd/system/mariadb-copytls.timer new file mode 100644 index 0000000..8e5ad7b --- /dev/null +++ b/templates/Fedora/41/usr/lib/systemd/system/mariadb-copytls.timer @@ -0,0 +1,8 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Timer] +OnUnitActiveSec=5min + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/41/usr/lib/systemd/system/mariadb.service b/templates/Fedora/41/usr/lib/systemd/system/mariadb.service new file mode 100644 index 0000000..d61fd82 --- /dev/null +++ b/templates/Fedora/41/usr/lib/systemd/system/mariadb.service @@ -0,0 +1,64 @@ +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, the +# best way is to: +# +# root> systemctl edit mariadb.service +# +# Then add additonal directives under a section (probably [Service]). +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 +# + +[Unit] +Description=MariaDB 10.5 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket +# '%n' expands to 'Full unit name'; man systemd.unit +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/templates/Fedora/41/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/41/usr/lib/systemd/system/mariadb@.service new file mode 100644 index 0000000..10ca8fd --- /dev/null +++ b/templates/Fedora/41/usr/lib/systemd/system/mariadb@.service @@ -0,0 +1,85 @@ +# Multi instance version of MariaDB. For if you run mutiple verions at once. +# Also used for mariadb@bootstrap to bootstrap Galera. +# +# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in +# /etc/@my.cnf to change per instance settings. A minimumal necessary +# configuration items to change to avoid conflicts between instances is: +# +# [mariadbd.instancename] +# # TCP port to make available for clients +# port=3306 +# # Socket to make available for clients +# socket=/tmp/mariadb-instancename.sock +# # Where MariaDB should store all its data +# datadir=/usr/local/mariadb-instancename/data +# +# and start the service via: +# +# root> systemctl start mariadb@{instancename}.server +# +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, for +# all instances, the best way is: +# +# root> systemctl edit mariadb@.service +# +# Then add additonal directives under a section (probably [Service]). +# +# If you only want to change a specific instance: +# +# root> systemctl edit mariadb@{instancename}.server +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 + +[Unit] +Description=MariaDB 10.5 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/vars/Fedora-41-default.yml b/vars/Fedora-41-default.yml new file mode 100644 index 0000000..be65d9f --- /dev/null +++ b/vars/Fedora-41-default.yml @@ -0,0 +1,100 @@ +--- +# vars file for ensure_mariadb +package_list: + - name: 'mariadb' + state: 'present' + - name: 'mariadb-server' + state: 'present' + - name: 'phpMyAdmin' + state: 'present' +firewall_list: + - permanent: 'yes' + service: 'mysql' + state: 'enabled' +service_list: + - name: 'httpd.service' + state: 'started' + enabled: 'yes' + - name: 'httpd-reload.timer' + state: 'started' + enabled: 'yes' + - name: 'php-fpm.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb-copytls.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb.service' + state: 'started' + enabled: 'yes' +template_list: + - dest: '/etc/my.cnf.d/client.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' + - dest: '/etc/my.cnf.d/mariadb-server.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' + - dest: '/etc/my.cnf.d/mysql-clients.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' + - dest: '/etc/my.cnf.d/spider.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' + - dest: '/etc/my.cnf.d/enable_encryption.preset' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' + - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' + - dest: '/etc/my.cnf.d/auth_gssapi.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' + - dest: '/etc/phpMyAdmin/config.inc.php' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' + - dest: '/etc/my.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' + - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' + - dest: '/usr/lib/systemd/system/mariadb.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' + - dest: '/usr/lib/systemd/system/mariadb@.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' + - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' + - dest: '/usr/lib/systemd/system/mariadb-copytls.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' From 4f03179cc9f69f8c1f4a63a0d56d9c4fe6820fb8 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sat, 28 Dec 2024 19:25:23 -0600 Subject: [PATCH 26/40] Fedora 41 Signed-off-by: Jason Rothstein --- templates/Fedora/41/usr/lib/systemd/system/mariadb.service | 2 +- templates/Fedora/41/usr/lib/systemd/system/mariadb@.service | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/Fedora/41/usr/lib/systemd/system/mariadb.service b/templates/Fedora/41/usr/lib/systemd/system/mariadb.service index d61fd82..e1236bb 100644 --- a/templates/Fedora/41/usr/lib/systemd/system/mariadb.service +++ b/templates/Fedora/41/usr/lib/systemd/system/mariadb.service @@ -17,7 +17,7 @@ # [Unit] -Description=MariaDB 10.5 database server +Description=MariaDB 10.11 database server Documentation=man:mariadbd(8) Documentation=https://mariadb.com/kb/en/library/systemd/ After=network.target diff --git a/templates/Fedora/41/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/41/usr/lib/systemd/system/mariadb@.service index 10ca8fd..ef60ec1 100644 --- a/templates/Fedora/41/usr/lib/systemd/system/mariadb@.service +++ b/templates/Fedora/41/usr/lib/systemd/system/mariadb@.service @@ -39,7 +39,7 @@ # LimitNOFILE=10000 [Unit] -Description=MariaDB 10.5 database server +Description=MariaDB 10.11 database server Documentation=man:mariadbd(8) Documentation=https://mariadb.com/kb/en/library/systemd/ After=network.target From e10559639a9f53d45c948264b79659468b38c65d Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sat, 28 Dec 2024 19:40:17 -0600 Subject: [PATCH 27/40] Fedora 41 Signed-off-by: Jason Rothstein --- .../etc/my.cnf.d/hashicorp_key_management.cnf | 117 ++++++++++++++++++ .../Fedora/41/etc/my.cnf.d/mariadb-server.cnf | 4 +- .../Fedora/41/etc/my.cnf.d/provider_bzip2.cnf | 3 + .../Fedora/41/etc/my.cnf.d/provider_lz4.cnf | 3 + .../Fedora/41/etc/my.cnf.d/provider_lzma.cnf | 3 + .../Fedora/41/etc/my.cnf.d/provider_lzo.cnf | 3 + .../41/etc/my.cnf.d/provider_snappy.cnf | 3 + vars/Fedora-41-default.yml | 30 +++++ 8 files changed, 164 insertions(+), 2 deletions(-) create mode 100644 templates/Fedora/41/etc/my.cnf.d/hashicorp_key_management.cnf create mode 100644 templates/Fedora/41/etc/my.cnf.d/provider_bzip2.cnf create mode 100644 templates/Fedora/41/etc/my.cnf.d/provider_lz4.cnf create mode 100644 templates/Fedora/41/etc/my.cnf.d/provider_lzma.cnf create mode 100644 templates/Fedora/41/etc/my.cnf.d/provider_lzo.cnf create mode 100644 templates/Fedora/41/etc/my.cnf.d/provider_snappy.cnf diff --git a/templates/Fedora/41/etc/my.cnf.d/hashicorp_key_management.cnf b/templates/Fedora/41/etc/my.cnf.d/hashicorp_key_management.cnf new file mode 100644 index 0000000..275626a --- /dev/null +++ b/templates/Fedora/41/etc/my.cnf.d/hashicorp_key_management.cnf @@ -0,0 +1,117 @@ +# Copyright (C) 2019-2022 MariaDB Corporation +# +# This is a default configuration for the Hashicorp Vault plugin. +# You can read more about the parameters of this plugin in the +# hashicorp_key_management.txt file. +# +# NOTE THAT YOU MUST MANUALLY UNCOMMENT THE "plugin-load-add" +# LINE AND ALL THE NECESSARY PARAMETERS BELOW, SETTING THEM +# TO APPROPRIATE VALUES! +# +[mariadb] + +# +# To use Hashicorp Vault KMS, the plugin must be preloaded and +# activated on the server: +# +#plugin-load-add=hashicorp_key_management.so + +# Most of its parameters should not be changed during plugin +# operation and therefore must be preconfigured as part of +# the server configuration: + +# +# HTTP[s] URL that is used to connect to the Hashicorp Vault server. +# It must include the name of the scheme ("https://" for a secure +# connection) and, according to the API rules for storages of the +# key-value type in Hashicorp Vault, after the server address, the +# path must begin with the "/v1/" string (as prefix), for example: +# "https://127.0.0.1:8200/v1/my_secrets" +# +#hashicorp-key-management-vault-url="" + +# +# Authentication token that passed to the Hashicorp Vault +# in the request header: +# +#hashicorp-key-management-token="" + +# +# Optional path to the Certificate Authority (CA) bundle +# (is a file that contains root and intermediate certificates): +# +#hashicorp-key-management-vault-ca="" + +# +# Set the duration (in seconds) for the Hashicorp Vault server +# connection timeout. The allowed range is from 1 to 86400 seconds. +# The user can also specify a zero value, which means the default +# timeout value set by the libcurl library (currently 300 seconds): +# +#hashicorp-key-management-timeout=15 + +# +# Number of server request retries in case of timeout: +# +#hashicorp-key-management-retries=3 + +# +# Enable key caching (storing key values received from +# the Hashicorp Vault server in the local memory): +# +#hashicorp-key-management-caching-enabled="on" + +# +# This parameter instructs the plugin to use the key values +# or version numbers taken from the cache in the event of a +# timeout when accessing the vault server. By default this +# option is disabled. +# +# Please note that key values or version numbers will be read +# from the cache when the timeout expires only after the number +# of attempts to read them from the storage server that specified +# by the hashicorp-key-management-retries parameter has been +# exhausted: +# +#hashicorp-key-management-use-cache-on-timeout="off" + +# +# The time (in milliseconds) after which the value of the key +# stored in the cache becomes invalid and an attempt to read this +# data causes a new request send to the vault server. By default, +# cache entries become invalid after 60,000 milliseconds (after +# one minute). +# +# If the value of this parameter is zero, then the keys will always +# be considered invalid, but they still can be used if the vault +# server is unavailable and the corresponding cache operating mode +# (--[loose-]hashicorp-key-management-use-cache-on-timeout="on") +# is enabled. +# +#hashicorp-key-management-cache-timeout=0 + +# +# The time (in milliseconds) after which the information about +# latest version number of the key (which stored in the cache) +# becomes invalid and an attempt to read this information causes +# a new request send to the vault server. +# +# If the value of this parameter is zero, then information abount +# latest key version numbers always considered invalid, unless +# there is no communication with the vault server and use of the +# cache is allowed when the server is unavailable. +# +# By default, this parameter is zero, that is, the latest version +# numbers for the keys stored in the cache are considered always +# invalid, except when the vault server is unavailable and use +# of the cache is allowed on server failures. +# +#hashicorp-key-management-cache-version-timeout=0 + +# +# This parameter enables ("on", this is the default value) or disables +# ("off") checking the kv storage version during plugin initialization. +# The plugin requires storage to be version 2 or older in order for it +# to work properly. +# +#hashicorp-key-management-check-kv-version=on diff --git a/templates/Fedora/41/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/41/etc/my.cnf.d/mariadb-server.cnf index 7239135..3ae4a70 100644 --- a/templates/Fedora/41/etc/my.cnf.d/mariadb-server.cnf +++ b/templates/Fedora/41/etc/my.cnf.d/mariadb-server.cnf @@ -52,8 +52,8 @@ tls-version=TLSv1.2,TLSv1.3 # you can put MariaDB-only options here [mariadb] -# This group is only read by MariaDB-10.5 servers. +# This group is only read by MariaDB-10.11 servers. # If you use the same .cnf file for MariaDB of different versions, # use this group for options that older servers don't understand -[mariadb-10.5] +[mariadb-10.11] diff --git a/templates/Fedora/41/etc/my.cnf.d/provider_bzip2.cnf b/templates/Fedora/41/etc/my.cnf.d/provider_bzip2.cnf new file mode 100644 index 0000000..9b855e8 --- /dev/null +++ b/templates/Fedora/41/etc/my.cnf.d/provider_bzip2.cnf @@ -0,0 +1,3 @@ +[server] +plugin_load_add=provider_bzip2 +provider_bzip2=force_plus_permanent diff --git a/templates/Fedora/41/etc/my.cnf.d/provider_lz4.cnf b/templates/Fedora/41/etc/my.cnf.d/provider_lz4.cnf new file mode 100644 index 0000000..0b8a3ec --- /dev/null +++ b/templates/Fedora/41/etc/my.cnf.d/provider_lz4.cnf @@ -0,0 +1,3 @@ +[server] +plugin_load_add=provider_lz4 +provider_lz4=force_plus_permanent diff --git a/templates/Fedora/41/etc/my.cnf.d/provider_lzma.cnf b/templates/Fedora/41/etc/my.cnf.d/provider_lzma.cnf new file mode 100644 index 0000000..3a05a35 --- /dev/null +++ b/templates/Fedora/41/etc/my.cnf.d/provider_lzma.cnf @@ -0,0 +1,3 @@ +[server] +plugin_load_add=provider_lzma +provider_lzma=force_plus_permanent diff --git a/templates/Fedora/41/etc/my.cnf.d/provider_lzo.cnf b/templates/Fedora/41/etc/my.cnf.d/provider_lzo.cnf new file mode 100644 index 0000000..6580198 --- /dev/null +++ b/templates/Fedora/41/etc/my.cnf.d/provider_lzo.cnf @@ -0,0 +1,3 @@ +[server] +plugin_load_add=provider_lzo +provider_lzo=force_plus_permanent diff --git a/templates/Fedora/41/etc/my.cnf.d/provider_snappy.cnf b/templates/Fedora/41/etc/my.cnf.d/provider_snappy.cnf new file mode 100644 index 0000000..da78207 --- /dev/null +++ b/templates/Fedora/41/etc/my.cnf.d/provider_snappy.cnf @@ -0,0 +1,3 @@ +[server] +plugin_load_add=provider_snappy +provider_snappy=force_plus_permanent diff --git a/vars/Fedora-41-default.yml b/vars/Fedora-41-default.yml index be65d9f..76c03d0 100644 --- a/vars/Fedora-41-default.yml +++ b/vars/Fedora-41-default.yml @@ -63,6 +63,36 @@ template_list: mode: '0644' owner: 'root' src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' + - dest: '/etc/my.cnf.d/hashicorp_key_management.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/hashicorp_key_management.cnf' + - dest: '/etc/my.cnf.d/provider_bzip2.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_bzip2.cnf' + - dest: '/etc/my.cnf.d/provider_lz4.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lz4.cnf' + - dest: '/etc/my.cnf.d/provider_lzma.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lzma.cnf' + - dest: '/etc/my.cnf.d/provider_lzo.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lzo.cnf' + - dest: '/etc/my.cnf.d/provider_snappy.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_snappy.cnf' - dest: '/etc/phpMyAdmin/config.inc.php' group: 'root' mode: '0644' From 25224177e4f8c2984cb91586991989ba7c379412 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 27 Apr 2025 12:38:38 -0500 Subject: [PATCH 28/40] Fedora 42 Signed-off-by: Jason Rothstein --- .../42/etc/httpd/conf.d/phpMyAdmin.conf | 46 ++++++ templates/Fedora/42/etc/my.cnf | 11 ++ .../Fedora/42/etc/my.cnf.d/auth_gssapi.cnf | 2 + templates/Fedora/42/etc/my.cnf.d/client.cnf | 14 ++ .../etc/my.cnf.d/cracklib_password_check.cnf | 2 + .../42/etc/my.cnf.d/enable_encryption.preset | 20 +++ .../etc/my.cnf.d/hashicorp_key_management.cnf | 117 ++++++++++++++ .../Fedora/42/etc/my.cnf.d/mariadb-server.cnf | 59 +++++++ .../Fedora/42/etc/my.cnf.d/mysql-clients.cnf | 23 +++ .../Fedora/42/etc/my.cnf.d/provider_bzip2.cnf | 3 + .../Fedora/42/etc/my.cnf.d/provider_lz4.cnf | 3 + .../Fedora/42/etc/my.cnf.d/provider_lzma.cnf | 3 + .../Fedora/42/etc/my.cnf.d/provider_lzo.cnf | 3 + .../42/etc/my.cnf.d/provider_snappy.cnf | 3 + templates/Fedora/42/etc/my.cnf.d/spider.cnf | 7 + .../Fedora/42/etc/phpMyAdmin/config.inc.php | 153 ++++++++++++++++++ .../systemd/system/mariadb-copytls.service | 11 ++ .../lib/systemd/system/mariadb-copytls.timer | 8 + .../42/usr/lib/systemd/system/mariadb.service | 64 ++++++++ .../usr/lib/systemd/system/mariadb@.service | 85 ++++++++++ vars/Fedora-42-default.yml | 130 +++++++++++++++ 21 files changed, 767 insertions(+) create mode 100644 templates/Fedora/42/etc/httpd/conf.d/phpMyAdmin.conf create mode 100644 templates/Fedora/42/etc/my.cnf create mode 100644 templates/Fedora/42/etc/my.cnf.d/auth_gssapi.cnf create mode 100644 templates/Fedora/42/etc/my.cnf.d/client.cnf create mode 100644 templates/Fedora/42/etc/my.cnf.d/cracklib_password_check.cnf create mode 100644 templates/Fedora/42/etc/my.cnf.d/enable_encryption.preset create mode 100644 templates/Fedora/42/etc/my.cnf.d/hashicorp_key_management.cnf create mode 100644 templates/Fedora/42/etc/my.cnf.d/mariadb-server.cnf create mode 100644 templates/Fedora/42/etc/my.cnf.d/mysql-clients.cnf create mode 100644 templates/Fedora/42/etc/my.cnf.d/provider_bzip2.cnf create mode 100644 templates/Fedora/42/etc/my.cnf.d/provider_lz4.cnf create mode 100644 templates/Fedora/42/etc/my.cnf.d/provider_lzma.cnf create mode 100644 templates/Fedora/42/etc/my.cnf.d/provider_lzo.cnf create mode 100644 templates/Fedora/42/etc/my.cnf.d/provider_snappy.cnf create mode 100644 templates/Fedora/42/etc/my.cnf.d/spider.cnf create mode 100644 templates/Fedora/42/etc/phpMyAdmin/config.inc.php create mode 100644 templates/Fedora/42/usr/lib/systemd/system/mariadb-copytls.service create mode 100644 templates/Fedora/42/usr/lib/systemd/system/mariadb-copytls.timer create mode 100644 templates/Fedora/42/usr/lib/systemd/system/mariadb.service create mode 100644 templates/Fedora/42/usr/lib/systemd/system/mariadb@.service create mode 100644 vars/Fedora-42-default.yml diff --git a/templates/Fedora/42/etc/httpd/conf.d/phpMyAdmin.conf b/templates/Fedora/42/etc/httpd/conf.d/phpMyAdmin.conf new file mode 100644 index 0000000..98738c7 --- /dev/null +++ b/templates/Fedora/42/etc/httpd/conf.d/phpMyAdmin.conf @@ -0,0 +1,46 @@ +# phpMyAdmin - Web based MySQL browser written in php +# +# Allows only localhost by default +# +# But allowing phpMyAdmin to anyone other than localhost should be considered +# dangerous unless properly secured by SSL + +Alias /phpMyAdmin /usr/share/phpMyAdmin +Alias /phpmyadmin /usr/share/phpMyAdmin + + + AddDefaultCharset UTF-8 + Require ssl + + + + Require local + + +# These directories do not require access over HTTP - taken from the original +# phpMyAdmin upstream tarball +# + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + +# This configuration prevents mod_security at phpMyAdmin directories from +# filtering SQL etc. This may break your mod_security implementation. +# +# +# +# SecRuleInheritance Off +# +# diff --git a/templates/Fedora/42/etc/my.cnf b/templates/Fedora/42/etc/my.cnf new file mode 100644 index 0000000..913b88f --- /dev/null +++ b/templates/Fedora/42/etc/my.cnf @@ -0,0 +1,11 @@ +# +# This group is read both both by the client and the server +# use it for options that affect everything +# +[client-server] + +# +# include all files from the config directory +# +!includedir /etc/my.cnf.d + diff --git a/templates/Fedora/42/etc/my.cnf.d/auth_gssapi.cnf b/templates/Fedora/42/etc/my.cnf.d/auth_gssapi.cnf new file mode 100644 index 0000000..c7cbc78 --- /dev/null +++ b/templates/Fedora/42/etc/my.cnf.d/auth_gssapi.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=auth_gssapi.so diff --git a/templates/Fedora/42/etc/my.cnf.d/client.cnf b/templates/Fedora/42/etc/my.cnf.d/client.cnf new file mode 100644 index 0000000..05442bf --- /dev/null +++ b/templates/Fedora/42/etc/my.cnf.d/client.cnf @@ -0,0 +1,14 @@ +# +# These two groups are read by the client library +# Use it for options that affect all clients, but not the server +# +[client] +default-character-set = utf8mb4 + +# This group is not read by mysql client library, +# If you use the same .cnf file for MySQL and MariaDB, +# use it for MariaDB-only client options +[client-mariadb] +ssl +ssl-verify-server-cert + diff --git a/templates/Fedora/42/etc/my.cnf.d/cracklib_password_check.cnf b/templates/Fedora/42/etc/my.cnf.d/cracklib_password_check.cnf new file mode 100644 index 0000000..72cbcb1 --- /dev/null +++ b/templates/Fedora/42/etc/my.cnf.d/cracklib_password_check.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=cracklib_password_check.so diff --git a/templates/Fedora/42/etc/my.cnf.d/enable_encryption.preset b/templates/Fedora/42/etc/my.cnf.d/enable_encryption.preset new file mode 100644 index 0000000..722db7e --- /dev/null +++ b/templates/Fedora/42/etc/my.cnf.d/enable_encryption.preset @@ -0,0 +1,20 @@ +# +# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d) +# and it will enable data at rest encryption. This is a simple way to +# ensure that everything that can be encrypted will be and your +# data will not leak unencrypted. +# +# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a +# newer version and your edits will be lost. Instead, add your edits +# to the .cnf file after the !include directive. +# +# NOTE that you also need to install an encryption plugin for the encryption +# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management +# +[mariadb] +aria-encrypt-tables +encrypt-binlog +encrypt-tmp-disk-tables +encrypt-tmp-files +loose-innodb-encrypt-log +loose-innodb-encrypt-tables diff --git a/templates/Fedora/42/etc/my.cnf.d/hashicorp_key_management.cnf b/templates/Fedora/42/etc/my.cnf.d/hashicorp_key_management.cnf new file mode 100644 index 0000000..275626a --- /dev/null +++ b/templates/Fedora/42/etc/my.cnf.d/hashicorp_key_management.cnf @@ -0,0 +1,117 @@ +# Copyright (C) 2019-2022 MariaDB Corporation +# +# This is a default configuration for the Hashicorp Vault plugin. +# You can read more about the parameters of this plugin in the +# hashicorp_key_management.txt file. +# +# NOTE THAT YOU MUST MANUALLY UNCOMMENT THE "plugin-load-add" +# LINE AND ALL THE NECESSARY PARAMETERS BELOW, SETTING THEM +# TO APPROPRIATE VALUES! +# +[mariadb] + +# +# To use Hashicorp Vault KMS, the plugin must be preloaded and +# activated on the server: +# +#plugin-load-add=hashicorp_key_management.so + +# Most of its parameters should not be changed during plugin +# operation and therefore must be preconfigured as part of +# the server configuration: + +# +# HTTP[s] URL that is used to connect to the Hashicorp Vault server. +# It must include the name of the scheme ("https://" for a secure +# connection) and, according to the API rules for storages of the +# key-value type in Hashicorp Vault, after the server address, the +# path must begin with the "/v1/" string (as prefix), for example: +# "https://127.0.0.1:8200/v1/my_secrets" +# +#hashicorp-key-management-vault-url="" + +# +# Authentication token that passed to the Hashicorp Vault +# in the request header: +# +#hashicorp-key-management-token="" + +# +# Optional path to the Certificate Authority (CA) bundle +# (is a file that contains root and intermediate certificates): +# +#hashicorp-key-management-vault-ca="" + +# +# Set the duration (in seconds) for the Hashicorp Vault server +# connection timeout. The allowed range is from 1 to 86400 seconds. +# The user can also specify a zero value, which means the default +# timeout value set by the libcurl library (currently 300 seconds): +# +#hashicorp-key-management-timeout=15 + +# +# Number of server request retries in case of timeout: +# +#hashicorp-key-management-retries=3 + +# +# Enable key caching (storing key values received from +# the Hashicorp Vault server in the local memory): +# +#hashicorp-key-management-caching-enabled="on" + +# +# This parameter instructs the plugin to use the key values +# or version numbers taken from the cache in the event of a +# timeout when accessing the vault server. By default this +# option is disabled. +# +# Please note that key values or version numbers will be read +# from the cache when the timeout expires only after the number +# of attempts to read them from the storage server that specified +# by the hashicorp-key-management-retries parameter has been +# exhausted: +# +#hashicorp-key-management-use-cache-on-timeout="off" + +# +# The time (in milliseconds) after which the value of the key +# stored in the cache becomes invalid and an attempt to read this +# data causes a new request send to the vault server. By default, +# cache entries become invalid after 60,000 milliseconds (after +# one minute). +# +# If the value of this parameter is zero, then the keys will always +# be considered invalid, but they still can be used if the vault +# server is unavailable and the corresponding cache operating mode +# (--[loose-]hashicorp-key-management-use-cache-on-timeout="on") +# is enabled. +# +#hashicorp-key-management-cache-timeout=0 + +# +# The time (in milliseconds) after which the information about +# latest version number of the key (which stored in the cache) +# becomes invalid and an attempt to read this information causes +# a new request send to the vault server. +# +# If the value of this parameter is zero, then information abount +# latest key version numbers always considered invalid, unless +# there is no communication with the vault server and use of the +# cache is allowed when the server is unavailable. +# +# By default, this parameter is zero, that is, the latest version +# numbers for the keys stored in the cache are considered always +# invalid, except when the vault server is unavailable and use +# of the cache is allowed on server failures. +# +#hashicorp-key-management-cache-version-timeout=0 + +# +# This parameter enables ("on", this is the default value) or disables +# ("off") checking the kv storage version during plugin initialization. +# The plugin requires storage to be version 2 or older in order for it +# to work properly. +# +#hashicorp-key-management-check-kv-version=on diff --git a/templates/Fedora/42/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/42/etc/my.cnf.d/mariadb-server.cnf new file mode 100644 index 0000000..3ae4a70 --- /dev/null +++ b/templates/Fedora/42/etc/my.cnf.d/mariadb-server.cnf @@ -0,0 +1,59 @@ +# +# These groups are read by MariaDB server. +# Use it for options that only the server (but not clients) should see +# +# See the examples of server my.cnf files in /usr/share/mysql/ +# + +# this is read by the standalone daemon and embedded servers +[server] + +# this is only for the mysqld standalone daemon +# Settings user and group are ignored when systemd is used. +# If you need to run mysqld under a different user or group, +# customize your systemd unit file for mysqld/mariadb according to the +# instructions in http://fedoraproject.org/wiki/Systemd +[mysqld] +datadir=/var/lib/mysql +socket=/var/lib/mysql/mysql.sock +log-error=/var/log/mariadb/mariadb.log +pid-file=/run/mariadb/mariadb.pid +character-set-server = utf8mb4 +ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm +ssl-key=/etc/my.cnf.d/certificates/privkey.epm +tls-version=TLSv1.2,TLSv1.3 + + +# +# * Galera-related settings +# +[galera] +# Mandatory settings +#wsrep_on=ON +#wsrep_provider= +#wsrep_cluster_address= +#binlog_format=row +#default_storage_engine=InnoDB +#innodb_autoinc_lock_mode=2 +# +# Allow server to accept connections on all interfaces. +# +#bind-address=0.0.0.0 +# +# Optional setting +#wsrep_slave_threads=1 +#innodb_flush_log_at_trx_commit=0 + +# this is only for embedded server +[embedded] + +# This group is only read by MariaDB servers, not by MySQL. +# If you use the same .cnf file for MySQL and MariaDB, +# you can put MariaDB-only options here +[mariadb] + +# This group is only read by MariaDB-10.11 servers. +# If you use the same .cnf file for MariaDB of different versions, +# use this group for options that older servers don't understand +[mariadb-10.11] + diff --git a/templates/Fedora/42/etc/my.cnf.d/mysql-clients.cnf b/templates/Fedora/42/etc/my.cnf.d/mysql-clients.cnf new file mode 100644 index 0000000..3df9b7b --- /dev/null +++ b/templates/Fedora/42/etc/my.cnf.d/mysql-clients.cnf @@ -0,0 +1,23 @@ +# +# These groups are read by MariaDB command-line tools +# Use it for options that affect only one utility +# + +[mysql] + +[mysql_upgrade] + +[mysqladmin] + +[mysqlbinlog] + +[mysqlcheck] + +[mysqldump] + +[mysqlimport] + +[mysqlshow] + +[mysqlslap] + diff --git a/templates/Fedora/42/etc/my.cnf.d/provider_bzip2.cnf b/templates/Fedora/42/etc/my.cnf.d/provider_bzip2.cnf new file mode 100644 index 0000000..9b855e8 --- /dev/null +++ b/templates/Fedora/42/etc/my.cnf.d/provider_bzip2.cnf @@ -0,0 +1,3 @@ +[server] +plugin_load_add=provider_bzip2 +provider_bzip2=force_plus_permanent diff --git a/templates/Fedora/42/etc/my.cnf.d/provider_lz4.cnf b/templates/Fedora/42/etc/my.cnf.d/provider_lz4.cnf new file mode 100644 index 0000000..0b8a3ec --- /dev/null +++ b/templates/Fedora/42/etc/my.cnf.d/provider_lz4.cnf @@ -0,0 +1,3 @@ +[server] +plugin_load_add=provider_lz4 +provider_lz4=force_plus_permanent diff --git a/templates/Fedora/42/etc/my.cnf.d/provider_lzma.cnf b/templates/Fedora/42/etc/my.cnf.d/provider_lzma.cnf new file mode 100644 index 0000000..3a05a35 --- /dev/null +++ b/templates/Fedora/42/etc/my.cnf.d/provider_lzma.cnf @@ -0,0 +1,3 @@ +[server] +plugin_load_add=provider_lzma +provider_lzma=force_plus_permanent diff --git a/templates/Fedora/42/etc/my.cnf.d/provider_lzo.cnf b/templates/Fedora/42/etc/my.cnf.d/provider_lzo.cnf new file mode 100644 index 0000000..6580198 --- /dev/null +++ b/templates/Fedora/42/etc/my.cnf.d/provider_lzo.cnf @@ -0,0 +1,3 @@ +[server] +plugin_load_add=provider_lzo +provider_lzo=force_plus_permanent diff --git a/templates/Fedora/42/etc/my.cnf.d/provider_snappy.cnf b/templates/Fedora/42/etc/my.cnf.d/provider_snappy.cnf new file mode 100644 index 0000000..da78207 --- /dev/null +++ b/templates/Fedora/42/etc/my.cnf.d/provider_snappy.cnf @@ -0,0 +1,3 @@ +[server] +plugin_load_add=provider_snappy +provider_snappy=force_plus_permanent diff --git a/templates/Fedora/42/etc/my.cnf.d/spider.cnf b/templates/Fedora/42/etc/my.cnf.d/spider.cnf new file mode 100644 index 0000000..ebc9968 --- /dev/null +++ b/templates/Fedora/42/etc/my.cnf.d/spider.cnf @@ -0,0 +1,7 @@ +[mariadb] +# +# Uncomment line to enable +# +#plugin-load-add = ha_spider + +# Read more at https://mariadb.com/kb/en/spider/ diff --git a/templates/Fedora/42/etc/phpMyAdmin/config.inc.php b/templates/Fedora/42/etc/phpMyAdmin/config.inc.php new file mode 100644 index 0000000..b973a14 --- /dev/null +++ b/templates/Fedora/42/etc/phpMyAdmin/config.inc.php @@ -0,0 +1,153 @@ +. + */ + +declare(strict_types=1); + +/** + * This is needed for cookie based authentication to encrypt password in + * cookie. Needs to be 32 chars long. + */ +$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ + +/** + * Servers configuration + */ +$i = 0; + +/** + * First server + */ +$i++; +/* Authentication type */ +$cfg['Servers'][$i]['auth_type'] = 'cookie'; +/* Server parameters */ +$cfg['Servers'][$i]['host'] = 'localhost'; +$cfg['Servers'][$i]['compress'] = false; +$cfg['Servers'][$i]['AllowNoPassword'] = false; + +/** + * phpMyAdmin configuration storage settings. + */ + +/* User used to manipulate with storage */ +// $cfg['Servers'][$i]['controlhost'] = ''; +// $cfg['Servers'][$i]['controlport'] = ''; +// $cfg['Servers'][$i]['controluser'] = 'pma'; +// $cfg['Servers'][$i]['controlpass'] = 'pmapass'; + +/* Storage database and tables */ +// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; +// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; +// $cfg['Servers'][$i]['relation'] = 'pma__relation'; +// $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; +// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; +// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; +// $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; +// $cfg['Servers'][$i]['history'] = 'pma__history'; +// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; +// $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; +// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; +// $cfg['Servers'][$i]['recent'] = 'pma__recent'; +// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; +// $cfg['Servers'][$i]['users'] = 'pma__users'; +// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; +// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; +// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; +// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; +// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; +// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; + +/** + * End of servers configuration + */ + +/** + * Directories for saving/loading files from server + */ +$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload'; +$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; + +/** + * Whether to display icons or text or both icons and text in table row + * action segment. Value can be either of 'icons', 'text' or 'both'. + * default = 'both' + */ +//$cfg['RowActionType'] = 'icons'; + +/** + * Defines whether a user should be displayed a "show all (records)" + * button in browse mode or not. + * default = false + */ +//$cfg['ShowAll'] = true; + +/** + * Number of rows displayed when browsing a result set. If the result + * set contains more rows, "Previous" and "Next". + * Possible values: 25, 50, 100, 250, 500 + * default = 25 + */ +//$cfg['MaxRows'] = 50; + +/** + * Disallow editing of binary fields + * valid values are: + * false allow editing + * 'blob' allow editing except for BLOB fields + * 'noblob' disallow editing except for BLOB fields + * 'all' disallow editing + * default = 'blob' + */ +//$cfg['ProtectBinary'] = false; + +/** + * Default language to use, if not browser-defined or user-defined + * (you find all languages in the locale folder) + * uncomment the desired line: + * default = 'en' + */ +//$cfg['DefaultLang'] = 'en'; +//$cfg['DefaultLang'] = 'de'; + +/** + * How many columns should be used for table display of a database? + * (a value larger than 1 results in some information being hidden) + * default = 1 + */ +//$cfg['PropertiesNumColumns'] = 2; + +/** + * Set to true if you want DB-based query history.If false, this utilizes + * JS-routines to display query history (lost by window close) + * + * This requires configuration storage enabled, see above. + * default = false + */ +//$cfg['QueryHistoryDB'] = true; + +/** + * When using DB-based query history, how many entries should be kept? + * default = 25 + */ +//$cfg['QueryHistoryMax'] = 100; + +/** + * Whether or not to query the user before sending the error report to + * the phpMyAdmin team when a JavaScript error occurs + * + * Available options + * ('ask' | 'always' | 'never') + * default = 'ask' + */ +//$cfg['SendErrorReports'] = 'always'; + +/** + * You can find more configuration options in the documentation + * in the doc/ folder or at . + */ diff --git a/templates/Fedora/42/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/42/usr/lib/systemd/system/mariadb-copytls.service new file mode 100644 index 0000000..3f63078 --- /dev/null +++ b/templates/Fedora/42/usr/lib/systemd/system/mariadb-copytls.service @@ -0,0 +1,11 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Service] +Type=oneshot +ExecStartPre=mkdir -p /etc/my.cnf.d/certificates +ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/{{ mariadb_vhost }}/*.pem /etc/my.cnf.d/certificates/' +ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/42/usr/lib/systemd/system/mariadb-copytls.timer b/templates/Fedora/42/usr/lib/systemd/system/mariadb-copytls.timer new file mode 100644 index 0000000..8e5ad7b --- /dev/null +++ b/templates/Fedora/42/usr/lib/systemd/system/mariadb-copytls.timer @@ -0,0 +1,8 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Timer] +OnUnitActiveSec=5min + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/42/usr/lib/systemd/system/mariadb.service b/templates/Fedora/42/usr/lib/systemd/system/mariadb.service new file mode 100644 index 0000000..e1236bb --- /dev/null +++ b/templates/Fedora/42/usr/lib/systemd/system/mariadb.service @@ -0,0 +1,64 @@ +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, the +# best way is to: +# +# root> systemctl edit mariadb.service +# +# Then add additonal directives under a section (probably [Service]). +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 +# + +[Unit] +Description=MariaDB 10.11 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket +# '%n' expands to 'Full unit name'; man systemd.unit +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/templates/Fedora/42/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/42/usr/lib/systemd/system/mariadb@.service new file mode 100644 index 0000000..ef60ec1 --- /dev/null +++ b/templates/Fedora/42/usr/lib/systemd/system/mariadb@.service @@ -0,0 +1,85 @@ +# Multi instance version of MariaDB. For if you run mutiple verions at once. +# Also used for mariadb@bootstrap to bootstrap Galera. +# +# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in +# /etc/@my.cnf to change per instance settings. A minimumal necessary +# configuration items to change to avoid conflicts between instances is: +# +# [mariadbd.instancename] +# # TCP port to make available for clients +# port=3306 +# # Socket to make available for clients +# socket=/tmp/mariadb-instancename.sock +# # Where MariaDB should store all its data +# datadir=/usr/local/mariadb-instancename/data +# +# and start the service via: +# +# root> systemctl start mariadb@{instancename}.server +# +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, for +# all instances, the best way is: +# +# root> systemctl edit mariadb@.service +# +# Then add additonal directives under a section (probably [Service]). +# +# If you only want to change a specific instance: +# +# root> systemctl edit mariadb@{instancename}.server +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 + +[Unit] +Description=MariaDB 10.11 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/vars/Fedora-42-default.yml b/vars/Fedora-42-default.yml new file mode 100644 index 0000000..76c03d0 --- /dev/null +++ b/vars/Fedora-42-default.yml @@ -0,0 +1,130 @@ +--- +# vars file for ensure_mariadb +package_list: + - name: 'mariadb' + state: 'present' + - name: 'mariadb-server' + state: 'present' + - name: 'phpMyAdmin' + state: 'present' +firewall_list: + - permanent: 'yes' + service: 'mysql' + state: 'enabled' +service_list: + - name: 'httpd.service' + state: 'started' + enabled: 'yes' + - name: 'httpd-reload.timer' + state: 'started' + enabled: 'yes' + - name: 'php-fpm.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb-copytls.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb.service' + state: 'started' + enabled: 'yes' +template_list: + - dest: '/etc/my.cnf.d/client.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' + - dest: '/etc/my.cnf.d/mariadb-server.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' + - dest: '/etc/my.cnf.d/mysql-clients.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' + - dest: '/etc/my.cnf.d/spider.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' + - dest: '/etc/my.cnf.d/enable_encryption.preset' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' + - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' + - dest: '/etc/my.cnf.d/auth_gssapi.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' + - dest: '/etc/my.cnf.d/hashicorp_key_management.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/hashicorp_key_management.cnf' + - dest: '/etc/my.cnf.d/provider_bzip2.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_bzip2.cnf' + - dest: '/etc/my.cnf.d/provider_lz4.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lz4.cnf' + - dest: '/etc/my.cnf.d/provider_lzma.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lzma.cnf' + - dest: '/etc/my.cnf.d/provider_lzo.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lzo.cnf' + - dest: '/etc/my.cnf.d/provider_snappy.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_snappy.cnf' + - dest: '/etc/phpMyAdmin/config.inc.php' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' + - dest: '/etc/my.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' + - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' + - dest: '/usr/lib/systemd/system/mariadb.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' + - dest: '/usr/lib/systemd/system/mariadb@.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' + - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' + - dest: '/usr/lib/systemd/system/mariadb-copytls.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' From 476c3cd8e68a12f00fe813e90e65c119052611e9 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 25 May 2025 20:08:44 -0500 Subject: [PATCH 29/40] Handler improvements Signed-off-by: Jason Rothstein --- handlers/main.yml | 3 ++- tasks/main.yml | 14 ++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index 94c1744..c3b1242 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -11,7 +11,7 @@ - ensure_mariadb is defined ansible.builtin.systemd: daemon_reload: 'yes' -- name: 'ensure_mariadb.services' +- name: 'ensure_mariadb.service_restart' when: - ansible_system == 'Linux' - ensure_mariadb is defined @@ -25,3 +25,4 @@ loop: '{{ ensure_mariadb.service_list }}' loop_control: label: '{{ item.name }} will be restarted' +... diff --git a/tasks/main.yml b/tasks/main.yml index 5efad0a..0b6d8bd 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -49,7 +49,7 @@ - 'ensure_mariadb.package_facts' - 'ensure_mariadb.service_facts' - 'ensure_mariadb.service_reload' - - 'ensure_mariadb.services' + - 'ensure_mariadb.service_restart' - name: 'ensure packages' when: - ansible_system == 'Linux' @@ -66,7 +66,7 @@ - 'ensure_mariadb.package_facts' - 'ensure_mariadb.service_facts' - 'ensure_mariadb.service_reload' - - 'ensure_mariadb.services' + - 'ensure_mariadb.service_restart' - name: 'ensure seboolean' when: - ansible_system == 'Linux' @@ -84,7 +84,7 @@ - 'ensure_mariadb.package_facts' - 'ensure_mariadb.service_facts' - 'ensure_mariadb.service_reload' - - 'ensure_mariadb.services' + - 'ensure_mariadb.service_restart' - name: 'ensure configurations' when: - ansible_system == 'Linux' @@ -109,7 +109,7 @@ - 'ensure_mariadb.package_facts' - 'ensure_mariadb.service_facts' - 'ensure_mariadb.service_reload' - - 'ensure_mariadb.services' + - 'ensure_mariadb.service_restart' - name: 'ensure firewall' when: - ansible_system == 'Linux' @@ -129,7 +129,7 @@ - 'ensure_mariadb.package_facts' - 'ensure_mariadb.service_facts' - 'ensure_mariadb.service_reload' - - 'ensure_mariadb.services' + - 'ensure_mariadb.service_restart' - name: 'ensure services' when: - ansible_system == 'Linux' @@ -147,6 +147,8 @@ - 'ensure_mariadb.package_facts' - 'ensure_mariadb.service_facts' - 'ensure_mariadb.service_reload' - - 'ensure_mariadb.services' + - 'ensure_mariadb.service_restart' - name: 'flush handlers' meta: 'flush_handlers' +... + From 9fa1ad54c205aeb5bab3d78d3e7e08f1cbf04e30 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Wed, 29 Apr 2026 23:50:10 -0500 Subject: [PATCH 30/40] Fedora 43 and 44 --- .../43/etc/httpd/conf.d/phpMyAdmin.conf | 46 ++++++ templates/Fedora/43/etc/my.cnf | 11 ++ .../Fedora/43/etc/my.cnf.d/auth_gssapi.cnf | 2 + templates/Fedora/43/etc/my.cnf.d/client.cnf | 14 ++ .../etc/my.cnf.d/cracklib_password_check.cnf | 2 + .../43/etc/my.cnf.d/enable_encryption.preset | 20 +++ .../etc/my.cnf.d/hashicorp_key_management.cnf | 117 ++++++++++++++ .../Fedora/43/etc/my.cnf.d/mariadb-server.cnf | 59 +++++++ .../Fedora/43/etc/my.cnf.d/mysql-clients.cnf | 23 +++ .../Fedora/43/etc/my.cnf.d/provider_bzip2.cnf | 3 + .../Fedora/43/etc/my.cnf.d/provider_lz4.cnf | 3 + .../Fedora/43/etc/my.cnf.d/provider_lzma.cnf | 3 + .../Fedora/43/etc/my.cnf.d/provider_lzo.cnf | 3 + .../43/etc/my.cnf.d/provider_snappy.cnf | 3 + templates/Fedora/43/etc/my.cnf.d/spider.cnf | 7 + .../Fedora/43/etc/phpMyAdmin/config.inc.php | 153 ++++++++++++++++++ .../systemd/system/mariadb-copytls.service | 11 ++ .../lib/systemd/system/mariadb-copytls.timer | 8 + .../43/usr/lib/systemd/system/mariadb.service | 64 ++++++++ .../usr/lib/systemd/system/mariadb@.service | 85 ++++++++++ .../44/etc/httpd/conf.d/phpMyAdmin.conf | 46 ++++++ templates/Fedora/44/etc/my.cnf | 11 ++ .../Fedora/44/etc/my.cnf.d/auth_gssapi.cnf | 2 + templates/Fedora/44/etc/my.cnf.d/client.cnf | 14 ++ .../etc/my.cnf.d/cracklib_password_check.cnf | 2 + .../44/etc/my.cnf.d/enable_encryption.preset | 20 +++ .../etc/my.cnf.d/hashicorp_key_management.cnf | 117 ++++++++++++++ .../Fedora/44/etc/my.cnf.d/mariadb-server.cnf | 59 +++++++ .../Fedora/44/etc/my.cnf.d/mysql-clients.cnf | 23 +++ .../Fedora/44/etc/my.cnf.d/provider_bzip2.cnf | 3 + .../Fedora/44/etc/my.cnf.d/provider_lz4.cnf | 3 + .../Fedora/44/etc/my.cnf.d/provider_lzma.cnf | 3 + .../Fedora/44/etc/my.cnf.d/provider_lzo.cnf | 3 + .../44/etc/my.cnf.d/provider_snappy.cnf | 3 + templates/Fedora/44/etc/my.cnf.d/spider.cnf | 7 + .../Fedora/44/etc/phpMyAdmin/config.inc.php | 153 ++++++++++++++++++ .../systemd/system/mariadb-copytls.service | 11 ++ .../lib/systemd/system/mariadb-copytls.timer | 8 + .../44/usr/lib/systemd/system/mariadb.service | 64 ++++++++ .../usr/lib/systemd/system/mariadb@.service | 85 ++++++++++ vars/Fedora-43-default.yml | 130 +++++++++++++++ vars/Fedora-44-default.yml | 130 +++++++++++++++ 42 files changed, 1534 insertions(+) create mode 100644 templates/Fedora/43/etc/httpd/conf.d/phpMyAdmin.conf create mode 100644 templates/Fedora/43/etc/my.cnf create mode 100644 templates/Fedora/43/etc/my.cnf.d/auth_gssapi.cnf create mode 100644 templates/Fedora/43/etc/my.cnf.d/client.cnf create mode 100644 templates/Fedora/43/etc/my.cnf.d/cracklib_password_check.cnf create mode 100644 templates/Fedora/43/etc/my.cnf.d/enable_encryption.preset create mode 100644 templates/Fedora/43/etc/my.cnf.d/hashicorp_key_management.cnf create mode 100644 templates/Fedora/43/etc/my.cnf.d/mariadb-server.cnf create mode 100644 templates/Fedora/43/etc/my.cnf.d/mysql-clients.cnf create mode 100644 templates/Fedora/43/etc/my.cnf.d/provider_bzip2.cnf create mode 100644 templates/Fedora/43/etc/my.cnf.d/provider_lz4.cnf create mode 100644 templates/Fedora/43/etc/my.cnf.d/provider_lzma.cnf create mode 100644 templates/Fedora/43/etc/my.cnf.d/provider_lzo.cnf create mode 100644 templates/Fedora/43/etc/my.cnf.d/provider_snappy.cnf create mode 100644 templates/Fedora/43/etc/my.cnf.d/spider.cnf create mode 100644 templates/Fedora/43/etc/phpMyAdmin/config.inc.php create mode 100644 templates/Fedora/43/usr/lib/systemd/system/mariadb-copytls.service create mode 100644 templates/Fedora/43/usr/lib/systemd/system/mariadb-copytls.timer create mode 100644 templates/Fedora/43/usr/lib/systemd/system/mariadb.service create mode 100644 templates/Fedora/43/usr/lib/systemd/system/mariadb@.service create mode 100644 templates/Fedora/44/etc/httpd/conf.d/phpMyAdmin.conf create mode 100644 templates/Fedora/44/etc/my.cnf create mode 100644 templates/Fedora/44/etc/my.cnf.d/auth_gssapi.cnf create mode 100644 templates/Fedora/44/etc/my.cnf.d/client.cnf create mode 100644 templates/Fedora/44/etc/my.cnf.d/cracklib_password_check.cnf create mode 100644 templates/Fedora/44/etc/my.cnf.d/enable_encryption.preset create mode 100644 templates/Fedora/44/etc/my.cnf.d/hashicorp_key_management.cnf create mode 100644 templates/Fedora/44/etc/my.cnf.d/mariadb-server.cnf create mode 100644 templates/Fedora/44/etc/my.cnf.d/mysql-clients.cnf create mode 100644 templates/Fedora/44/etc/my.cnf.d/provider_bzip2.cnf create mode 100644 templates/Fedora/44/etc/my.cnf.d/provider_lz4.cnf create mode 100644 templates/Fedora/44/etc/my.cnf.d/provider_lzma.cnf create mode 100644 templates/Fedora/44/etc/my.cnf.d/provider_lzo.cnf create mode 100644 templates/Fedora/44/etc/my.cnf.d/provider_snappy.cnf create mode 100644 templates/Fedora/44/etc/my.cnf.d/spider.cnf create mode 100644 templates/Fedora/44/etc/phpMyAdmin/config.inc.php create mode 100644 templates/Fedora/44/usr/lib/systemd/system/mariadb-copytls.service create mode 100644 templates/Fedora/44/usr/lib/systemd/system/mariadb-copytls.timer create mode 100644 templates/Fedora/44/usr/lib/systemd/system/mariadb.service create mode 100644 templates/Fedora/44/usr/lib/systemd/system/mariadb@.service create mode 100644 vars/Fedora-43-default.yml create mode 100644 vars/Fedora-44-default.yml diff --git a/templates/Fedora/43/etc/httpd/conf.d/phpMyAdmin.conf b/templates/Fedora/43/etc/httpd/conf.d/phpMyAdmin.conf new file mode 100644 index 0000000..98738c7 --- /dev/null +++ b/templates/Fedora/43/etc/httpd/conf.d/phpMyAdmin.conf @@ -0,0 +1,46 @@ +# phpMyAdmin - Web based MySQL browser written in php +# +# Allows only localhost by default +# +# But allowing phpMyAdmin to anyone other than localhost should be considered +# dangerous unless properly secured by SSL + +Alias /phpMyAdmin /usr/share/phpMyAdmin +Alias /phpmyadmin /usr/share/phpMyAdmin + + + AddDefaultCharset UTF-8 + Require ssl + + + + Require local + + +# These directories do not require access over HTTP - taken from the original +# phpMyAdmin upstream tarball +# + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + +# This configuration prevents mod_security at phpMyAdmin directories from +# filtering SQL etc. This may break your mod_security implementation. +# +# +# +# SecRuleInheritance Off +# +# diff --git a/templates/Fedora/43/etc/my.cnf b/templates/Fedora/43/etc/my.cnf new file mode 100644 index 0000000..913b88f --- /dev/null +++ b/templates/Fedora/43/etc/my.cnf @@ -0,0 +1,11 @@ +# +# This group is read both both by the client and the server +# use it for options that affect everything +# +[client-server] + +# +# include all files from the config directory +# +!includedir /etc/my.cnf.d + diff --git a/templates/Fedora/43/etc/my.cnf.d/auth_gssapi.cnf b/templates/Fedora/43/etc/my.cnf.d/auth_gssapi.cnf new file mode 100644 index 0000000..c7cbc78 --- /dev/null +++ b/templates/Fedora/43/etc/my.cnf.d/auth_gssapi.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=auth_gssapi.so diff --git a/templates/Fedora/43/etc/my.cnf.d/client.cnf b/templates/Fedora/43/etc/my.cnf.d/client.cnf new file mode 100644 index 0000000..05442bf --- /dev/null +++ b/templates/Fedora/43/etc/my.cnf.d/client.cnf @@ -0,0 +1,14 @@ +# +# These two groups are read by the client library +# Use it for options that affect all clients, but not the server +# +[client] +default-character-set = utf8mb4 + +# This group is not read by mysql client library, +# If you use the same .cnf file for MySQL and MariaDB, +# use it for MariaDB-only client options +[client-mariadb] +ssl +ssl-verify-server-cert + diff --git a/templates/Fedora/43/etc/my.cnf.d/cracklib_password_check.cnf b/templates/Fedora/43/etc/my.cnf.d/cracklib_password_check.cnf new file mode 100644 index 0000000..72cbcb1 --- /dev/null +++ b/templates/Fedora/43/etc/my.cnf.d/cracklib_password_check.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=cracklib_password_check.so diff --git a/templates/Fedora/43/etc/my.cnf.d/enable_encryption.preset b/templates/Fedora/43/etc/my.cnf.d/enable_encryption.preset new file mode 100644 index 0000000..722db7e --- /dev/null +++ b/templates/Fedora/43/etc/my.cnf.d/enable_encryption.preset @@ -0,0 +1,20 @@ +# +# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d) +# and it will enable data at rest encryption. This is a simple way to +# ensure that everything that can be encrypted will be and your +# data will not leak unencrypted. +# +# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a +# newer version and your edits will be lost. Instead, add your edits +# to the .cnf file after the !include directive. +# +# NOTE that you also need to install an encryption plugin for the encryption +# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management +# +[mariadb] +aria-encrypt-tables +encrypt-binlog +encrypt-tmp-disk-tables +encrypt-tmp-files +loose-innodb-encrypt-log +loose-innodb-encrypt-tables diff --git a/templates/Fedora/43/etc/my.cnf.d/hashicorp_key_management.cnf b/templates/Fedora/43/etc/my.cnf.d/hashicorp_key_management.cnf new file mode 100644 index 0000000..275626a --- /dev/null +++ b/templates/Fedora/43/etc/my.cnf.d/hashicorp_key_management.cnf @@ -0,0 +1,117 @@ +# Copyright (C) 2019-2022 MariaDB Corporation +# +# This is a default configuration for the Hashicorp Vault plugin. +# You can read more about the parameters of this plugin in the +# hashicorp_key_management.txt file. +# +# NOTE THAT YOU MUST MANUALLY UNCOMMENT THE "plugin-load-add" +# LINE AND ALL THE NECESSARY PARAMETERS BELOW, SETTING THEM +# TO APPROPRIATE VALUES! +# +[mariadb] + +# +# To use Hashicorp Vault KMS, the plugin must be preloaded and +# activated on the server: +# +#plugin-load-add=hashicorp_key_management.so + +# Most of its parameters should not be changed during plugin +# operation and therefore must be preconfigured as part of +# the server configuration: + +# +# HTTP[s] URL that is used to connect to the Hashicorp Vault server. +# It must include the name of the scheme ("https://" for a secure +# connection) and, according to the API rules for storages of the +# key-value type in Hashicorp Vault, after the server address, the +# path must begin with the "/v1/" string (as prefix), for example: +# "https://127.0.0.1:8200/v1/my_secrets" +# +#hashicorp-key-management-vault-url="" + +# +# Authentication token that passed to the Hashicorp Vault +# in the request header: +# +#hashicorp-key-management-token="" + +# +# Optional path to the Certificate Authority (CA) bundle +# (is a file that contains root and intermediate certificates): +# +#hashicorp-key-management-vault-ca="" + +# +# Set the duration (in seconds) for the Hashicorp Vault server +# connection timeout. The allowed range is from 1 to 86400 seconds. +# The user can also specify a zero value, which means the default +# timeout value set by the libcurl library (currently 300 seconds): +# +#hashicorp-key-management-timeout=15 + +# +# Number of server request retries in case of timeout: +# +#hashicorp-key-management-retries=3 + +# +# Enable key caching (storing key values received from +# the Hashicorp Vault server in the local memory): +# +#hashicorp-key-management-caching-enabled="on" + +# +# This parameter instructs the plugin to use the key values +# or version numbers taken from the cache in the event of a +# timeout when accessing the vault server. By default this +# option is disabled. +# +# Please note that key values or version numbers will be read +# from the cache when the timeout expires only after the number +# of attempts to read them from the storage server that specified +# by the hashicorp-key-management-retries parameter has been +# exhausted: +# +#hashicorp-key-management-use-cache-on-timeout="off" + +# +# The time (in milliseconds) after which the value of the key +# stored in the cache becomes invalid and an attempt to read this +# data causes a new request send to the vault server. By default, +# cache entries become invalid after 60,000 milliseconds (after +# one minute). +# +# If the value of this parameter is zero, then the keys will always +# be considered invalid, but they still can be used if the vault +# server is unavailable and the corresponding cache operating mode +# (--[loose-]hashicorp-key-management-use-cache-on-timeout="on") +# is enabled. +# +#hashicorp-key-management-cache-timeout=0 + +# +# The time (in milliseconds) after which the information about +# latest version number of the key (which stored in the cache) +# becomes invalid and an attempt to read this information causes +# a new request send to the vault server. +# +# If the value of this parameter is zero, then information abount +# latest key version numbers always considered invalid, unless +# there is no communication with the vault server and use of the +# cache is allowed when the server is unavailable. +# +# By default, this parameter is zero, that is, the latest version +# numbers for the keys stored in the cache are considered always +# invalid, except when the vault server is unavailable and use +# of the cache is allowed on server failures. +# +#hashicorp-key-management-cache-version-timeout=0 + +# +# This parameter enables ("on", this is the default value) or disables +# ("off") checking the kv storage version during plugin initialization. +# The plugin requires storage to be version 2 or older in order for it +# to work properly. +# +#hashicorp-key-management-check-kv-version=on diff --git a/templates/Fedora/43/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/43/etc/my.cnf.d/mariadb-server.cnf new file mode 100644 index 0000000..3ae4a70 --- /dev/null +++ b/templates/Fedora/43/etc/my.cnf.d/mariadb-server.cnf @@ -0,0 +1,59 @@ +# +# These groups are read by MariaDB server. +# Use it for options that only the server (but not clients) should see +# +# See the examples of server my.cnf files in /usr/share/mysql/ +# + +# this is read by the standalone daemon and embedded servers +[server] + +# this is only for the mysqld standalone daemon +# Settings user and group are ignored when systemd is used. +# If you need to run mysqld under a different user or group, +# customize your systemd unit file for mysqld/mariadb according to the +# instructions in http://fedoraproject.org/wiki/Systemd +[mysqld] +datadir=/var/lib/mysql +socket=/var/lib/mysql/mysql.sock +log-error=/var/log/mariadb/mariadb.log +pid-file=/run/mariadb/mariadb.pid +character-set-server = utf8mb4 +ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm +ssl-key=/etc/my.cnf.d/certificates/privkey.epm +tls-version=TLSv1.2,TLSv1.3 + + +# +# * Galera-related settings +# +[galera] +# Mandatory settings +#wsrep_on=ON +#wsrep_provider= +#wsrep_cluster_address= +#binlog_format=row +#default_storage_engine=InnoDB +#innodb_autoinc_lock_mode=2 +# +# Allow server to accept connections on all interfaces. +# +#bind-address=0.0.0.0 +# +# Optional setting +#wsrep_slave_threads=1 +#innodb_flush_log_at_trx_commit=0 + +# this is only for embedded server +[embedded] + +# This group is only read by MariaDB servers, not by MySQL. +# If you use the same .cnf file for MySQL and MariaDB, +# you can put MariaDB-only options here +[mariadb] + +# This group is only read by MariaDB-10.11 servers. +# If you use the same .cnf file for MariaDB of different versions, +# use this group for options that older servers don't understand +[mariadb-10.11] + diff --git a/templates/Fedora/43/etc/my.cnf.d/mysql-clients.cnf b/templates/Fedora/43/etc/my.cnf.d/mysql-clients.cnf new file mode 100644 index 0000000..3df9b7b --- /dev/null +++ b/templates/Fedora/43/etc/my.cnf.d/mysql-clients.cnf @@ -0,0 +1,23 @@ +# +# These groups are read by MariaDB command-line tools +# Use it for options that affect only one utility +# + +[mysql] + +[mysql_upgrade] + +[mysqladmin] + +[mysqlbinlog] + +[mysqlcheck] + +[mysqldump] + +[mysqlimport] + +[mysqlshow] + +[mysqlslap] + diff --git a/templates/Fedora/43/etc/my.cnf.d/provider_bzip2.cnf b/templates/Fedora/43/etc/my.cnf.d/provider_bzip2.cnf new file mode 100644 index 0000000..9b855e8 --- /dev/null +++ b/templates/Fedora/43/etc/my.cnf.d/provider_bzip2.cnf @@ -0,0 +1,3 @@ +[server] +plugin_load_add=provider_bzip2 +provider_bzip2=force_plus_permanent diff --git a/templates/Fedora/43/etc/my.cnf.d/provider_lz4.cnf b/templates/Fedora/43/etc/my.cnf.d/provider_lz4.cnf new file mode 100644 index 0000000..0b8a3ec --- /dev/null +++ b/templates/Fedora/43/etc/my.cnf.d/provider_lz4.cnf @@ -0,0 +1,3 @@ +[server] +plugin_load_add=provider_lz4 +provider_lz4=force_plus_permanent diff --git a/templates/Fedora/43/etc/my.cnf.d/provider_lzma.cnf b/templates/Fedora/43/etc/my.cnf.d/provider_lzma.cnf new file mode 100644 index 0000000..3a05a35 --- /dev/null +++ b/templates/Fedora/43/etc/my.cnf.d/provider_lzma.cnf @@ -0,0 +1,3 @@ +[server] +plugin_load_add=provider_lzma +provider_lzma=force_plus_permanent diff --git a/templates/Fedora/43/etc/my.cnf.d/provider_lzo.cnf b/templates/Fedora/43/etc/my.cnf.d/provider_lzo.cnf new file mode 100644 index 0000000..6580198 --- /dev/null +++ b/templates/Fedora/43/etc/my.cnf.d/provider_lzo.cnf @@ -0,0 +1,3 @@ +[server] +plugin_load_add=provider_lzo +provider_lzo=force_plus_permanent diff --git a/templates/Fedora/43/etc/my.cnf.d/provider_snappy.cnf b/templates/Fedora/43/etc/my.cnf.d/provider_snappy.cnf new file mode 100644 index 0000000..da78207 --- /dev/null +++ b/templates/Fedora/43/etc/my.cnf.d/provider_snappy.cnf @@ -0,0 +1,3 @@ +[server] +plugin_load_add=provider_snappy +provider_snappy=force_plus_permanent diff --git a/templates/Fedora/43/etc/my.cnf.d/spider.cnf b/templates/Fedora/43/etc/my.cnf.d/spider.cnf new file mode 100644 index 0000000..ebc9968 --- /dev/null +++ b/templates/Fedora/43/etc/my.cnf.d/spider.cnf @@ -0,0 +1,7 @@ +[mariadb] +# +# Uncomment line to enable +# +#plugin-load-add = ha_spider + +# Read more at https://mariadb.com/kb/en/spider/ diff --git a/templates/Fedora/43/etc/phpMyAdmin/config.inc.php b/templates/Fedora/43/etc/phpMyAdmin/config.inc.php new file mode 100644 index 0000000..b973a14 --- /dev/null +++ b/templates/Fedora/43/etc/phpMyAdmin/config.inc.php @@ -0,0 +1,153 @@ +. + */ + +declare(strict_types=1); + +/** + * This is needed for cookie based authentication to encrypt password in + * cookie. Needs to be 32 chars long. + */ +$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ + +/** + * Servers configuration + */ +$i = 0; + +/** + * First server + */ +$i++; +/* Authentication type */ +$cfg['Servers'][$i]['auth_type'] = 'cookie'; +/* Server parameters */ +$cfg['Servers'][$i]['host'] = 'localhost'; +$cfg['Servers'][$i]['compress'] = false; +$cfg['Servers'][$i]['AllowNoPassword'] = false; + +/** + * phpMyAdmin configuration storage settings. + */ + +/* User used to manipulate with storage */ +// $cfg['Servers'][$i]['controlhost'] = ''; +// $cfg['Servers'][$i]['controlport'] = ''; +// $cfg['Servers'][$i]['controluser'] = 'pma'; +// $cfg['Servers'][$i]['controlpass'] = 'pmapass'; + +/* Storage database and tables */ +// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; +// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; +// $cfg['Servers'][$i]['relation'] = 'pma__relation'; +// $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; +// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; +// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; +// $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; +// $cfg['Servers'][$i]['history'] = 'pma__history'; +// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; +// $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; +// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; +// $cfg['Servers'][$i]['recent'] = 'pma__recent'; +// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; +// $cfg['Servers'][$i]['users'] = 'pma__users'; +// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; +// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; +// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; +// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; +// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; +// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; + +/** + * End of servers configuration + */ + +/** + * Directories for saving/loading files from server + */ +$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload'; +$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; + +/** + * Whether to display icons or text or both icons and text in table row + * action segment. Value can be either of 'icons', 'text' or 'both'. + * default = 'both' + */ +//$cfg['RowActionType'] = 'icons'; + +/** + * Defines whether a user should be displayed a "show all (records)" + * button in browse mode or not. + * default = false + */ +//$cfg['ShowAll'] = true; + +/** + * Number of rows displayed when browsing a result set. If the result + * set contains more rows, "Previous" and "Next". + * Possible values: 25, 50, 100, 250, 500 + * default = 25 + */ +//$cfg['MaxRows'] = 50; + +/** + * Disallow editing of binary fields + * valid values are: + * false allow editing + * 'blob' allow editing except for BLOB fields + * 'noblob' disallow editing except for BLOB fields + * 'all' disallow editing + * default = 'blob' + */ +//$cfg['ProtectBinary'] = false; + +/** + * Default language to use, if not browser-defined or user-defined + * (you find all languages in the locale folder) + * uncomment the desired line: + * default = 'en' + */ +//$cfg['DefaultLang'] = 'en'; +//$cfg['DefaultLang'] = 'de'; + +/** + * How many columns should be used for table display of a database? + * (a value larger than 1 results in some information being hidden) + * default = 1 + */ +//$cfg['PropertiesNumColumns'] = 2; + +/** + * Set to true if you want DB-based query history.If false, this utilizes + * JS-routines to display query history (lost by window close) + * + * This requires configuration storage enabled, see above. + * default = false + */ +//$cfg['QueryHistoryDB'] = true; + +/** + * When using DB-based query history, how many entries should be kept? + * default = 25 + */ +//$cfg['QueryHistoryMax'] = 100; + +/** + * Whether or not to query the user before sending the error report to + * the phpMyAdmin team when a JavaScript error occurs + * + * Available options + * ('ask' | 'always' | 'never') + * default = 'ask' + */ +//$cfg['SendErrorReports'] = 'always'; + +/** + * You can find more configuration options in the documentation + * in the doc/ folder or at . + */ diff --git a/templates/Fedora/43/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/43/usr/lib/systemd/system/mariadb-copytls.service new file mode 100644 index 0000000..3f63078 --- /dev/null +++ b/templates/Fedora/43/usr/lib/systemd/system/mariadb-copytls.service @@ -0,0 +1,11 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Service] +Type=oneshot +ExecStartPre=mkdir -p /etc/my.cnf.d/certificates +ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/{{ mariadb_vhost }}/*.pem /etc/my.cnf.d/certificates/' +ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/43/usr/lib/systemd/system/mariadb-copytls.timer b/templates/Fedora/43/usr/lib/systemd/system/mariadb-copytls.timer new file mode 100644 index 0000000..8e5ad7b --- /dev/null +++ b/templates/Fedora/43/usr/lib/systemd/system/mariadb-copytls.timer @@ -0,0 +1,8 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Timer] +OnUnitActiveSec=5min + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/43/usr/lib/systemd/system/mariadb.service b/templates/Fedora/43/usr/lib/systemd/system/mariadb.service new file mode 100644 index 0000000..e1236bb --- /dev/null +++ b/templates/Fedora/43/usr/lib/systemd/system/mariadb.service @@ -0,0 +1,64 @@ +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, the +# best way is to: +# +# root> systemctl edit mariadb.service +# +# Then add additonal directives under a section (probably [Service]). +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 +# + +[Unit] +Description=MariaDB 10.11 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket +# '%n' expands to 'Full unit name'; man systemd.unit +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/templates/Fedora/43/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/43/usr/lib/systemd/system/mariadb@.service new file mode 100644 index 0000000..ef60ec1 --- /dev/null +++ b/templates/Fedora/43/usr/lib/systemd/system/mariadb@.service @@ -0,0 +1,85 @@ +# Multi instance version of MariaDB. For if you run mutiple verions at once. +# Also used for mariadb@bootstrap to bootstrap Galera. +# +# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in +# /etc/@my.cnf to change per instance settings. A minimumal necessary +# configuration items to change to avoid conflicts between instances is: +# +# [mariadbd.instancename] +# # TCP port to make available for clients +# port=3306 +# # Socket to make available for clients +# socket=/tmp/mariadb-instancename.sock +# # Where MariaDB should store all its data +# datadir=/usr/local/mariadb-instancename/data +# +# and start the service via: +# +# root> systemctl start mariadb@{instancename}.server +# +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, for +# all instances, the best way is: +# +# root> systemctl edit mariadb@.service +# +# Then add additonal directives under a section (probably [Service]). +# +# If you only want to change a specific instance: +# +# root> systemctl edit mariadb@{instancename}.server +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 + +[Unit] +Description=MariaDB 10.11 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/templates/Fedora/44/etc/httpd/conf.d/phpMyAdmin.conf b/templates/Fedora/44/etc/httpd/conf.d/phpMyAdmin.conf new file mode 100644 index 0000000..98738c7 --- /dev/null +++ b/templates/Fedora/44/etc/httpd/conf.d/phpMyAdmin.conf @@ -0,0 +1,46 @@ +# phpMyAdmin - Web based MySQL browser written in php +# +# Allows only localhost by default +# +# But allowing phpMyAdmin to anyone other than localhost should be considered +# dangerous unless properly secured by SSL + +Alias /phpMyAdmin /usr/share/phpMyAdmin +Alias /phpmyadmin /usr/share/phpMyAdmin + + + AddDefaultCharset UTF-8 + Require ssl + + + + Require local + + +# These directories do not require access over HTTP - taken from the original +# phpMyAdmin upstream tarball +# + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + +# This configuration prevents mod_security at phpMyAdmin directories from +# filtering SQL etc. This may break your mod_security implementation. +# +# +# +# SecRuleInheritance Off +# +# diff --git a/templates/Fedora/44/etc/my.cnf b/templates/Fedora/44/etc/my.cnf new file mode 100644 index 0000000..913b88f --- /dev/null +++ b/templates/Fedora/44/etc/my.cnf @@ -0,0 +1,11 @@ +# +# This group is read both both by the client and the server +# use it for options that affect everything +# +[client-server] + +# +# include all files from the config directory +# +!includedir /etc/my.cnf.d + diff --git a/templates/Fedora/44/etc/my.cnf.d/auth_gssapi.cnf b/templates/Fedora/44/etc/my.cnf.d/auth_gssapi.cnf new file mode 100644 index 0000000..c7cbc78 --- /dev/null +++ b/templates/Fedora/44/etc/my.cnf.d/auth_gssapi.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=auth_gssapi.so diff --git a/templates/Fedora/44/etc/my.cnf.d/client.cnf b/templates/Fedora/44/etc/my.cnf.d/client.cnf new file mode 100644 index 0000000..05442bf --- /dev/null +++ b/templates/Fedora/44/etc/my.cnf.d/client.cnf @@ -0,0 +1,14 @@ +# +# These two groups are read by the client library +# Use it for options that affect all clients, but not the server +# +[client] +default-character-set = utf8mb4 + +# This group is not read by mysql client library, +# If you use the same .cnf file for MySQL and MariaDB, +# use it for MariaDB-only client options +[client-mariadb] +ssl +ssl-verify-server-cert + diff --git a/templates/Fedora/44/etc/my.cnf.d/cracklib_password_check.cnf b/templates/Fedora/44/etc/my.cnf.d/cracklib_password_check.cnf new file mode 100644 index 0000000..72cbcb1 --- /dev/null +++ b/templates/Fedora/44/etc/my.cnf.d/cracklib_password_check.cnf @@ -0,0 +1,2 @@ +[mariadb] +#plugin-load-add=cracklib_password_check.so diff --git a/templates/Fedora/44/etc/my.cnf.d/enable_encryption.preset b/templates/Fedora/44/etc/my.cnf.d/enable_encryption.preset new file mode 100644 index 0000000..722db7e --- /dev/null +++ b/templates/Fedora/44/etc/my.cnf.d/enable_encryption.preset @@ -0,0 +1,20 @@ +# +# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d) +# and it will enable data at rest encryption. This is a simple way to +# ensure that everything that can be encrypted will be and your +# data will not leak unencrypted. +# +# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a +# newer version and your edits will be lost. Instead, add your edits +# to the .cnf file after the !include directive. +# +# NOTE that you also need to install an encryption plugin for the encryption +# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management +# +[mariadb] +aria-encrypt-tables +encrypt-binlog +encrypt-tmp-disk-tables +encrypt-tmp-files +loose-innodb-encrypt-log +loose-innodb-encrypt-tables diff --git a/templates/Fedora/44/etc/my.cnf.d/hashicorp_key_management.cnf b/templates/Fedora/44/etc/my.cnf.d/hashicorp_key_management.cnf new file mode 100644 index 0000000..275626a --- /dev/null +++ b/templates/Fedora/44/etc/my.cnf.d/hashicorp_key_management.cnf @@ -0,0 +1,117 @@ +# Copyright (C) 2019-2022 MariaDB Corporation +# +# This is a default configuration for the Hashicorp Vault plugin. +# You can read more about the parameters of this plugin in the +# hashicorp_key_management.txt file. +# +# NOTE THAT YOU MUST MANUALLY UNCOMMENT THE "plugin-load-add" +# LINE AND ALL THE NECESSARY PARAMETERS BELOW, SETTING THEM +# TO APPROPRIATE VALUES! +# +[mariadb] + +# +# To use Hashicorp Vault KMS, the plugin must be preloaded and +# activated on the server: +# +#plugin-load-add=hashicorp_key_management.so + +# Most of its parameters should not be changed during plugin +# operation and therefore must be preconfigured as part of +# the server configuration: + +# +# HTTP[s] URL that is used to connect to the Hashicorp Vault server. +# It must include the name of the scheme ("https://" for a secure +# connection) and, according to the API rules for storages of the +# key-value type in Hashicorp Vault, after the server address, the +# path must begin with the "/v1/" string (as prefix), for example: +# "https://127.0.0.1:8200/v1/my_secrets" +# +#hashicorp-key-management-vault-url="" + +# +# Authentication token that passed to the Hashicorp Vault +# in the request header: +# +#hashicorp-key-management-token="" + +# +# Optional path to the Certificate Authority (CA) bundle +# (is a file that contains root and intermediate certificates): +# +#hashicorp-key-management-vault-ca="" + +# +# Set the duration (in seconds) for the Hashicorp Vault server +# connection timeout. The allowed range is from 1 to 86400 seconds. +# The user can also specify a zero value, which means the default +# timeout value set by the libcurl library (currently 300 seconds): +# +#hashicorp-key-management-timeout=15 + +# +# Number of server request retries in case of timeout: +# +#hashicorp-key-management-retries=3 + +# +# Enable key caching (storing key values received from +# the Hashicorp Vault server in the local memory): +# +#hashicorp-key-management-caching-enabled="on" + +# +# This parameter instructs the plugin to use the key values +# or version numbers taken from the cache in the event of a +# timeout when accessing the vault server. By default this +# option is disabled. +# +# Please note that key values or version numbers will be read +# from the cache when the timeout expires only after the number +# of attempts to read them from the storage server that specified +# by the hashicorp-key-management-retries parameter has been +# exhausted: +# +#hashicorp-key-management-use-cache-on-timeout="off" + +# +# The time (in milliseconds) after which the value of the key +# stored in the cache becomes invalid and an attempt to read this +# data causes a new request send to the vault server. By default, +# cache entries become invalid after 60,000 milliseconds (after +# one minute). +# +# If the value of this parameter is zero, then the keys will always +# be considered invalid, but they still can be used if the vault +# server is unavailable and the corresponding cache operating mode +# (--[loose-]hashicorp-key-management-use-cache-on-timeout="on") +# is enabled. +# +#hashicorp-key-management-cache-timeout=0 + +# +# The time (in milliseconds) after which the information about +# latest version number of the key (which stored in the cache) +# becomes invalid and an attempt to read this information causes +# a new request send to the vault server. +# +# If the value of this parameter is zero, then information abount +# latest key version numbers always considered invalid, unless +# there is no communication with the vault server and use of the +# cache is allowed when the server is unavailable. +# +# By default, this parameter is zero, that is, the latest version +# numbers for the keys stored in the cache are considered always +# invalid, except when the vault server is unavailable and use +# of the cache is allowed on server failures. +# +#hashicorp-key-management-cache-version-timeout=0 + +# +# This parameter enables ("on", this is the default value) or disables +# ("off") checking the kv storage version during plugin initialization. +# The plugin requires storage to be version 2 or older in order for it +# to work properly. +# +#hashicorp-key-management-check-kv-version=on diff --git a/templates/Fedora/44/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/44/etc/my.cnf.d/mariadb-server.cnf new file mode 100644 index 0000000..3ae4a70 --- /dev/null +++ b/templates/Fedora/44/etc/my.cnf.d/mariadb-server.cnf @@ -0,0 +1,59 @@ +# +# These groups are read by MariaDB server. +# Use it for options that only the server (but not clients) should see +# +# See the examples of server my.cnf files in /usr/share/mysql/ +# + +# this is read by the standalone daemon and embedded servers +[server] + +# this is only for the mysqld standalone daemon +# Settings user and group are ignored when systemd is used. +# If you need to run mysqld under a different user or group, +# customize your systemd unit file for mysqld/mariadb according to the +# instructions in http://fedoraproject.org/wiki/Systemd +[mysqld] +datadir=/var/lib/mysql +socket=/var/lib/mysql/mysql.sock +log-error=/var/log/mariadb/mariadb.log +pid-file=/run/mariadb/mariadb.pid +character-set-server = utf8mb4 +ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm +ssl-key=/etc/my.cnf.d/certificates/privkey.epm +tls-version=TLSv1.2,TLSv1.3 + + +# +# * Galera-related settings +# +[galera] +# Mandatory settings +#wsrep_on=ON +#wsrep_provider= +#wsrep_cluster_address= +#binlog_format=row +#default_storage_engine=InnoDB +#innodb_autoinc_lock_mode=2 +# +# Allow server to accept connections on all interfaces. +# +#bind-address=0.0.0.0 +# +# Optional setting +#wsrep_slave_threads=1 +#innodb_flush_log_at_trx_commit=0 + +# this is only for embedded server +[embedded] + +# This group is only read by MariaDB servers, not by MySQL. +# If you use the same .cnf file for MySQL and MariaDB, +# you can put MariaDB-only options here +[mariadb] + +# This group is only read by MariaDB-10.11 servers. +# If you use the same .cnf file for MariaDB of different versions, +# use this group for options that older servers don't understand +[mariadb-10.11] + diff --git a/templates/Fedora/44/etc/my.cnf.d/mysql-clients.cnf b/templates/Fedora/44/etc/my.cnf.d/mysql-clients.cnf new file mode 100644 index 0000000..3df9b7b --- /dev/null +++ b/templates/Fedora/44/etc/my.cnf.d/mysql-clients.cnf @@ -0,0 +1,23 @@ +# +# These groups are read by MariaDB command-line tools +# Use it for options that affect only one utility +# + +[mysql] + +[mysql_upgrade] + +[mysqladmin] + +[mysqlbinlog] + +[mysqlcheck] + +[mysqldump] + +[mysqlimport] + +[mysqlshow] + +[mysqlslap] + diff --git a/templates/Fedora/44/etc/my.cnf.d/provider_bzip2.cnf b/templates/Fedora/44/etc/my.cnf.d/provider_bzip2.cnf new file mode 100644 index 0000000..9b855e8 --- /dev/null +++ b/templates/Fedora/44/etc/my.cnf.d/provider_bzip2.cnf @@ -0,0 +1,3 @@ +[server] +plugin_load_add=provider_bzip2 +provider_bzip2=force_plus_permanent diff --git a/templates/Fedora/44/etc/my.cnf.d/provider_lz4.cnf b/templates/Fedora/44/etc/my.cnf.d/provider_lz4.cnf new file mode 100644 index 0000000..0b8a3ec --- /dev/null +++ b/templates/Fedora/44/etc/my.cnf.d/provider_lz4.cnf @@ -0,0 +1,3 @@ +[server] +plugin_load_add=provider_lz4 +provider_lz4=force_plus_permanent diff --git a/templates/Fedora/44/etc/my.cnf.d/provider_lzma.cnf b/templates/Fedora/44/etc/my.cnf.d/provider_lzma.cnf new file mode 100644 index 0000000..3a05a35 --- /dev/null +++ b/templates/Fedora/44/etc/my.cnf.d/provider_lzma.cnf @@ -0,0 +1,3 @@ +[server] +plugin_load_add=provider_lzma +provider_lzma=force_plus_permanent diff --git a/templates/Fedora/44/etc/my.cnf.d/provider_lzo.cnf b/templates/Fedora/44/etc/my.cnf.d/provider_lzo.cnf new file mode 100644 index 0000000..6580198 --- /dev/null +++ b/templates/Fedora/44/etc/my.cnf.d/provider_lzo.cnf @@ -0,0 +1,3 @@ +[server] +plugin_load_add=provider_lzo +provider_lzo=force_plus_permanent diff --git a/templates/Fedora/44/etc/my.cnf.d/provider_snappy.cnf b/templates/Fedora/44/etc/my.cnf.d/provider_snappy.cnf new file mode 100644 index 0000000..da78207 --- /dev/null +++ b/templates/Fedora/44/etc/my.cnf.d/provider_snappy.cnf @@ -0,0 +1,3 @@ +[server] +plugin_load_add=provider_snappy +provider_snappy=force_plus_permanent diff --git a/templates/Fedora/44/etc/my.cnf.d/spider.cnf b/templates/Fedora/44/etc/my.cnf.d/spider.cnf new file mode 100644 index 0000000..ebc9968 --- /dev/null +++ b/templates/Fedora/44/etc/my.cnf.d/spider.cnf @@ -0,0 +1,7 @@ +[mariadb] +# +# Uncomment line to enable +# +#plugin-load-add = ha_spider + +# Read more at https://mariadb.com/kb/en/spider/ diff --git a/templates/Fedora/44/etc/phpMyAdmin/config.inc.php b/templates/Fedora/44/etc/phpMyAdmin/config.inc.php new file mode 100644 index 0000000..b973a14 --- /dev/null +++ b/templates/Fedora/44/etc/phpMyAdmin/config.inc.php @@ -0,0 +1,153 @@ +. + */ + +declare(strict_types=1); + +/** + * This is needed for cookie based authentication to encrypt password in + * cookie. Needs to be 32 chars long. + */ +$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ + +/** + * Servers configuration + */ +$i = 0; + +/** + * First server + */ +$i++; +/* Authentication type */ +$cfg['Servers'][$i]['auth_type'] = 'cookie'; +/* Server parameters */ +$cfg['Servers'][$i]['host'] = 'localhost'; +$cfg['Servers'][$i]['compress'] = false; +$cfg['Servers'][$i]['AllowNoPassword'] = false; + +/** + * phpMyAdmin configuration storage settings. + */ + +/* User used to manipulate with storage */ +// $cfg['Servers'][$i]['controlhost'] = ''; +// $cfg['Servers'][$i]['controlport'] = ''; +// $cfg['Servers'][$i]['controluser'] = 'pma'; +// $cfg['Servers'][$i]['controlpass'] = 'pmapass'; + +/* Storage database and tables */ +// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; +// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; +// $cfg['Servers'][$i]['relation'] = 'pma__relation'; +// $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; +// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; +// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; +// $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; +// $cfg['Servers'][$i]['history'] = 'pma__history'; +// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; +// $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; +// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; +// $cfg['Servers'][$i]['recent'] = 'pma__recent'; +// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; +// $cfg['Servers'][$i]['users'] = 'pma__users'; +// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; +// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; +// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; +// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; +// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; +// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; + +/** + * End of servers configuration + */ + +/** + * Directories for saving/loading files from server + */ +$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload'; +$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; + +/** + * Whether to display icons or text or both icons and text in table row + * action segment. Value can be either of 'icons', 'text' or 'both'. + * default = 'both' + */ +//$cfg['RowActionType'] = 'icons'; + +/** + * Defines whether a user should be displayed a "show all (records)" + * button in browse mode or not. + * default = false + */ +//$cfg['ShowAll'] = true; + +/** + * Number of rows displayed when browsing a result set. If the result + * set contains more rows, "Previous" and "Next". + * Possible values: 25, 50, 100, 250, 500 + * default = 25 + */ +//$cfg['MaxRows'] = 50; + +/** + * Disallow editing of binary fields + * valid values are: + * false allow editing + * 'blob' allow editing except for BLOB fields + * 'noblob' disallow editing except for BLOB fields + * 'all' disallow editing + * default = 'blob' + */ +//$cfg['ProtectBinary'] = false; + +/** + * Default language to use, if not browser-defined or user-defined + * (you find all languages in the locale folder) + * uncomment the desired line: + * default = 'en' + */ +//$cfg['DefaultLang'] = 'en'; +//$cfg['DefaultLang'] = 'de'; + +/** + * How many columns should be used for table display of a database? + * (a value larger than 1 results in some information being hidden) + * default = 1 + */ +//$cfg['PropertiesNumColumns'] = 2; + +/** + * Set to true if you want DB-based query history.If false, this utilizes + * JS-routines to display query history (lost by window close) + * + * This requires configuration storage enabled, see above. + * default = false + */ +//$cfg['QueryHistoryDB'] = true; + +/** + * When using DB-based query history, how many entries should be kept? + * default = 25 + */ +//$cfg['QueryHistoryMax'] = 100; + +/** + * Whether or not to query the user before sending the error report to + * the phpMyAdmin team when a JavaScript error occurs + * + * Available options + * ('ask' | 'always' | 'never') + * default = 'ask' + */ +//$cfg['SendErrorReports'] = 'always'; + +/** + * You can find more configuration options in the documentation + * in the doc/ folder or at . + */ diff --git a/templates/Fedora/44/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/44/usr/lib/systemd/system/mariadb-copytls.service new file mode 100644 index 0000000..3f63078 --- /dev/null +++ b/templates/Fedora/44/usr/lib/systemd/system/mariadb-copytls.service @@ -0,0 +1,11 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Service] +Type=oneshot +ExecStartPre=mkdir -p /etc/my.cnf.d/certificates +ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/{{ mariadb_vhost }}/*.pem /etc/my.cnf.d/certificates/' +ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/44/usr/lib/systemd/system/mariadb-copytls.timer b/templates/Fedora/44/usr/lib/systemd/system/mariadb-copytls.timer new file mode 100644 index 0000000..8e5ad7b --- /dev/null +++ b/templates/Fedora/44/usr/lib/systemd/system/mariadb-copytls.timer @@ -0,0 +1,8 @@ +[Unit] +Description=Copy TLS Certificates for Mariadb + +[Timer] +OnUnitActiveSec=5min + +[Install] +WantedBy=mariadb.service diff --git a/templates/Fedora/44/usr/lib/systemd/system/mariadb.service b/templates/Fedora/44/usr/lib/systemd/system/mariadb.service new file mode 100644 index 0000000..e1236bb --- /dev/null +++ b/templates/Fedora/44/usr/lib/systemd/system/mariadb.service @@ -0,0 +1,64 @@ +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, the +# best way is to: +# +# root> systemctl edit mariadb.service +# +# Then add additonal directives under a section (probably [Service]). +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 +# + +[Unit] +Description=MariaDB 10.11 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket +# '%n' expands to 'Full unit name'; man systemd.unit +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/templates/Fedora/44/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/44/usr/lib/systemd/system/mariadb@.service new file mode 100644 index 0000000..ef60ec1 --- /dev/null +++ b/templates/Fedora/44/usr/lib/systemd/system/mariadb@.service @@ -0,0 +1,85 @@ +# Multi instance version of MariaDB. For if you run mutiple verions at once. +# Also used for mariadb@bootstrap to bootstrap Galera. +# +# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in +# /etc/@my.cnf to change per instance settings. A minimumal necessary +# configuration items to change to avoid conflicts between instances is: +# +# [mariadbd.instancename] +# # TCP port to make available for clients +# port=3306 +# # Socket to make available for clients +# socket=/tmp/mariadb-instancename.sock +# # Where MariaDB should store all its data +# datadir=/usr/local/mariadb-instancename/data +# +# and start the service via: +# +# root> systemctl start mariadb@{instancename}.server +# +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, for +# all instances, the best way is: +# +# root> systemctl edit mariadb@.service +# +# Then add additonal directives under a section (probably [Service]). +# +# If you only want to change a specific instance: +# +# root> systemctl edit mariadb@{instancename}.server +# +# For more info about custom unit files, see systemd.unit(5) or +# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# +# [Service] +# LimitNOFILE=10000 + +[Unit] +Description=MariaDB 10.11 database server +Documentation=man:mariadbd(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ +After=network.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + +[Service] +Type=notify +User=mysql +Group=mysql + +ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I +ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n +# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# per bug #547485 +ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I + +# Setting this to true can break replication and the Type=notify settings +# See also bind-address MariaDB option. +PrivateNetwork=false + +KillSignal=SIGTERM + +# Don't want to see an automated SIGKILL ever +SendSIGKILL=no + +# Restart crashed server only, on-failure would also restart, for example, when +# my.cnf contains unknown option +Restart=on-abort +RestartSec=5s + +UMask=007 + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true diff --git a/vars/Fedora-43-default.yml b/vars/Fedora-43-default.yml new file mode 100644 index 0000000..76c03d0 --- /dev/null +++ b/vars/Fedora-43-default.yml @@ -0,0 +1,130 @@ +--- +# vars file for ensure_mariadb +package_list: + - name: 'mariadb' + state: 'present' + - name: 'mariadb-server' + state: 'present' + - name: 'phpMyAdmin' + state: 'present' +firewall_list: + - permanent: 'yes' + service: 'mysql' + state: 'enabled' +service_list: + - name: 'httpd.service' + state: 'started' + enabled: 'yes' + - name: 'httpd-reload.timer' + state: 'started' + enabled: 'yes' + - name: 'php-fpm.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb-copytls.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb.service' + state: 'started' + enabled: 'yes' +template_list: + - dest: '/etc/my.cnf.d/client.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' + - dest: '/etc/my.cnf.d/mariadb-server.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' + - dest: '/etc/my.cnf.d/mysql-clients.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' + - dest: '/etc/my.cnf.d/spider.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' + - dest: '/etc/my.cnf.d/enable_encryption.preset' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' + - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' + - dest: '/etc/my.cnf.d/auth_gssapi.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' + - dest: '/etc/my.cnf.d/hashicorp_key_management.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/hashicorp_key_management.cnf' + - dest: '/etc/my.cnf.d/provider_bzip2.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_bzip2.cnf' + - dest: '/etc/my.cnf.d/provider_lz4.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lz4.cnf' + - dest: '/etc/my.cnf.d/provider_lzma.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lzma.cnf' + - dest: '/etc/my.cnf.d/provider_lzo.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lzo.cnf' + - dest: '/etc/my.cnf.d/provider_snappy.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_snappy.cnf' + - dest: '/etc/phpMyAdmin/config.inc.php' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' + - dest: '/etc/my.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' + - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' + - dest: '/usr/lib/systemd/system/mariadb.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' + - dest: '/usr/lib/systemd/system/mariadb@.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' + - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' + - dest: '/usr/lib/systemd/system/mariadb-copytls.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' diff --git a/vars/Fedora-44-default.yml b/vars/Fedora-44-default.yml new file mode 100644 index 0000000..76c03d0 --- /dev/null +++ b/vars/Fedora-44-default.yml @@ -0,0 +1,130 @@ +--- +# vars file for ensure_mariadb +package_list: + - name: 'mariadb' + state: 'present' + - name: 'mariadb-server' + state: 'present' + - name: 'phpMyAdmin' + state: 'present' +firewall_list: + - permanent: 'yes' + service: 'mysql' + state: 'enabled' +service_list: + - name: 'httpd.service' + state: 'started' + enabled: 'yes' + - name: 'httpd-reload.timer' + state: 'started' + enabled: 'yes' + - name: 'php-fpm.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb-copytls.service' + state: 'started' + enabled: 'yes' + - name: 'mariadb.service' + state: 'started' + enabled: 'yes' +template_list: + - dest: '/etc/my.cnf.d/client.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' + - dest: '/etc/my.cnf.d/mariadb-server.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' + - dest: '/etc/my.cnf.d/mysql-clients.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' + - dest: '/etc/my.cnf.d/spider.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' + - dest: '/etc/my.cnf.d/enable_encryption.preset' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' + - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' + - dest: '/etc/my.cnf.d/auth_gssapi.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' + - dest: '/etc/my.cnf.d/hashicorp_key_management.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/hashicorp_key_management.cnf' + - dest: '/etc/my.cnf.d/provider_bzip2.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_bzip2.cnf' + - dest: '/etc/my.cnf.d/provider_lz4.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lz4.cnf' + - dest: '/etc/my.cnf.d/provider_lzma.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lzma.cnf' + - dest: '/etc/my.cnf.d/provider_lzo.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lzo.cnf' + - dest: '/etc/my.cnf.d/provider_snappy.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_snappy.cnf' + - dest: '/etc/phpMyAdmin/config.inc.php' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' + - dest: '/etc/my.cnf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' + - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' + - dest: '/usr/lib/systemd/system/mariadb.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' + - dest: '/usr/lib/systemd/system/mariadb@.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' + - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' + - dest: '/usr/lib/systemd/system/mariadb-copytls.service' + group: 'root' + mode: '0644' + owner: 'root' + src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' From f73b0d0ce95aac797dc4ede88e64d1849d7de63b Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Tue, 5 May 2026 18:13:17 -0500 Subject: [PATCH 31/40] Fix ansible core 2.20 and supported OS list Signed-off-by: Jason Rothstein --- handlers/main.yml | 6 +- tasks/main.yml | 34 ++-- .../34/etc/httpd/conf.d/phpMyAdmin.conf | 46 ------ templates/Fedora/34/etc/my.cnf | 11 -- .../Fedora/34/etc/my.cnf.d/auth_gssapi.cnf | 2 - templates/Fedora/34/etc/my.cnf.d/client.cnf | 14 -- .../etc/my.cnf.d/cracklib_password_check.cnf | 2 - .../34/etc/my.cnf.d/enable_encryption.preset | 20 --- .../Fedora/34/etc/my.cnf.d/mariadb-server.cnf | 59 ------- .../Fedora/34/etc/my.cnf.d/mysql-clients.cnf | 23 --- templates/Fedora/34/etc/my.cnf.d/spider.cnf | 7 - .../Fedora/34/etc/phpMyAdmin/config.inc.php | 153 ------------------ .../systemd/system/mariadb-copytls.service | 11 -- .../lib/systemd/system/mariadb-copytls.timer | 8 - .../34/usr/lib/systemd/system/mariadb.service | 64 -------- .../usr/lib/systemd/system/mariadb@.service | 85 ---------- .../35/etc/httpd/conf.d/phpMyAdmin.conf | 46 ------ templates/Fedora/35/etc/my.cnf | 11 -- .../Fedora/35/etc/my.cnf.d/auth_gssapi.cnf | 2 - templates/Fedora/35/etc/my.cnf.d/client.cnf | 14 -- .../etc/my.cnf.d/cracklib_password_check.cnf | 2 - .../35/etc/my.cnf.d/enable_encryption.preset | 20 --- .../Fedora/35/etc/my.cnf.d/mariadb-server.cnf | 59 ------- .../Fedora/35/etc/my.cnf.d/mysql-clients.cnf | 23 --- templates/Fedora/35/etc/my.cnf.d/spider.cnf | 7 - .../Fedora/35/etc/phpMyAdmin/config.inc.php | 153 ------------------ .../systemd/system/mariadb-copytls.service | 11 -- .../lib/systemd/system/mariadb-copytls.timer | 8 - .../35/usr/lib/systemd/system/mariadb.service | 64 -------- .../usr/lib/systemd/system/mariadb@.service | 85 ---------- .../36/etc/httpd/conf.d/phpMyAdmin.conf | 46 ------ templates/Fedora/36/etc/my.cnf | 11 -- .../Fedora/36/etc/my.cnf.d/auth_gssapi.cnf | 2 - templates/Fedora/36/etc/my.cnf.d/client.cnf | 14 -- .../etc/my.cnf.d/cracklib_password_check.cnf | 2 - .../36/etc/my.cnf.d/enable_encryption.preset | 20 --- .../Fedora/36/etc/my.cnf.d/mariadb-server.cnf | 59 ------- .../Fedora/36/etc/my.cnf.d/mysql-clients.cnf | 23 --- templates/Fedora/36/etc/my.cnf.d/spider.cnf | 7 - .../Fedora/36/etc/phpMyAdmin/config.inc.php | 153 ------------------ .../systemd/system/mariadb-copytls.service | 11 -- .../lib/systemd/system/mariadb-copytls.timer | 8 - .../36/usr/lib/systemd/system/mariadb.service | 64 -------- .../usr/lib/systemd/system/mariadb@.service | 85 ---------- .../37/etc/httpd/conf.d/phpMyAdmin.conf | 46 ------ templates/Fedora/37/etc/my.cnf | 11 -- .../Fedora/37/etc/my.cnf.d/auth_gssapi.cnf | 2 - templates/Fedora/37/etc/my.cnf.d/client.cnf | 14 -- .../etc/my.cnf.d/cracklib_password_check.cnf | 2 - .../37/etc/my.cnf.d/enable_encryption.preset | 20 --- .../Fedora/37/etc/my.cnf.d/mariadb-server.cnf | 59 ------- .../Fedora/37/etc/my.cnf.d/mysql-clients.cnf | 23 --- templates/Fedora/37/etc/my.cnf.d/spider.cnf | 7 - .../Fedora/37/etc/phpMyAdmin/config.inc.php | 153 ------------------ .../systemd/system/mariadb-copytls.service | 11 -- .../lib/systemd/system/mariadb-copytls.timer | 8 - .../37/usr/lib/systemd/system/mariadb.service | 64 -------- .../usr/lib/systemd/system/mariadb@.service | 85 ---------- .../38/etc/httpd/conf.d/phpMyAdmin.conf | 46 ------ templates/Fedora/38/etc/my.cnf | 11 -- .../Fedora/38/etc/my.cnf.d/auth_gssapi.cnf | 2 - templates/Fedora/38/etc/my.cnf.d/client.cnf | 14 -- .../etc/my.cnf.d/cracklib_password_check.cnf | 2 - .../38/etc/my.cnf.d/enable_encryption.preset | 20 --- .../Fedora/38/etc/my.cnf.d/mariadb-server.cnf | 59 ------- .../Fedora/38/etc/my.cnf.d/mysql-clients.cnf | 23 --- templates/Fedora/38/etc/my.cnf.d/spider.cnf | 7 - .../Fedora/38/etc/phpMyAdmin/config.inc.php | 153 ------------------ .../systemd/system/mariadb-copytls.service | 11 -- .../lib/systemd/system/mariadb-copytls.timer | 8 - .../38/usr/lib/systemd/system/mariadb.service | 64 -------- .../usr/lib/systemd/system/mariadb@.service | 85 ---------- .../39/etc/httpd/conf.d/phpMyAdmin.conf | 46 ------ templates/Fedora/39/etc/my.cnf | 11 -- .../Fedora/39/etc/my.cnf.d/auth_gssapi.cnf | 2 - templates/Fedora/39/etc/my.cnf.d/client.cnf | 14 -- .../etc/my.cnf.d/cracklib_password_check.cnf | 2 - .../39/etc/my.cnf.d/enable_encryption.preset | 20 --- .../Fedora/39/etc/my.cnf.d/mariadb-server.cnf | 59 ------- .../Fedora/39/etc/my.cnf.d/mysql-clients.cnf | 23 --- templates/Fedora/39/etc/my.cnf.d/spider.cnf | 7 - .../Fedora/39/etc/phpMyAdmin/config.inc.php | 153 ------------------ .../systemd/system/mariadb-copytls.service | 11 -- .../lib/systemd/system/mariadb-copytls.timer | 8 - .../39/usr/lib/systemd/system/mariadb.service | 64 -------- .../usr/lib/systemd/system/mariadb@.service | 85 ---------- .../40/etc/httpd/conf.d/phpMyAdmin.conf | 46 ------ templates/Fedora/40/etc/my.cnf | 11 -- .../Fedora/40/etc/my.cnf.d/auth_gssapi.cnf | 2 - templates/Fedora/40/etc/my.cnf.d/client.cnf | 14 -- .../etc/my.cnf.d/cracklib_password_check.cnf | 2 - .../40/etc/my.cnf.d/enable_encryption.preset | 20 --- .../Fedora/40/etc/my.cnf.d/mariadb-server.cnf | 59 ------- .../Fedora/40/etc/my.cnf.d/mysql-clients.cnf | 23 --- templates/Fedora/40/etc/my.cnf.d/spider.cnf | 7 - .../Fedora/40/etc/phpMyAdmin/config.inc.php | 153 ------------------ .../systemd/system/mariadb-copytls.service | 11 -- .../lib/systemd/system/mariadb-copytls.timer | 8 - .../40/usr/lib/systemd/system/mariadb.service | 64 -------- .../usr/lib/systemd/system/mariadb@.service | 85 ---------- .../41/etc/httpd/conf.d/phpMyAdmin.conf | 46 ------ templates/Fedora/41/etc/my.cnf | 11 -- .../Fedora/41/etc/my.cnf.d/auth_gssapi.cnf | 2 - templates/Fedora/41/etc/my.cnf.d/client.cnf | 14 -- .../etc/my.cnf.d/cracklib_password_check.cnf | 2 - .../41/etc/my.cnf.d/enable_encryption.preset | 20 --- .../etc/my.cnf.d/hashicorp_key_management.cnf | 117 -------------- .../Fedora/41/etc/my.cnf.d/mariadb-server.cnf | 59 ------- .../Fedora/41/etc/my.cnf.d/mysql-clients.cnf | 23 --- .../Fedora/41/etc/my.cnf.d/provider_bzip2.cnf | 3 - .../Fedora/41/etc/my.cnf.d/provider_lz4.cnf | 3 - .../Fedora/41/etc/my.cnf.d/provider_lzma.cnf | 3 - .../Fedora/41/etc/my.cnf.d/provider_lzo.cnf | 3 - .../41/etc/my.cnf.d/provider_snappy.cnf | 3 - templates/Fedora/41/etc/my.cnf.d/spider.cnf | 7 - .../Fedora/41/etc/phpMyAdmin/config.inc.php | 153 ------------------ .../systemd/system/mariadb-copytls.service | 11 -- .../lib/systemd/system/mariadb-copytls.timer | 8 - .../41/usr/lib/systemd/system/mariadb.service | 64 -------- .../usr/lib/systemd/system/mariadb@.service | 85 ---------- vars/Fedora-34-default.yml | 100 ------------ vars/Fedora-35-default.yml | 100 ------------ vars/Fedora-36-default.yml | 100 ------------ vars/Fedora-37-default.yml | 100 ------------ vars/Fedora-38-default.yml | 100 ------------ vars/Fedora-39-default.yml | 100 ------------ vars/Fedora-40-default.yml | 100 ------------ vars/Fedora-41-default.yml | 130 --------------- vars/Fedora-42-default.yml | 40 ++--- vars/Fedora-43-default.yml | 40 ++--- vars/Fedora-44-default.yml | 40 ++--- 131 files changed, 80 insertions(+), 5082 deletions(-) delete mode 100644 templates/Fedora/34/etc/httpd/conf.d/phpMyAdmin.conf delete mode 100644 templates/Fedora/34/etc/my.cnf delete mode 100644 templates/Fedora/34/etc/my.cnf.d/auth_gssapi.cnf delete mode 100644 templates/Fedora/34/etc/my.cnf.d/client.cnf delete mode 100644 templates/Fedora/34/etc/my.cnf.d/cracklib_password_check.cnf delete mode 100644 templates/Fedora/34/etc/my.cnf.d/enable_encryption.preset delete mode 100644 templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf delete mode 100644 templates/Fedora/34/etc/my.cnf.d/mysql-clients.cnf delete mode 100644 templates/Fedora/34/etc/my.cnf.d/spider.cnf delete mode 100644 templates/Fedora/34/etc/phpMyAdmin/config.inc.php delete mode 100644 templates/Fedora/34/usr/lib/systemd/system/mariadb-copytls.service delete mode 100644 templates/Fedora/34/usr/lib/systemd/system/mariadb-copytls.timer delete mode 100644 templates/Fedora/34/usr/lib/systemd/system/mariadb.service delete mode 100644 templates/Fedora/34/usr/lib/systemd/system/mariadb@.service delete mode 100644 templates/Fedora/35/etc/httpd/conf.d/phpMyAdmin.conf delete mode 100644 templates/Fedora/35/etc/my.cnf delete mode 100644 templates/Fedora/35/etc/my.cnf.d/auth_gssapi.cnf delete mode 100644 templates/Fedora/35/etc/my.cnf.d/client.cnf delete mode 100644 templates/Fedora/35/etc/my.cnf.d/cracklib_password_check.cnf delete mode 100644 templates/Fedora/35/etc/my.cnf.d/enable_encryption.preset delete mode 100644 templates/Fedora/35/etc/my.cnf.d/mariadb-server.cnf delete mode 100644 templates/Fedora/35/etc/my.cnf.d/mysql-clients.cnf delete mode 100644 templates/Fedora/35/etc/my.cnf.d/spider.cnf delete mode 100644 templates/Fedora/35/etc/phpMyAdmin/config.inc.php delete mode 100644 templates/Fedora/35/usr/lib/systemd/system/mariadb-copytls.service delete mode 100644 templates/Fedora/35/usr/lib/systemd/system/mariadb-copytls.timer delete mode 100644 templates/Fedora/35/usr/lib/systemd/system/mariadb.service delete mode 100644 templates/Fedora/35/usr/lib/systemd/system/mariadb@.service delete mode 100644 templates/Fedora/36/etc/httpd/conf.d/phpMyAdmin.conf delete mode 100644 templates/Fedora/36/etc/my.cnf delete mode 100644 templates/Fedora/36/etc/my.cnf.d/auth_gssapi.cnf delete mode 100644 templates/Fedora/36/etc/my.cnf.d/client.cnf delete mode 100644 templates/Fedora/36/etc/my.cnf.d/cracklib_password_check.cnf delete mode 100644 templates/Fedora/36/etc/my.cnf.d/enable_encryption.preset delete mode 100644 templates/Fedora/36/etc/my.cnf.d/mariadb-server.cnf delete mode 100644 templates/Fedora/36/etc/my.cnf.d/mysql-clients.cnf delete mode 100644 templates/Fedora/36/etc/my.cnf.d/spider.cnf delete mode 100644 templates/Fedora/36/etc/phpMyAdmin/config.inc.php delete mode 100644 templates/Fedora/36/usr/lib/systemd/system/mariadb-copytls.service delete mode 100644 templates/Fedora/36/usr/lib/systemd/system/mariadb-copytls.timer delete mode 100644 templates/Fedora/36/usr/lib/systemd/system/mariadb.service delete mode 100644 templates/Fedora/36/usr/lib/systemd/system/mariadb@.service delete mode 100644 templates/Fedora/37/etc/httpd/conf.d/phpMyAdmin.conf delete mode 100644 templates/Fedora/37/etc/my.cnf delete mode 100644 templates/Fedora/37/etc/my.cnf.d/auth_gssapi.cnf delete mode 100644 templates/Fedora/37/etc/my.cnf.d/client.cnf delete mode 100644 templates/Fedora/37/etc/my.cnf.d/cracklib_password_check.cnf delete mode 100644 templates/Fedora/37/etc/my.cnf.d/enable_encryption.preset delete mode 100644 templates/Fedora/37/etc/my.cnf.d/mariadb-server.cnf delete mode 100644 templates/Fedora/37/etc/my.cnf.d/mysql-clients.cnf delete mode 100644 templates/Fedora/37/etc/my.cnf.d/spider.cnf delete mode 100644 templates/Fedora/37/etc/phpMyAdmin/config.inc.php delete mode 100644 templates/Fedora/37/usr/lib/systemd/system/mariadb-copytls.service delete mode 100644 templates/Fedora/37/usr/lib/systemd/system/mariadb-copytls.timer delete mode 100644 templates/Fedora/37/usr/lib/systemd/system/mariadb.service delete mode 100644 templates/Fedora/37/usr/lib/systemd/system/mariadb@.service delete mode 100644 templates/Fedora/38/etc/httpd/conf.d/phpMyAdmin.conf delete mode 100644 templates/Fedora/38/etc/my.cnf delete mode 100644 templates/Fedora/38/etc/my.cnf.d/auth_gssapi.cnf delete mode 100644 templates/Fedora/38/etc/my.cnf.d/client.cnf delete mode 100644 templates/Fedora/38/etc/my.cnf.d/cracklib_password_check.cnf delete mode 100644 templates/Fedora/38/etc/my.cnf.d/enable_encryption.preset delete mode 100644 templates/Fedora/38/etc/my.cnf.d/mariadb-server.cnf delete mode 100644 templates/Fedora/38/etc/my.cnf.d/mysql-clients.cnf delete mode 100644 templates/Fedora/38/etc/my.cnf.d/spider.cnf delete mode 100644 templates/Fedora/38/etc/phpMyAdmin/config.inc.php delete mode 100644 templates/Fedora/38/usr/lib/systemd/system/mariadb-copytls.service delete mode 100644 templates/Fedora/38/usr/lib/systemd/system/mariadb-copytls.timer delete mode 100644 templates/Fedora/38/usr/lib/systemd/system/mariadb.service delete mode 100644 templates/Fedora/38/usr/lib/systemd/system/mariadb@.service delete mode 100644 templates/Fedora/39/etc/httpd/conf.d/phpMyAdmin.conf delete mode 100644 templates/Fedora/39/etc/my.cnf delete mode 100644 templates/Fedora/39/etc/my.cnf.d/auth_gssapi.cnf delete mode 100644 templates/Fedora/39/etc/my.cnf.d/client.cnf delete mode 100644 templates/Fedora/39/etc/my.cnf.d/cracklib_password_check.cnf delete mode 100644 templates/Fedora/39/etc/my.cnf.d/enable_encryption.preset delete mode 100644 templates/Fedora/39/etc/my.cnf.d/mariadb-server.cnf delete mode 100644 templates/Fedora/39/etc/my.cnf.d/mysql-clients.cnf delete mode 100644 templates/Fedora/39/etc/my.cnf.d/spider.cnf delete mode 100644 templates/Fedora/39/etc/phpMyAdmin/config.inc.php delete mode 100644 templates/Fedora/39/usr/lib/systemd/system/mariadb-copytls.service delete mode 100644 templates/Fedora/39/usr/lib/systemd/system/mariadb-copytls.timer delete mode 100644 templates/Fedora/39/usr/lib/systemd/system/mariadb.service delete mode 100644 templates/Fedora/39/usr/lib/systemd/system/mariadb@.service delete mode 100644 templates/Fedora/40/etc/httpd/conf.d/phpMyAdmin.conf delete mode 100644 templates/Fedora/40/etc/my.cnf delete mode 100644 templates/Fedora/40/etc/my.cnf.d/auth_gssapi.cnf delete mode 100644 templates/Fedora/40/etc/my.cnf.d/client.cnf delete mode 100644 templates/Fedora/40/etc/my.cnf.d/cracklib_password_check.cnf delete mode 100644 templates/Fedora/40/etc/my.cnf.d/enable_encryption.preset delete mode 100644 templates/Fedora/40/etc/my.cnf.d/mariadb-server.cnf delete mode 100644 templates/Fedora/40/etc/my.cnf.d/mysql-clients.cnf delete mode 100644 templates/Fedora/40/etc/my.cnf.d/spider.cnf delete mode 100644 templates/Fedora/40/etc/phpMyAdmin/config.inc.php delete mode 100644 templates/Fedora/40/usr/lib/systemd/system/mariadb-copytls.service delete mode 100644 templates/Fedora/40/usr/lib/systemd/system/mariadb-copytls.timer delete mode 100644 templates/Fedora/40/usr/lib/systemd/system/mariadb.service delete mode 100644 templates/Fedora/40/usr/lib/systemd/system/mariadb@.service delete mode 100644 templates/Fedora/41/etc/httpd/conf.d/phpMyAdmin.conf delete mode 100644 templates/Fedora/41/etc/my.cnf delete mode 100644 templates/Fedora/41/etc/my.cnf.d/auth_gssapi.cnf delete mode 100644 templates/Fedora/41/etc/my.cnf.d/client.cnf delete mode 100644 templates/Fedora/41/etc/my.cnf.d/cracklib_password_check.cnf delete mode 100644 templates/Fedora/41/etc/my.cnf.d/enable_encryption.preset delete mode 100644 templates/Fedora/41/etc/my.cnf.d/hashicorp_key_management.cnf delete mode 100644 templates/Fedora/41/etc/my.cnf.d/mariadb-server.cnf delete mode 100644 templates/Fedora/41/etc/my.cnf.d/mysql-clients.cnf delete mode 100644 templates/Fedora/41/etc/my.cnf.d/provider_bzip2.cnf delete mode 100644 templates/Fedora/41/etc/my.cnf.d/provider_lz4.cnf delete mode 100644 templates/Fedora/41/etc/my.cnf.d/provider_lzma.cnf delete mode 100644 templates/Fedora/41/etc/my.cnf.d/provider_lzo.cnf delete mode 100644 templates/Fedora/41/etc/my.cnf.d/provider_snappy.cnf delete mode 100644 templates/Fedora/41/etc/my.cnf.d/spider.cnf delete mode 100644 templates/Fedora/41/etc/phpMyAdmin/config.inc.php delete mode 100644 templates/Fedora/41/usr/lib/systemd/system/mariadb-copytls.service delete mode 100644 templates/Fedora/41/usr/lib/systemd/system/mariadb-copytls.timer delete mode 100644 templates/Fedora/41/usr/lib/systemd/system/mariadb.service delete mode 100644 templates/Fedora/41/usr/lib/systemd/system/mariadb@.service delete mode 100644 vars/Fedora-34-default.yml delete mode 100644 vars/Fedora-35-default.yml delete mode 100644 vars/Fedora-36-default.yml delete mode 100644 vars/Fedora-37-default.yml delete mode 100644 vars/Fedora-38-default.yml delete mode 100644 vars/Fedora-39-default.yml delete mode 100644 vars/Fedora-40-default.yml delete mode 100644 vars/Fedora-41-default.yml diff --git a/handlers/main.yml b/handlers/main.yml index c3b1242..b0d3a2a 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -6,14 +6,14 @@ ansible.builtin.service_facts: - name: 'ensure_mariadb.service_reload' when: - - ansible_system == 'Linux' - - ansible_service_mgr == 'systemd' + - ansible_facts["system"] == 'Linux' + - ansible_facts["service_mgr"] == 'systemd' - ensure_mariadb is defined ansible.builtin.systemd: daemon_reload: 'yes' - name: 'ensure_mariadb.service_restart' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - ensure_mariadb is defined - ensure_mariadb.service_list is defined - ensure_mariadb.service_list is iterable diff --git a/tasks/main.yml b/tasks/main.yml index 0b6d8bd..69587a5 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -2,36 +2,36 @@ # tasks file for ensure_mariadb - name: 'include variables' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' include_vars: file: '{{ lookup("first_found", findme ) }}' name: 'ensure_mariadb' vars: findme: files: - - '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml' - - '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-default.yml' - - '{{ ansible_distribution }}-default.yml' - - '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml' - - '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}-default.yml' - - '{{ ansible_os_family }}-default.yml' + - '{{ ansible_facts["distribution"] }}-{{ ansible_facts["distribution_major_version"] }}-{{ ansible_facts["architecture"] }}.yml' + - '{{ ansible_facts["distribution"] }}-{{ ansible_facts["distribution_major_version"] }}-default.yml' + - '{{ ansible_facts["distribution"] }}-default.yml' + - '{{ ansible_facts["os_family"] }}-{{ ansible_facts["distribution_major_version"] }}-{{ ansible_facts["architecture"] }}.yml' + - '{{ ansible_facts["os_family"] }}-{{ ansible_facts["distribution_major_version"] }}-default.yml' + - '{{ ansible_facts["os_family"] }}-default.yml' - 'default.yml' paths: - '../vars/' errors: 'ignore' - name: 'package discovery' when: - - ansible_system == 'Linux' - - packages is not defined + - ansible_facts["system"] == 'Linux' + - ansible_facts["packages"] is not defined ansible.builtin.package_facts: - name: 'service discovery' when: - - ansible_system == 'Linux' - - services is not defined + - ansible_facts["system"] == 'Linux' + - ansible_facts["services"] is not defined ansible.builtin.service_facts: - name: 'ensure sysctl' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - ensure_mariadb is defined - ensure_mariadb.sysctl_list is defined - ensure_mariadb.sysctl_list is iterable @@ -52,7 +52,7 @@ - 'ensure_mariadb.service_restart' - name: 'ensure packages' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - ensure_mariadb is defined - ensure_mariadb.package_list is defined - ensure_mariadb.package_list is iterable @@ -69,7 +69,7 @@ - 'ensure_mariadb.service_restart' - name: 'ensure seboolean' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - ensure_mariadb is defined - ensure_mariadb.seboolean_list is defined - ensure_mariadb.seboolean_list is iterable @@ -87,7 +87,7 @@ - 'ensure_mariadb.service_restart' - name: 'ensure configurations' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - ensure_mariadb is defined - ensure_mariadb.template_list is defined - ensure_mariadb.template_list is iterable @@ -112,7 +112,7 @@ - 'ensure_mariadb.service_restart' - name: 'ensure firewall' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - packages["firewalld"] is defined - packages["python3-firewall"] is defined - ensure_mariadb is defined @@ -132,7 +132,7 @@ - 'ensure_mariadb.service_restart' - name: 'ensure services' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - ensure_mariadb is defined - ensure_mariadb.service_list is defined - ensure_mariadb.service_list is iterable diff --git a/templates/Fedora/34/etc/httpd/conf.d/phpMyAdmin.conf b/templates/Fedora/34/etc/httpd/conf.d/phpMyAdmin.conf deleted file mode 100644 index 98738c7..0000000 --- a/templates/Fedora/34/etc/httpd/conf.d/phpMyAdmin.conf +++ /dev/null @@ -1,46 +0,0 @@ -# phpMyAdmin - Web based MySQL browser written in php -# -# Allows only localhost by default -# -# But allowing phpMyAdmin to anyone other than localhost should be considered -# dangerous unless properly secured by SSL - -Alias /phpMyAdmin /usr/share/phpMyAdmin -Alias /phpmyadmin /usr/share/phpMyAdmin - - - AddDefaultCharset UTF-8 - Require ssl - - - - Require local - - -# These directories do not require access over HTTP - taken from the original -# phpMyAdmin upstream tarball -# - - Require all denied - - - - Require all denied - - - - Require all denied - - - - Require all denied - - -# This configuration prevents mod_security at phpMyAdmin directories from -# filtering SQL etc. This may break your mod_security implementation. -# -# -# -# SecRuleInheritance Off -# -# diff --git a/templates/Fedora/34/etc/my.cnf b/templates/Fedora/34/etc/my.cnf deleted file mode 100644 index 913b88f..0000000 --- a/templates/Fedora/34/etc/my.cnf +++ /dev/null @@ -1,11 +0,0 @@ -# -# This group is read both both by the client and the server -# use it for options that affect everything -# -[client-server] - -# -# include all files from the config directory -# -!includedir /etc/my.cnf.d - diff --git a/templates/Fedora/34/etc/my.cnf.d/auth_gssapi.cnf b/templates/Fedora/34/etc/my.cnf.d/auth_gssapi.cnf deleted file mode 100644 index c7cbc78..0000000 --- a/templates/Fedora/34/etc/my.cnf.d/auth_gssapi.cnf +++ /dev/null @@ -1,2 +0,0 @@ -[mariadb] -#plugin-load-add=auth_gssapi.so diff --git a/templates/Fedora/34/etc/my.cnf.d/client.cnf b/templates/Fedora/34/etc/my.cnf.d/client.cnf deleted file mode 100644 index 05442bf..0000000 --- a/templates/Fedora/34/etc/my.cnf.d/client.cnf +++ /dev/null @@ -1,14 +0,0 @@ -# -# These two groups are read by the client library -# Use it for options that affect all clients, but not the server -# -[client] -default-character-set = utf8mb4 - -# This group is not read by mysql client library, -# If you use the same .cnf file for MySQL and MariaDB, -# use it for MariaDB-only client options -[client-mariadb] -ssl -ssl-verify-server-cert - diff --git a/templates/Fedora/34/etc/my.cnf.d/cracklib_password_check.cnf b/templates/Fedora/34/etc/my.cnf.d/cracklib_password_check.cnf deleted file mode 100644 index 72cbcb1..0000000 --- a/templates/Fedora/34/etc/my.cnf.d/cracklib_password_check.cnf +++ /dev/null @@ -1,2 +0,0 @@ -[mariadb] -#plugin-load-add=cracklib_password_check.so diff --git a/templates/Fedora/34/etc/my.cnf.d/enable_encryption.preset b/templates/Fedora/34/etc/my.cnf.d/enable_encryption.preset deleted file mode 100644 index 722db7e..0000000 --- a/templates/Fedora/34/etc/my.cnf.d/enable_encryption.preset +++ /dev/null @@ -1,20 +0,0 @@ -# -# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d) -# and it will enable data at rest encryption. This is a simple way to -# ensure that everything that can be encrypted will be and your -# data will not leak unencrypted. -# -# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a -# newer version and your edits will be lost. Instead, add your edits -# to the .cnf file after the !include directive. -# -# NOTE that you also need to install an encryption plugin for the encryption -# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management -# -[mariadb] -aria-encrypt-tables -encrypt-binlog -encrypt-tmp-disk-tables -encrypt-tmp-files -loose-innodb-encrypt-log -loose-innodb-encrypt-tables diff --git a/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf deleted file mode 100644 index 7239135..0000000 --- a/templates/Fedora/34/etc/my.cnf.d/mariadb-server.cnf +++ /dev/null @@ -1,59 +0,0 @@ -# -# These groups are read by MariaDB server. -# Use it for options that only the server (but not clients) should see -# -# See the examples of server my.cnf files in /usr/share/mysql/ -# - -# this is read by the standalone daemon and embedded servers -[server] - -# this is only for the mysqld standalone daemon -# Settings user and group are ignored when systemd is used. -# If you need to run mysqld under a different user or group, -# customize your systemd unit file for mysqld/mariadb according to the -# instructions in http://fedoraproject.org/wiki/Systemd -[mysqld] -datadir=/var/lib/mysql -socket=/var/lib/mysql/mysql.sock -log-error=/var/log/mariadb/mariadb.log -pid-file=/run/mariadb/mariadb.pid -character-set-server = utf8mb4 -ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm -ssl-key=/etc/my.cnf.d/certificates/privkey.epm -tls-version=TLSv1.2,TLSv1.3 - - -# -# * Galera-related settings -# -[galera] -# Mandatory settings -#wsrep_on=ON -#wsrep_provider= -#wsrep_cluster_address= -#binlog_format=row -#default_storage_engine=InnoDB -#innodb_autoinc_lock_mode=2 -# -# Allow server to accept connections on all interfaces. -# -#bind-address=0.0.0.0 -# -# Optional setting -#wsrep_slave_threads=1 -#innodb_flush_log_at_trx_commit=0 - -# this is only for embedded server -[embedded] - -# This group is only read by MariaDB servers, not by MySQL. -# If you use the same .cnf file for MySQL and MariaDB, -# you can put MariaDB-only options here -[mariadb] - -# This group is only read by MariaDB-10.5 servers. -# If you use the same .cnf file for MariaDB of different versions, -# use this group for options that older servers don't understand -[mariadb-10.5] - diff --git a/templates/Fedora/34/etc/my.cnf.d/mysql-clients.cnf b/templates/Fedora/34/etc/my.cnf.d/mysql-clients.cnf deleted file mode 100644 index 3df9b7b..0000000 --- a/templates/Fedora/34/etc/my.cnf.d/mysql-clients.cnf +++ /dev/null @@ -1,23 +0,0 @@ -# -# These groups are read by MariaDB command-line tools -# Use it for options that affect only one utility -# - -[mysql] - -[mysql_upgrade] - -[mysqladmin] - -[mysqlbinlog] - -[mysqlcheck] - -[mysqldump] - -[mysqlimport] - -[mysqlshow] - -[mysqlslap] - diff --git a/templates/Fedora/34/etc/my.cnf.d/spider.cnf b/templates/Fedora/34/etc/my.cnf.d/spider.cnf deleted file mode 100644 index ebc9968..0000000 --- a/templates/Fedora/34/etc/my.cnf.d/spider.cnf +++ /dev/null @@ -1,7 +0,0 @@ -[mariadb] -# -# Uncomment line to enable -# -#plugin-load-add = ha_spider - -# Read more at https://mariadb.com/kb/en/spider/ diff --git a/templates/Fedora/34/etc/phpMyAdmin/config.inc.php b/templates/Fedora/34/etc/phpMyAdmin/config.inc.php deleted file mode 100644 index b973a14..0000000 --- a/templates/Fedora/34/etc/phpMyAdmin/config.inc.php +++ /dev/null @@ -1,153 +0,0 @@ -. - */ - -declare(strict_types=1); - -/** - * This is needed for cookie based authentication to encrypt password in - * cookie. Needs to be 32 chars long. - */ -$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ - -/** - * Servers configuration - */ -$i = 0; - -/** - * First server - */ -$i++; -/* Authentication type */ -$cfg['Servers'][$i]['auth_type'] = 'cookie'; -/* Server parameters */ -$cfg['Servers'][$i]['host'] = 'localhost'; -$cfg['Servers'][$i]['compress'] = false; -$cfg['Servers'][$i]['AllowNoPassword'] = false; - -/** - * phpMyAdmin configuration storage settings. - */ - -/* User used to manipulate with storage */ -// $cfg['Servers'][$i]['controlhost'] = ''; -// $cfg['Servers'][$i]['controlport'] = ''; -// $cfg['Servers'][$i]['controluser'] = 'pma'; -// $cfg['Servers'][$i]['controlpass'] = 'pmapass'; - -/* Storage database and tables */ -// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; -// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; -// $cfg['Servers'][$i]['relation'] = 'pma__relation'; -// $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; -// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; -// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; -// $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; -// $cfg['Servers'][$i]['history'] = 'pma__history'; -// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; -// $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; -// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; -// $cfg['Servers'][$i]['recent'] = 'pma__recent'; -// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; -// $cfg['Servers'][$i]['users'] = 'pma__users'; -// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; -// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; -// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; -// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; -// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; -// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; - -/** - * End of servers configuration - */ - -/** - * Directories for saving/loading files from server - */ -$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload'; -$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; - -/** - * Whether to display icons or text or both icons and text in table row - * action segment. Value can be either of 'icons', 'text' or 'both'. - * default = 'both' - */ -//$cfg['RowActionType'] = 'icons'; - -/** - * Defines whether a user should be displayed a "show all (records)" - * button in browse mode or not. - * default = false - */ -//$cfg['ShowAll'] = true; - -/** - * Number of rows displayed when browsing a result set. If the result - * set contains more rows, "Previous" and "Next". - * Possible values: 25, 50, 100, 250, 500 - * default = 25 - */ -//$cfg['MaxRows'] = 50; - -/** - * Disallow editing of binary fields - * valid values are: - * false allow editing - * 'blob' allow editing except for BLOB fields - * 'noblob' disallow editing except for BLOB fields - * 'all' disallow editing - * default = 'blob' - */ -//$cfg['ProtectBinary'] = false; - -/** - * Default language to use, if not browser-defined or user-defined - * (you find all languages in the locale folder) - * uncomment the desired line: - * default = 'en' - */ -//$cfg['DefaultLang'] = 'en'; -//$cfg['DefaultLang'] = 'de'; - -/** - * How many columns should be used for table display of a database? - * (a value larger than 1 results in some information being hidden) - * default = 1 - */ -//$cfg['PropertiesNumColumns'] = 2; - -/** - * Set to true if you want DB-based query history.If false, this utilizes - * JS-routines to display query history (lost by window close) - * - * This requires configuration storage enabled, see above. - * default = false - */ -//$cfg['QueryHistoryDB'] = true; - -/** - * When using DB-based query history, how many entries should be kept? - * default = 25 - */ -//$cfg['QueryHistoryMax'] = 100; - -/** - * Whether or not to query the user before sending the error report to - * the phpMyAdmin team when a JavaScript error occurs - * - * Available options - * ('ask' | 'always' | 'never') - * default = 'ask' - */ -//$cfg['SendErrorReports'] = 'always'; - -/** - * You can find more configuration options in the documentation - * in the doc/ folder or at . - */ diff --git a/templates/Fedora/34/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/34/usr/lib/systemd/system/mariadb-copytls.service deleted file mode 100644 index 3f63078..0000000 --- a/templates/Fedora/34/usr/lib/systemd/system/mariadb-copytls.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Copy TLS Certificates for Mariadb - -[Service] -Type=oneshot -ExecStartPre=mkdir -p /etc/my.cnf.d/certificates -ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/{{ mariadb_vhost }}/*.pem /etc/my.cnf.d/certificates/' -ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates - -[Install] -WantedBy=mariadb.service diff --git a/templates/Fedora/34/usr/lib/systemd/system/mariadb-copytls.timer b/templates/Fedora/34/usr/lib/systemd/system/mariadb-copytls.timer deleted file mode 100644 index 8e5ad7b..0000000 --- a/templates/Fedora/34/usr/lib/systemd/system/mariadb-copytls.timer +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Copy TLS Certificates for Mariadb - -[Timer] -OnUnitActiveSec=5min - -[Install] -WantedBy=mariadb.service diff --git a/templates/Fedora/34/usr/lib/systemd/system/mariadb.service b/templates/Fedora/34/usr/lib/systemd/system/mariadb.service deleted file mode 100644 index d61fd82..0000000 --- a/templates/Fedora/34/usr/lib/systemd/system/mariadb.service +++ /dev/null @@ -1,64 +0,0 @@ -# It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, the -# best way is to: -# -# root> systemctl edit mariadb.service -# -# Then add additonal directives under a section (probably [Service]). -# -# For more info about custom unit files, see systemd.unit(5) or -# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F -# -# For example, if you want to increase MariaDB's open-files-limit to 10000, -# you need to increase systemd's LimitNOFILE setting, use the contents below: -# -# [Service] -# LimitNOFILE=10000 -# - -[Unit] -Description=MariaDB 10.5 database server -Documentation=man:mariadbd(8) -Documentation=https://mariadb.com/kb/en/library/systemd/ -After=network.target - -[Install] -WantedBy=multi-user.target -Alias=mysql.service -Alias=mysqld.service - -[Service] -Type=notify -User=mysql -Group=mysql - -ExecStartPre=/usr/libexec/mariadb-check-socket -# '%n' expands to 'Full unit name'; man systemd.unit -ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n -# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug #547485 -ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER -ExecStartPost=/usr/libexec/mariadb-check-upgrade - -# Setting this to true can break replication and the Type=notify settings -# See also bind-address MariaDB option. -PrivateNetwork=false - -KillSignal=SIGTERM - -# Don't want to see an automated SIGKILL ever -SendSIGKILL=no - -# Restart crashed server only, on-failure would also restart, for example, when -# my.cnf contains unknown option -Restart=on-abort -RestartSec=5s - -UMask=007 - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true diff --git a/templates/Fedora/34/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/34/usr/lib/systemd/system/mariadb@.service deleted file mode 100644 index 10ca8fd..0000000 --- a/templates/Fedora/34/usr/lib/systemd/system/mariadb@.service +++ /dev/null @@ -1,85 +0,0 @@ -# Multi instance version of MariaDB. For if you run mutiple verions at once. -# Also used for mariadb@bootstrap to bootstrap Galera. -# -# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in -# /etc/@my.cnf to change per instance settings. A minimumal necessary -# configuration items to change to avoid conflicts between instances is: -# -# [mariadbd.instancename] -# # TCP port to make available for clients -# port=3306 -# # Socket to make available for clients -# socket=/tmp/mariadb-instancename.sock -# # Where MariaDB should store all its data -# datadir=/usr/local/mariadb-instancename/data -# -# and start the service via: -# -# root> systemctl start mariadb@{instancename}.server -# -# It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, for -# all instances, the best way is: -# -# root> systemctl edit mariadb@.service -# -# Then add additonal directives under a section (probably [Service]). -# -# If you only want to change a specific instance: -# -# root> systemctl edit mariadb@{instancename}.server -# -# For more info about custom unit files, see systemd.unit(5) or -# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F -# -# For example, if you want to increase MariaDB's open-files-limit to 10000, -# you need to increase systemd's LimitNOFILE setting, use the contents below: -# -# [Service] -# LimitNOFILE=10000 - -[Unit] -Description=MariaDB 10.5 database server -Documentation=man:mariadbd(8) -Documentation=https://mariadb.com/kb/en/library/systemd/ -After=network.target - -[Install] -WantedBy=multi-user.target -Alias=mysql.service -Alias=mysqld.service - -[Service] -Type=notify -User=mysql -Group=mysql - -ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I -ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n -# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug #547485 -ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER -ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I - -# Setting this to true can break replication and the Type=notify settings -# See also bind-address MariaDB option. -PrivateNetwork=false - -KillSignal=SIGTERM - -# Don't want to see an automated SIGKILL ever -SendSIGKILL=no - -# Restart crashed server only, on-failure would also restart, for example, when -# my.cnf contains unknown option -Restart=on-abort -RestartSec=5s - -UMask=007 - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true diff --git a/templates/Fedora/35/etc/httpd/conf.d/phpMyAdmin.conf b/templates/Fedora/35/etc/httpd/conf.d/phpMyAdmin.conf deleted file mode 100644 index 98738c7..0000000 --- a/templates/Fedora/35/etc/httpd/conf.d/phpMyAdmin.conf +++ /dev/null @@ -1,46 +0,0 @@ -# phpMyAdmin - Web based MySQL browser written in php -# -# Allows only localhost by default -# -# But allowing phpMyAdmin to anyone other than localhost should be considered -# dangerous unless properly secured by SSL - -Alias /phpMyAdmin /usr/share/phpMyAdmin -Alias /phpmyadmin /usr/share/phpMyAdmin - - - AddDefaultCharset UTF-8 - Require ssl - - - - Require local - - -# These directories do not require access over HTTP - taken from the original -# phpMyAdmin upstream tarball -# - - Require all denied - - - - Require all denied - - - - Require all denied - - - - Require all denied - - -# This configuration prevents mod_security at phpMyAdmin directories from -# filtering SQL etc. This may break your mod_security implementation. -# -# -# -# SecRuleInheritance Off -# -# diff --git a/templates/Fedora/35/etc/my.cnf b/templates/Fedora/35/etc/my.cnf deleted file mode 100644 index 913b88f..0000000 --- a/templates/Fedora/35/etc/my.cnf +++ /dev/null @@ -1,11 +0,0 @@ -# -# This group is read both both by the client and the server -# use it for options that affect everything -# -[client-server] - -# -# include all files from the config directory -# -!includedir /etc/my.cnf.d - diff --git a/templates/Fedora/35/etc/my.cnf.d/auth_gssapi.cnf b/templates/Fedora/35/etc/my.cnf.d/auth_gssapi.cnf deleted file mode 100644 index c7cbc78..0000000 --- a/templates/Fedora/35/etc/my.cnf.d/auth_gssapi.cnf +++ /dev/null @@ -1,2 +0,0 @@ -[mariadb] -#plugin-load-add=auth_gssapi.so diff --git a/templates/Fedora/35/etc/my.cnf.d/client.cnf b/templates/Fedora/35/etc/my.cnf.d/client.cnf deleted file mode 100644 index 05442bf..0000000 --- a/templates/Fedora/35/etc/my.cnf.d/client.cnf +++ /dev/null @@ -1,14 +0,0 @@ -# -# These two groups are read by the client library -# Use it for options that affect all clients, but not the server -# -[client] -default-character-set = utf8mb4 - -# This group is not read by mysql client library, -# If you use the same .cnf file for MySQL and MariaDB, -# use it for MariaDB-only client options -[client-mariadb] -ssl -ssl-verify-server-cert - diff --git a/templates/Fedora/35/etc/my.cnf.d/cracklib_password_check.cnf b/templates/Fedora/35/etc/my.cnf.d/cracklib_password_check.cnf deleted file mode 100644 index 72cbcb1..0000000 --- a/templates/Fedora/35/etc/my.cnf.d/cracklib_password_check.cnf +++ /dev/null @@ -1,2 +0,0 @@ -[mariadb] -#plugin-load-add=cracklib_password_check.so diff --git a/templates/Fedora/35/etc/my.cnf.d/enable_encryption.preset b/templates/Fedora/35/etc/my.cnf.d/enable_encryption.preset deleted file mode 100644 index 722db7e..0000000 --- a/templates/Fedora/35/etc/my.cnf.d/enable_encryption.preset +++ /dev/null @@ -1,20 +0,0 @@ -# -# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d) -# and it will enable data at rest encryption. This is a simple way to -# ensure that everything that can be encrypted will be and your -# data will not leak unencrypted. -# -# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a -# newer version and your edits will be lost. Instead, add your edits -# to the .cnf file after the !include directive. -# -# NOTE that you also need to install an encryption plugin for the encryption -# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management -# -[mariadb] -aria-encrypt-tables -encrypt-binlog -encrypt-tmp-disk-tables -encrypt-tmp-files -loose-innodb-encrypt-log -loose-innodb-encrypt-tables diff --git a/templates/Fedora/35/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/35/etc/my.cnf.d/mariadb-server.cnf deleted file mode 100644 index 7239135..0000000 --- a/templates/Fedora/35/etc/my.cnf.d/mariadb-server.cnf +++ /dev/null @@ -1,59 +0,0 @@ -# -# These groups are read by MariaDB server. -# Use it for options that only the server (but not clients) should see -# -# See the examples of server my.cnf files in /usr/share/mysql/ -# - -# this is read by the standalone daemon and embedded servers -[server] - -# this is only for the mysqld standalone daemon -# Settings user and group are ignored when systemd is used. -# If you need to run mysqld under a different user or group, -# customize your systemd unit file for mysqld/mariadb according to the -# instructions in http://fedoraproject.org/wiki/Systemd -[mysqld] -datadir=/var/lib/mysql -socket=/var/lib/mysql/mysql.sock -log-error=/var/log/mariadb/mariadb.log -pid-file=/run/mariadb/mariadb.pid -character-set-server = utf8mb4 -ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm -ssl-key=/etc/my.cnf.d/certificates/privkey.epm -tls-version=TLSv1.2,TLSv1.3 - - -# -# * Galera-related settings -# -[galera] -# Mandatory settings -#wsrep_on=ON -#wsrep_provider= -#wsrep_cluster_address= -#binlog_format=row -#default_storage_engine=InnoDB -#innodb_autoinc_lock_mode=2 -# -# Allow server to accept connections on all interfaces. -# -#bind-address=0.0.0.0 -# -# Optional setting -#wsrep_slave_threads=1 -#innodb_flush_log_at_trx_commit=0 - -# this is only for embedded server -[embedded] - -# This group is only read by MariaDB servers, not by MySQL. -# If you use the same .cnf file for MySQL and MariaDB, -# you can put MariaDB-only options here -[mariadb] - -# This group is only read by MariaDB-10.5 servers. -# If you use the same .cnf file for MariaDB of different versions, -# use this group for options that older servers don't understand -[mariadb-10.5] - diff --git a/templates/Fedora/35/etc/my.cnf.d/mysql-clients.cnf b/templates/Fedora/35/etc/my.cnf.d/mysql-clients.cnf deleted file mode 100644 index 3df9b7b..0000000 --- a/templates/Fedora/35/etc/my.cnf.d/mysql-clients.cnf +++ /dev/null @@ -1,23 +0,0 @@ -# -# These groups are read by MariaDB command-line tools -# Use it for options that affect only one utility -# - -[mysql] - -[mysql_upgrade] - -[mysqladmin] - -[mysqlbinlog] - -[mysqlcheck] - -[mysqldump] - -[mysqlimport] - -[mysqlshow] - -[mysqlslap] - diff --git a/templates/Fedora/35/etc/my.cnf.d/spider.cnf b/templates/Fedora/35/etc/my.cnf.d/spider.cnf deleted file mode 100644 index ebc9968..0000000 --- a/templates/Fedora/35/etc/my.cnf.d/spider.cnf +++ /dev/null @@ -1,7 +0,0 @@ -[mariadb] -# -# Uncomment line to enable -# -#plugin-load-add = ha_spider - -# Read more at https://mariadb.com/kb/en/spider/ diff --git a/templates/Fedora/35/etc/phpMyAdmin/config.inc.php b/templates/Fedora/35/etc/phpMyAdmin/config.inc.php deleted file mode 100644 index b973a14..0000000 --- a/templates/Fedora/35/etc/phpMyAdmin/config.inc.php +++ /dev/null @@ -1,153 +0,0 @@ -. - */ - -declare(strict_types=1); - -/** - * This is needed for cookie based authentication to encrypt password in - * cookie. Needs to be 32 chars long. - */ -$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ - -/** - * Servers configuration - */ -$i = 0; - -/** - * First server - */ -$i++; -/* Authentication type */ -$cfg['Servers'][$i]['auth_type'] = 'cookie'; -/* Server parameters */ -$cfg['Servers'][$i]['host'] = 'localhost'; -$cfg['Servers'][$i]['compress'] = false; -$cfg['Servers'][$i]['AllowNoPassword'] = false; - -/** - * phpMyAdmin configuration storage settings. - */ - -/* User used to manipulate with storage */ -// $cfg['Servers'][$i]['controlhost'] = ''; -// $cfg['Servers'][$i]['controlport'] = ''; -// $cfg['Servers'][$i]['controluser'] = 'pma'; -// $cfg['Servers'][$i]['controlpass'] = 'pmapass'; - -/* Storage database and tables */ -// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; -// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; -// $cfg['Servers'][$i]['relation'] = 'pma__relation'; -// $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; -// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; -// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; -// $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; -// $cfg['Servers'][$i]['history'] = 'pma__history'; -// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; -// $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; -// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; -// $cfg['Servers'][$i]['recent'] = 'pma__recent'; -// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; -// $cfg['Servers'][$i]['users'] = 'pma__users'; -// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; -// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; -// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; -// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; -// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; -// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; - -/** - * End of servers configuration - */ - -/** - * Directories for saving/loading files from server - */ -$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload'; -$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; - -/** - * Whether to display icons or text or both icons and text in table row - * action segment. Value can be either of 'icons', 'text' or 'both'. - * default = 'both' - */ -//$cfg['RowActionType'] = 'icons'; - -/** - * Defines whether a user should be displayed a "show all (records)" - * button in browse mode or not. - * default = false - */ -//$cfg['ShowAll'] = true; - -/** - * Number of rows displayed when browsing a result set. If the result - * set contains more rows, "Previous" and "Next". - * Possible values: 25, 50, 100, 250, 500 - * default = 25 - */ -//$cfg['MaxRows'] = 50; - -/** - * Disallow editing of binary fields - * valid values are: - * false allow editing - * 'blob' allow editing except for BLOB fields - * 'noblob' disallow editing except for BLOB fields - * 'all' disallow editing - * default = 'blob' - */ -//$cfg['ProtectBinary'] = false; - -/** - * Default language to use, if not browser-defined or user-defined - * (you find all languages in the locale folder) - * uncomment the desired line: - * default = 'en' - */ -//$cfg['DefaultLang'] = 'en'; -//$cfg['DefaultLang'] = 'de'; - -/** - * How many columns should be used for table display of a database? - * (a value larger than 1 results in some information being hidden) - * default = 1 - */ -//$cfg['PropertiesNumColumns'] = 2; - -/** - * Set to true if you want DB-based query history.If false, this utilizes - * JS-routines to display query history (lost by window close) - * - * This requires configuration storage enabled, see above. - * default = false - */ -//$cfg['QueryHistoryDB'] = true; - -/** - * When using DB-based query history, how many entries should be kept? - * default = 25 - */ -//$cfg['QueryHistoryMax'] = 100; - -/** - * Whether or not to query the user before sending the error report to - * the phpMyAdmin team when a JavaScript error occurs - * - * Available options - * ('ask' | 'always' | 'never') - * default = 'ask' - */ -//$cfg['SendErrorReports'] = 'always'; - -/** - * You can find more configuration options in the documentation - * in the doc/ folder or at . - */ diff --git a/templates/Fedora/35/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/35/usr/lib/systemd/system/mariadb-copytls.service deleted file mode 100644 index 3f63078..0000000 --- a/templates/Fedora/35/usr/lib/systemd/system/mariadb-copytls.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Copy TLS Certificates for Mariadb - -[Service] -Type=oneshot -ExecStartPre=mkdir -p /etc/my.cnf.d/certificates -ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/{{ mariadb_vhost }}/*.pem /etc/my.cnf.d/certificates/' -ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates - -[Install] -WantedBy=mariadb.service diff --git a/templates/Fedora/35/usr/lib/systemd/system/mariadb-copytls.timer b/templates/Fedora/35/usr/lib/systemd/system/mariadb-copytls.timer deleted file mode 100644 index 8e5ad7b..0000000 --- a/templates/Fedora/35/usr/lib/systemd/system/mariadb-copytls.timer +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Copy TLS Certificates for Mariadb - -[Timer] -OnUnitActiveSec=5min - -[Install] -WantedBy=mariadb.service diff --git a/templates/Fedora/35/usr/lib/systemd/system/mariadb.service b/templates/Fedora/35/usr/lib/systemd/system/mariadb.service deleted file mode 100644 index d61fd82..0000000 --- a/templates/Fedora/35/usr/lib/systemd/system/mariadb.service +++ /dev/null @@ -1,64 +0,0 @@ -# It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, the -# best way is to: -# -# root> systemctl edit mariadb.service -# -# Then add additonal directives under a section (probably [Service]). -# -# For more info about custom unit files, see systemd.unit(5) or -# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F -# -# For example, if you want to increase MariaDB's open-files-limit to 10000, -# you need to increase systemd's LimitNOFILE setting, use the contents below: -# -# [Service] -# LimitNOFILE=10000 -# - -[Unit] -Description=MariaDB 10.5 database server -Documentation=man:mariadbd(8) -Documentation=https://mariadb.com/kb/en/library/systemd/ -After=network.target - -[Install] -WantedBy=multi-user.target -Alias=mysql.service -Alias=mysqld.service - -[Service] -Type=notify -User=mysql -Group=mysql - -ExecStartPre=/usr/libexec/mariadb-check-socket -# '%n' expands to 'Full unit name'; man systemd.unit -ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n -# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug #547485 -ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER -ExecStartPost=/usr/libexec/mariadb-check-upgrade - -# Setting this to true can break replication and the Type=notify settings -# See also bind-address MariaDB option. -PrivateNetwork=false - -KillSignal=SIGTERM - -# Don't want to see an automated SIGKILL ever -SendSIGKILL=no - -# Restart crashed server only, on-failure would also restart, for example, when -# my.cnf contains unknown option -Restart=on-abort -RestartSec=5s - -UMask=007 - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true diff --git a/templates/Fedora/35/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/35/usr/lib/systemd/system/mariadb@.service deleted file mode 100644 index 10ca8fd..0000000 --- a/templates/Fedora/35/usr/lib/systemd/system/mariadb@.service +++ /dev/null @@ -1,85 +0,0 @@ -# Multi instance version of MariaDB. For if you run mutiple verions at once. -# Also used for mariadb@bootstrap to bootstrap Galera. -# -# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in -# /etc/@my.cnf to change per instance settings. A minimumal necessary -# configuration items to change to avoid conflicts between instances is: -# -# [mariadbd.instancename] -# # TCP port to make available for clients -# port=3306 -# # Socket to make available for clients -# socket=/tmp/mariadb-instancename.sock -# # Where MariaDB should store all its data -# datadir=/usr/local/mariadb-instancename/data -# -# and start the service via: -# -# root> systemctl start mariadb@{instancename}.server -# -# It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, for -# all instances, the best way is: -# -# root> systemctl edit mariadb@.service -# -# Then add additonal directives under a section (probably [Service]). -# -# If you only want to change a specific instance: -# -# root> systemctl edit mariadb@{instancename}.server -# -# For more info about custom unit files, see systemd.unit(5) or -# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F -# -# For example, if you want to increase MariaDB's open-files-limit to 10000, -# you need to increase systemd's LimitNOFILE setting, use the contents below: -# -# [Service] -# LimitNOFILE=10000 - -[Unit] -Description=MariaDB 10.5 database server -Documentation=man:mariadbd(8) -Documentation=https://mariadb.com/kb/en/library/systemd/ -After=network.target - -[Install] -WantedBy=multi-user.target -Alias=mysql.service -Alias=mysqld.service - -[Service] -Type=notify -User=mysql -Group=mysql - -ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I -ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n -# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug #547485 -ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER -ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I - -# Setting this to true can break replication and the Type=notify settings -# See also bind-address MariaDB option. -PrivateNetwork=false - -KillSignal=SIGTERM - -# Don't want to see an automated SIGKILL ever -SendSIGKILL=no - -# Restart crashed server only, on-failure would also restart, for example, when -# my.cnf contains unknown option -Restart=on-abort -RestartSec=5s - -UMask=007 - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true diff --git a/templates/Fedora/36/etc/httpd/conf.d/phpMyAdmin.conf b/templates/Fedora/36/etc/httpd/conf.d/phpMyAdmin.conf deleted file mode 100644 index 98738c7..0000000 --- a/templates/Fedora/36/etc/httpd/conf.d/phpMyAdmin.conf +++ /dev/null @@ -1,46 +0,0 @@ -# phpMyAdmin - Web based MySQL browser written in php -# -# Allows only localhost by default -# -# But allowing phpMyAdmin to anyone other than localhost should be considered -# dangerous unless properly secured by SSL - -Alias /phpMyAdmin /usr/share/phpMyAdmin -Alias /phpmyadmin /usr/share/phpMyAdmin - - - AddDefaultCharset UTF-8 - Require ssl - - - - Require local - - -# These directories do not require access over HTTP - taken from the original -# phpMyAdmin upstream tarball -# - - Require all denied - - - - Require all denied - - - - Require all denied - - - - Require all denied - - -# This configuration prevents mod_security at phpMyAdmin directories from -# filtering SQL etc. This may break your mod_security implementation. -# -# -# -# SecRuleInheritance Off -# -# diff --git a/templates/Fedora/36/etc/my.cnf b/templates/Fedora/36/etc/my.cnf deleted file mode 100644 index 913b88f..0000000 --- a/templates/Fedora/36/etc/my.cnf +++ /dev/null @@ -1,11 +0,0 @@ -# -# This group is read both both by the client and the server -# use it for options that affect everything -# -[client-server] - -# -# include all files from the config directory -# -!includedir /etc/my.cnf.d - diff --git a/templates/Fedora/36/etc/my.cnf.d/auth_gssapi.cnf b/templates/Fedora/36/etc/my.cnf.d/auth_gssapi.cnf deleted file mode 100644 index c7cbc78..0000000 --- a/templates/Fedora/36/etc/my.cnf.d/auth_gssapi.cnf +++ /dev/null @@ -1,2 +0,0 @@ -[mariadb] -#plugin-load-add=auth_gssapi.so diff --git a/templates/Fedora/36/etc/my.cnf.d/client.cnf b/templates/Fedora/36/etc/my.cnf.d/client.cnf deleted file mode 100644 index 05442bf..0000000 --- a/templates/Fedora/36/etc/my.cnf.d/client.cnf +++ /dev/null @@ -1,14 +0,0 @@ -# -# These two groups are read by the client library -# Use it for options that affect all clients, but not the server -# -[client] -default-character-set = utf8mb4 - -# This group is not read by mysql client library, -# If you use the same .cnf file for MySQL and MariaDB, -# use it for MariaDB-only client options -[client-mariadb] -ssl -ssl-verify-server-cert - diff --git a/templates/Fedora/36/etc/my.cnf.d/cracklib_password_check.cnf b/templates/Fedora/36/etc/my.cnf.d/cracklib_password_check.cnf deleted file mode 100644 index 72cbcb1..0000000 --- a/templates/Fedora/36/etc/my.cnf.d/cracklib_password_check.cnf +++ /dev/null @@ -1,2 +0,0 @@ -[mariadb] -#plugin-load-add=cracklib_password_check.so diff --git a/templates/Fedora/36/etc/my.cnf.d/enable_encryption.preset b/templates/Fedora/36/etc/my.cnf.d/enable_encryption.preset deleted file mode 100644 index 722db7e..0000000 --- a/templates/Fedora/36/etc/my.cnf.d/enable_encryption.preset +++ /dev/null @@ -1,20 +0,0 @@ -# -# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d) -# and it will enable data at rest encryption. This is a simple way to -# ensure that everything that can be encrypted will be and your -# data will not leak unencrypted. -# -# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a -# newer version and your edits will be lost. Instead, add your edits -# to the .cnf file after the !include directive. -# -# NOTE that you also need to install an encryption plugin for the encryption -# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management -# -[mariadb] -aria-encrypt-tables -encrypt-binlog -encrypt-tmp-disk-tables -encrypt-tmp-files -loose-innodb-encrypt-log -loose-innodb-encrypt-tables diff --git a/templates/Fedora/36/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/36/etc/my.cnf.d/mariadb-server.cnf deleted file mode 100644 index 7239135..0000000 --- a/templates/Fedora/36/etc/my.cnf.d/mariadb-server.cnf +++ /dev/null @@ -1,59 +0,0 @@ -# -# These groups are read by MariaDB server. -# Use it for options that only the server (but not clients) should see -# -# See the examples of server my.cnf files in /usr/share/mysql/ -# - -# this is read by the standalone daemon and embedded servers -[server] - -# this is only for the mysqld standalone daemon -# Settings user and group are ignored when systemd is used. -# If you need to run mysqld under a different user or group, -# customize your systemd unit file for mysqld/mariadb according to the -# instructions in http://fedoraproject.org/wiki/Systemd -[mysqld] -datadir=/var/lib/mysql -socket=/var/lib/mysql/mysql.sock -log-error=/var/log/mariadb/mariadb.log -pid-file=/run/mariadb/mariadb.pid -character-set-server = utf8mb4 -ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm -ssl-key=/etc/my.cnf.d/certificates/privkey.epm -tls-version=TLSv1.2,TLSv1.3 - - -# -# * Galera-related settings -# -[galera] -# Mandatory settings -#wsrep_on=ON -#wsrep_provider= -#wsrep_cluster_address= -#binlog_format=row -#default_storage_engine=InnoDB -#innodb_autoinc_lock_mode=2 -# -# Allow server to accept connections on all interfaces. -# -#bind-address=0.0.0.0 -# -# Optional setting -#wsrep_slave_threads=1 -#innodb_flush_log_at_trx_commit=0 - -# this is only for embedded server -[embedded] - -# This group is only read by MariaDB servers, not by MySQL. -# If you use the same .cnf file for MySQL and MariaDB, -# you can put MariaDB-only options here -[mariadb] - -# This group is only read by MariaDB-10.5 servers. -# If you use the same .cnf file for MariaDB of different versions, -# use this group for options that older servers don't understand -[mariadb-10.5] - diff --git a/templates/Fedora/36/etc/my.cnf.d/mysql-clients.cnf b/templates/Fedora/36/etc/my.cnf.d/mysql-clients.cnf deleted file mode 100644 index 3df9b7b..0000000 --- a/templates/Fedora/36/etc/my.cnf.d/mysql-clients.cnf +++ /dev/null @@ -1,23 +0,0 @@ -# -# These groups are read by MariaDB command-line tools -# Use it for options that affect only one utility -# - -[mysql] - -[mysql_upgrade] - -[mysqladmin] - -[mysqlbinlog] - -[mysqlcheck] - -[mysqldump] - -[mysqlimport] - -[mysqlshow] - -[mysqlslap] - diff --git a/templates/Fedora/36/etc/my.cnf.d/spider.cnf b/templates/Fedora/36/etc/my.cnf.d/spider.cnf deleted file mode 100644 index ebc9968..0000000 --- a/templates/Fedora/36/etc/my.cnf.d/spider.cnf +++ /dev/null @@ -1,7 +0,0 @@ -[mariadb] -# -# Uncomment line to enable -# -#plugin-load-add = ha_spider - -# Read more at https://mariadb.com/kb/en/spider/ diff --git a/templates/Fedora/36/etc/phpMyAdmin/config.inc.php b/templates/Fedora/36/etc/phpMyAdmin/config.inc.php deleted file mode 100644 index b973a14..0000000 --- a/templates/Fedora/36/etc/phpMyAdmin/config.inc.php +++ /dev/null @@ -1,153 +0,0 @@ -. - */ - -declare(strict_types=1); - -/** - * This is needed for cookie based authentication to encrypt password in - * cookie. Needs to be 32 chars long. - */ -$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ - -/** - * Servers configuration - */ -$i = 0; - -/** - * First server - */ -$i++; -/* Authentication type */ -$cfg['Servers'][$i]['auth_type'] = 'cookie'; -/* Server parameters */ -$cfg['Servers'][$i]['host'] = 'localhost'; -$cfg['Servers'][$i]['compress'] = false; -$cfg['Servers'][$i]['AllowNoPassword'] = false; - -/** - * phpMyAdmin configuration storage settings. - */ - -/* User used to manipulate with storage */ -// $cfg['Servers'][$i]['controlhost'] = ''; -// $cfg['Servers'][$i]['controlport'] = ''; -// $cfg['Servers'][$i]['controluser'] = 'pma'; -// $cfg['Servers'][$i]['controlpass'] = 'pmapass'; - -/* Storage database and tables */ -// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; -// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; -// $cfg['Servers'][$i]['relation'] = 'pma__relation'; -// $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; -// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; -// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; -// $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; -// $cfg['Servers'][$i]['history'] = 'pma__history'; -// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; -// $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; -// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; -// $cfg['Servers'][$i]['recent'] = 'pma__recent'; -// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; -// $cfg['Servers'][$i]['users'] = 'pma__users'; -// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; -// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; -// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; -// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; -// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; -// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; - -/** - * End of servers configuration - */ - -/** - * Directories for saving/loading files from server - */ -$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload'; -$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; - -/** - * Whether to display icons or text or both icons and text in table row - * action segment. Value can be either of 'icons', 'text' or 'both'. - * default = 'both' - */ -//$cfg['RowActionType'] = 'icons'; - -/** - * Defines whether a user should be displayed a "show all (records)" - * button in browse mode or not. - * default = false - */ -//$cfg['ShowAll'] = true; - -/** - * Number of rows displayed when browsing a result set. If the result - * set contains more rows, "Previous" and "Next". - * Possible values: 25, 50, 100, 250, 500 - * default = 25 - */ -//$cfg['MaxRows'] = 50; - -/** - * Disallow editing of binary fields - * valid values are: - * false allow editing - * 'blob' allow editing except for BLOB fields - * 'noblob' disallow editing except for BLOB fields - * 'all' disallow editing - * default = 'blob' - */ -//$cfg['ProtectBinary'] = false; - -/** - * Default language to use, if not browser-defined or user-defined - * (you find all languages in the locale folder) - * uncomment the desired line: - * default = 'en' - */ -//$cfg['DefaultLang'] = 'en'; -//$cfg['DefaultLang'] = 'de'; - -/** - * How many columns should be used for table display of a database? - * (a value larger than 1 results in some information being hidden) - * default = 1 - */ -//$cfg['PropertiesNumColumns'] = 2; - -/** - * Set to true if you want DB-based query history.If false, this utilizes - * JS-routines to display query history (lost by window close) - * - * This requires configuration storage enabled, see above. - * default = false - */ -//$cfg['QueryHistoryDB'] = true; - -/** - * When using DB-based query history, how many entries should be kept? - * default = 25 - */ -//$cfg['QueryHistoryMax'] = 100; - -/** - * Whether or not to query the user before sending the error report to - * the phpMyAdmin team when a JavaScript error occurs - * - * Available options - * ('ask' | 'always' | 'never') - * default = 'ask' - */ -//$cfg['SendErrorReports'] = 'always'; - -/** - * You can find more configuration options in the documentation - * in the doc/ folder or at . - */ diff --git a/templates/Fedora/36/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/36/usr/lib/systemd/system/mariadb-copytls.service deleted file mode 100644 index 3f63078..0000000 --- a/templates/Fedora/36/usr/lib/systemd/system/mariadb-copytls.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Copy TLS Certificates for Mariadb - -[Service] -Type=oneshot -ExecStartPre=mkdir -p /etc/my.cnf.d/certificates -ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/{{ mariadb_vhost }}/*.pem /etc/my.cnf.d/certificates/' -ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates - -[Install] -WantedBy=mariadb.service diff --git a/templates/Fedora/36/usr/lib/systemd/system/mariadb-copytls.timer b/templates/Fedora/36/usr/lib/systemd/system/mariadb-copytls.timer deleted file mode 100644 index 8e5ad7b..0000000 --- a/templates/Fedora/36/usr/lib/systemd/system/mariadb-copytls.timer +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Copy TLS Certificates for Mariadb - -[Timer] -OnUnitActiveSec=5min - -[Install] -WantedBy=mariadb.service diff --git a/templates/Fedora/36/usr/lib/systemd/system/mariadb.service b/templates/Fedora/36/usr/lib/systemd/system/mariadb.service deleted file mode 100644 index d61fd82..0000000 --- a/templates/Fedora/36/usr/lib/systemd/system/mariadb.service +++ /dev/null @@ -1,64 +0,0 @@ -# It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, the -# best way is to: -# -# root> systemctl edit mariadb.service -# -# Then add additonal directives under a section (probably [Service]). -# -# For more info about custom unit files, see systemd.unit(5) or -# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F -# -# For example, if you want to increase MariaDB's open-files-limit to 10000, -# you need to increase systemd's LimitNOFILE setting, use the contents below: -# -# [Service] -# LimitNOFILE=10000 -# - -[Unit] -Description=MariaDB 10.5 database server -Documentation=man:mariadbd(8) -Documentation=https://mariadb.com/kb/en/library/systemd/ -After=network.target - -[Install] -WantedBy=multi-user.target -Alias=mysql.service -Alias=mysqld.service - -[Service] -Type=notify -User=mysql -Group=mysql - -ExecStartPre=/usr/libexec/mariadb-check-socket -# '%n' expands to 'Full unit name'; man systemd.unit -ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n -# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug #547485 -ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER -ExecStartPost=/usr/libexec/mariadb-check-upgrade - -# Setting this to true can break replication and the Type=notify settings -# See also bind-address MariaDB option. -PrivateNetwork=false - -KillSignal=SIGTERM - -# Don't want to see an automated SIGKILL ever -SendSIGKILL=no - -# Restart crashed server only, on-failure would also restart, for example, when -# my.cnf contains unknown option -Restart=on-abort -RestartSec=5s - -UMask=007 - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true diff --git a/templates/Fedora/36/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/36/usr/lib/systemd/system/mariadb@.service deleted file mode 100644 index 10ca8fd..0000000 --- a/templates/Fedora/36/usr/lib/systemd/system/mariadb@.service +++ /dev/null @@ -1,85 +0,0 @@ -# Multi instance version of MariaDB. For if you run mutiple verions at once. -# Also used for mariadb@bootstrap to bootstrap Galera. -# -# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in -# /etc/@my.cnf to change per instance settings. A minimumal necessary -# configuration items to change to avoid conflicts between instances is: -# -# [mariadbd.instancename] -# # TCP port to make available for clients -# port=3306 -# # Socket to make available for clients -# socket=/tmp/mariadb-instancename.sock -# # Where MariaDB should store all its data -# datadir=/usr/local/mariadb-instancename/data -# -# and start the service via: -# -# root> systemctl start mariadb@{instancename}.server -# -# It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, for -# all instances, the best way is: -# -# root> systemctl edit mariadb@.service -# -# Then add additonal directives under a section (probably [Service]). -# -# If you only want to change a specific instance: -# -# root> systemctl edit mariadb@{instancename}.server -# -# For more info about custom unit files, see systemd.unit(5) or -# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F -# -# For example, if you want to increase MariaDB's open-files-limit to 10000, -# you need to increase systemd's LimitNOFILE setting, use the contents below: -# -# [Service] -# LimitNOFILE=10000 - -[Unit] -Description=MariaDB 10.5 database server -Documentation=man:mariadbd(8) -Documentation=https://mariadb.com/kb/en/library/systemd/ -After=network.target - -[Install] -WantedBy=multi-user.target -Alias=mysql.service -Alias=mysqld.service - -[Service] -Type=notify -User=mysql -Group=mysql - -ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I -ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n -# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug #547485 -ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER -ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I - -# Setting this to true can break replication and the Type=notify settings -# See also bind-address MariaDB option. -PrivateNetwork=false - -KillSignal=SIGTERM - -# Don't want to see an automated SIGKILL ever -SendSIGKILL=no - -# Restart crashed server only, on-failure would also restart, for example, when -# my.cnf contains unknown option -Restart=on-abort -RestartSec=5s - -UMask=007 - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true diff --git a/templates/Fedora/37/etc/httpd/conf.d/phpMyAdmin.conf b/templates/Fedora/37/etc/httpd/conf.d/phpMyAdmin.conf deleted file mode 100644 index 98738c7..0000000 --- a/templates/Fedora/37/etc/httpd/conf.d/phpMyAdmin.conf +++ /dev/null @@ -1,46 +0,0 @@ -# phpMyAdmin - Web based MySQL browser written in php -# -# Allows only localhost by default -# -# But allowing phpMyAdmin to anyone other than localhost should be considered -# dangerous unless properly secured by SSL - -Alias /phpMyAdmin /usr/share/phpMyAdmin -Alias /phpmyadmin /usr/share/phpMyAdmin - - - AddDefaultCharset UTF-8 - Require ssl - - - - Require local - - -# These directories do not require access over HTTP - taken from the original -# phpMyAdmin upstream tarball -# - - Require all denied - - - - Require all denied - - - - Require all denied - - - - Require all denied - - -# This configuration prevents mod_security at phpMyAdmin directories from -# filtering SQL etc. This may break your mod_security implementation. -# -# -# -# SecRuleInheritance Off -# -# diff --git a/templates/Fedora/37/etc/my.cnf b/templates/Fedora/37/etc/my.cnf deleted file mode 100644 index 913b88f..0000000 --- a/templates/Fedora/37/etc/my.cnf +++ /dev/null @@ -1,11 +0,0 @@ -# -# This group is read both both by the client and the server -# use it for options that affect everything -# -[client-server] - -# -# include all files from the config directory -# -!includedir /etc/my.cnf.d - diff --git a/templates/Fedora/37/etc/my.cnf.d/auth_gssapi.cnf b/templates/Fedora/37/etc/my.cnf.d/auth_gssapi.cnf deleted file mode 100644 index c7cbc78..0000000 --- a/templates/Fedora/37/etc/my.cnf.d/auth_gssapi.cnf +++ /dev/null @@ -1,2 +0,0 @@ -[mariadb] -#plugin-load-add=auth_gssapi.so diff --git a/templates/Fedora/37/etc/my.cnf.d/client.cnf b/templates/Fedora/37/etc/my.cnf.d/client.cnf deleted file mode 100644 index 05442bf..0000000 --- a/templates/Fedora/37/etc/my.cnf.d/client.cnf +++ /dev/null @@ -1,14 +0,0 @@ -# -# These two groups are read by the client library -# Use it for options that affect all clients, but not the server -# -[client] -default-character-set = utf8mb4 - -# This group is not read by mysql client library, -# If you use the same .cnf file for MySQL and MariaDB, -# use it for MariaDB-only client options -[client-mariadb] -ssl -ssl-verify-server-cert - diff --git a/templates/Fedora/37/etc/my.cnf.d/cracklib_password_check.cnf b/templates/Fedora/37/etc/my.cnf.d/cracklib_password_check.cnf deleted file mode 100644 index 72cbcb1..0000000 --- a/templates/Fedora/37/etc/my.cnf.d/cracklib_password_check.cnf +++ /dev/null @@ -1,2 +0,0 @@ -[mariadb] -#plugin-load-add=cracklib_password_check.so diff --git a/templates/Fedora/37/etc/my.cnf.d/enable_encryption.preset b/templates/Fedora/37/etc/my.cnf.d/enable_encryption.preset deleted file mode 100644 index 722db7e..0000000 --- a/templates/Fedora/37/etc/my.cnf.d/enable_encryption.preset +++ /dev/null @@ -1,20 +0,0 @@ -# -# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d) -# and it will enable data at rest encryption. This is a simple way to -# ensure that everything that can be encrypted will be and your -# data will not leak unencrypted. -# -# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a -# newer version and your edits will be lost. Instead, add your edits -# to the .cnf file after the !include directive. -# -# NOTE that you also need to install an encryption plugin for the encryption -# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management -# -[mariadb] -aria-encrypt-tables -encrypt-binlog -encrypt-tmp-disk-tables -encrypt-tmp-files -loose-innodb-encrypt-log -loose-innodb-encrypt-tables diff --git a/templates/Fedora/37/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/37/etc/my.cnf.d/mariadb-server.cnf deleted file mode 100644 index 7239135..0000000 --- a/templates/Fedora/37/etc/my.cnf.d/mariadb-server.cnf +++ /dev/null @@ -1,59 +0,0 @@ -# -# These groups are read by MariaDB server. -# Use it for options that only the server (but not clients) should see -# -# See the examples of server my.cnf files in /usr/share/mysql/ -# - -# this is read by the standalone daemon and embedded servers -[server] - -# this is only for the mysqld standalone daemon -# Settings user and group are ignored when systemd is used. -# If you need to run mysqld under a different user or group, -# customize your systemd unit file for mysqld/mariadb according to the -# instructions in http://fedoraproject.org/wiki/Systemd -[mysqld] -datadir=/var/lib/mysql -socket=/var/lib/mysql/mysql.sock -log-error=/var/log/mariadb/mariadb.log -pid-file=/run/mariadb/mariadb.pid -character-set-server = utf8mb4 -ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm -ssl-key=/etc/my.cnf.d/certificates/privkey.epm -tls-version=TLSv1.2,TLSv1.3 - - -# -# * Galera-related settings -# -[galera] -# Mandatory settings -#wsrep_on=ON -#wsrep_provider= -#wsrep_cluster_address= -#binlog_format=row -#default_storage_engine=InnoDB -#innodb_autoinc_lock_mode=2 -# -# Allow server to accept connections on all interfaces. -# -#bind-address=0.0.0.0 -# -# Optional setting -#wsrep_slave_threads=1 -#innodb_flush_log_at_trx_commit=0 - -# this is only for embedded server -[embedded] - -# This group is only read by MariaDB servers, not by MySQL. -# If you use the same .cnf file for MySQL and MariaDB, -# you can put MariaDB-only options here -[mariadb] - -# This group is only read by MariaDB-10.5 servers. -# If you use the same .cnf file for MariaDB of different versions, -# use this group for options that older servers don't understand -[mariadb-10.5] - diff --git a/templates/Fedora/37/etc/my.cnf.d/mysql-clients.cnf b/templates/Fedora/37/etc/my.cnf.d/mysql-clients.cnf deleted file mode 100644 index 3df9b7b..0000000 --- a/templates/Fedora/37/etc/my.cnf.d/mysql-clients.cnf +++ /dev/null @@ -1,23 +0,0 @@ -# -# These groups are read by MariaDB command-line tools -# Use it for options that affect only one utility -# - -[mysql] - -[mysql_upgrade] - -[mysqladmin] - -[mysqlbinlog] - -[mysqlcheck] - -[mysqldump] - -[mysqlimport] - -[mysqlshow] - -[mysqlslap] - diff --git a/templates/Fedora/37/etc/my.cnf.d/spider.cnf b/templates/Fedora/37/etc/my.cnf.d/spider.cnf deleted file mode 100644 index ebc9968..0000000 --- a/templates/Fedora/37/etc/my.cnf.d/spider.cnf +++ /dev/null @@ -1,7 +0,0 @@ -[mariadb] -# -# Uncomment line to enable -# -#plugin-load-add = ha_spider - -# Read more at https://mariadb.com/kb/en/spider/ diff --git a/templates/Fedora/37/etc/phpMyAdmin/config.inc.php b/templates/Fedora/37/etc/phpMyAdmin/config.inc.php deleted file mode 100644 index b973a14..0000000 --- a/templates/Fedora/37/etc/phpMyAdmin/config.inc.php +++ /dev/null @@ -1,153 +0,0 @@ -. - */ - -declare(strict_types=1); - -/** - * This is needed for cookie based authentication to encrypt password in - * cookie. Needs to be 32 chars long. - */ -$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ - -/** - * Servers configuration - */ -$i = 0; - -/** - * First server - */ -$i++; -/* Authentication type */ -$cfg['Servers'][$i]['auth_type'] = 'cookie'; -/* Server parameters */ -$cfg['Servers'][$i]['host'] = 'localhost'; -$cfg['Servers'][$i]['compress'] = false; -$cfg['Servers'][$i]['AllowNoPassword'] = false; - -/** - * phpMyAdmin configuration storage settings. - */ - -/* User used to manipulate with storage */ -// $cfg['Servers'][$i]['controlhost'] = ''; -// $cfg['Servers'][$i]['controlport'] = ''; -// $cfg['Servers'][$i]['controluser'] = 'pma'; -// $cfg['Servers'][$i]['controlpass'] = 'pmapass'; - -/* Storage database and tables */ -// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; -// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; -// $cfg['Servers'][$i]['relation'] = 'pma__relation'; -// $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; -// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; -// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; -// $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; -// $cfg['Servers'][$i]['history'] = 'pma__history'; -// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; -// $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; -// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; -// $cfg['Servers'][$i]['recent'] = 'pma__recent'; -// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; -// $cfg['Servers'][$i]['users'] = 'pma__users'; -// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; -// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; -// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; -// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; -// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; -// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; - -/** - * End of servers configuration - */ - -/** - * Directories for saving/loading files from server - */ -$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload'; -$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; - -/** - * Whether to display icons or text or both icons and text in table row - * action segment. Value can be either of 'icons', 'text' or 'both'. - * default = 'both' - */ -//$cfg['RowActionType'] = 'icons'; - -/** - * Defines whether a user should be displayed a "show all (records)" - * button in browse mode or not. - * default = false - */ -//$cfg['ShowAll'] = true; - -/** - * Number of rows displayed when browsing a result set. If the result - * set contains more rows, "Previous" and "Next". - * Possible values: 25, 50, 100, 250, 500 - * default = 25 - */ -//$cfg['MaxRows'] = 50; - -/** - * Disallow editing of binary fields - * valid values are: - * false allow editing - * 'blob' allow editing except for BLOB fields - * 'noblob' disallow editing except for BLOB fields - * 'all' disallow editing - * default = 'blob' - */ -//$cfg['ProtectBinary'] = false; - -/** - * Default language to use, if not browser-defined or user-defined - * (you find all languages in the locale folder) - * uncomment the desired line: - * default = 'en' - */ -//$cfg['DefaultLang'] = 'en'; -//$cfg['DefaultLang'] = 'de'; - -/** - * How many columns should be used for table display of a database? - * (a value larger than 1 results in some information being hidden) - * default = 1 - */ -//$cfg['PropertiesNumColumns'] = 2; - -/** - * Set to true if you want DB-based query history.If false, this utilizes - * JS-routines to display query history (lost by window close) - * - * This requires configuration storage enabled, see above. - * default = false - */ -//$cfg['QueryHistoryDB'] = true; - -/** - * When using DB-based query history, how many entries should be kept? - * default = 25 - */ -//$cfg['QueryHistoryMax'] = 100; - -/** - * Whether or not to query the user before sending the error report to - * the phpMyAdmin team when a JavaScript error occurs - * - * Available options - * ('ask' | 'always' | 'never') - * default = 'ask' - */ -//$cfg['SendErrorReports'] = 'always'; - -/** - * You can find more configuration options in the documentation - * in the doc/ folder or at . - */ diff --git a/templates/Fedora/37/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/37/usr/lib/systemd/system/mariadb-copytls.service deleted file mode 100644 index 3f63078..0000000 --- a/templates/Fedora/37/usr/lib/systemd/system/mariadb-copytls.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Copy TLS Certificates for Mariadb - -[Service] -Type=oneshot -ExecStartPre=mkdir -p /etc/my.cnf.d/certificates -ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/{{ mariadb_vhost }}/*.pem /etc/my.cnf.d/certificates/' -ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates - -[Install] -WantedBy=mariadb.service diff --git a/templates/Fedora/37/usr/lib/systemd/system/mariadb-copytls.timer b/templates/Fedora/37/usr/lib/systemd/system/mariadb-copytls.timer deleted file mode 100644 index 8e5ad7b..0000000 --- a/templates/Fedora/37/usr/lib/systemd/system/mariadb-copytls.timer +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Copy TLS Certificates for Mariadb - -[Timer] -OnUnitActiveSec=5min - -[Install] -WantedBy=mariadb.service diff --git a/templates/Fedora/37/usr/lib/systemd/system/mariadb.service b/templates/Fedora/37/usr/lib/systemd/system/mariadb.service deleted file mode 100644 index d61fd82..0000000 --- a/templates/Fedora/37/usr/lib/systemd/system/mariadb.service +++ /dev/null @@ -1,64 +0,0 @@ -# It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, the -# best way is to: -# -# root> systemctl edit mariadb.service -# -# Then add additonal directives under a section (probably [Service]). -# -# For more info about custom unit files, see systemd.unit(5) or -# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F -# -# For example, if you want to increase MariaDB's open-files-limit to 10000, -# you need to increase systemd's LimitNOFILE setting, use the contents below: -# -# [Service] -# LimitNOFILE=10000 -# - -[Unit] -Description=MariaDB 10.5 database server -Documentation=man:mariadbd(8) -Documentation=https://mariadb.com/kb/en/library/systemd/ -After=network.target - -[Install] -WantedBy=multi-user.target -Alias=mysql.service -Alias=mysqld.service - -[Service] -Type=notify -User=mysql -Group=mysql - -ExecStartPre=/usr/libexec/mariadb-check-socket -# '%n' expands to 'Full unit name'; man systemd.unit -ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n -# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug #547485 -ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER -ExecStartPost=/usr/libexec/mariadb-check-upgrade - -# Setting this to true can break replication and the Type=notify settings -# See also bind-address MariaDB option. -PrivateNetwork=false - -KillSignal=SIGTERM - -# Don't want to see an automated SIGKILL ever -SendSIGKILL=no - -# Restart crashed server only, on-failure would also restart, for example, when -# my.cnf contains unknown option -Restart=on-abort -RestartSec=5s - -UMask=007 - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true diff --git a/templates/Fedora/37/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/37/usr/lib/systemd/system/mariadb@.service deleted file mode 100644 index 10ca8fd..0000000 --- a/templates/Fedora/37/usr/lib/systemd/system/mariadb@.service +++ /dev/null @@ -1,85 +0,0 @@ -# Multi instance version of MariaDB. For if you run mutiple verions at once. -# Also used for mariadb@bootstrap to bootstrap Galera. -# -# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in -# /etc/@my.cnf to change per instance settings. A minimumal necessary -# configuration items to change to avoid conflicts between instances is: -# -# [mariadbd.instancename] -# # TCP port to make available for clients -# port=3306 -# # Socket to make available for clients -# socket=/tmp/mariadb-instancename.sock -# # Where MariaDB should store all its data -# datadir=/usr/local/mariadb-instancename/data -# -# and start the service via: -# -# root> systemctl start mariadb@{instancename}.server -# -# It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, for -# all instances, the best way is: -# -# root> systemctl edit mariadb@.service -# -# Then add additonal directives under a section (probably [Service]). -# -# If you only want to change a specific instance: -# -# root> systemctl edit mariadb@{instancename}.server -# -# For more info about custom unit files, see systemd.unit(5) or -# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F -# -# For example, if you want to increase MariaDB's open-files-limit to 10000, -# you need to increase systemd's LimitNOFILE setting, use the contents below: -# -# [Service] -# LimitNOFILE=10000 - -[Unit] -Description=MariaDB 10.5 database server -Documentation=man:mariadbd(8) -Documentation=https://mariadb.com/kb/en/library/systemd/ -After=network.target - -[Install] -WantedBy=multi-user.target -Alias=mysql.service -Alias=mysqld.service - -[Service] -Type=notify -User=mysql -Group=mysql - -ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I -ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n -# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug #547485 -ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER -ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I - -# Setting this to true can break replication and the Type=notify settings -# See also bind-address MariaDB option. -PrivateNetwork=false - -KillSignal=SIGTERM - -# Don't want to see an automated SIGKILL ever -SendSIGKILL=no - -# Restart crashed server only, on-failure would also restart, for example, when -# my.cnf contains unknown option -Restart=on-abort -RestartSec=5s - -UMask=007 - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true diff --git a/templates/Fedora/38/etc/httpd/conf.d/phpMyAdmin.conf b/templates/Fedora/38/etc/httpd/conf.d/phpMyAdmin.conf deleted file mode 100644 index 98738c7..0000000 --- a/templates/Fedora/38/etc/httpd/conf.d/phpMyAdmin.conf +++ /dev/null @@ -1,46 +0,0 @@ -# phpMyAdmin - Web based MySQL browser written in php -# -# Allows only localhost by default -# -# But allowing phpMyAdmin to anyone other than localhost should be considered -# dangerous unless properly secured by SSL - -Alias /phpMyAdmin /usr/share/phpMyAdmin -Alias /phpmyadmin /usr/share/phpMyAdmin - - - AddDefaultCharset UTF-8 - Require ssl - - - - Require local - - -# These directories do not require access over HTTP - taken from the original -# phpMyAdmin upstream tarball -# - - Require all denied - - - - Require all denied - - - - Require all denied - - - - Require all denied - - -# This configuration prevents mod_security at phpMyAdmin directories from -# filtering SQL etc. This may break your mod_security implementation. -# -# -# -# SecRuleInheritance Off -# -# diff --git a/templates/Fedora/38/etc/my.cnf b/templates/Fedora/38/etc/my.cnf deleted file mode 100644 index 913b88f..0000000 --- a/templates/Fedora/38/etc/my.cnf +++ /dev/null @@ -1,11 +0,0 @@ -# -# This group is read both both by the client and the server -# use it for options that affect everything -# -[client-server] - -# -# include all files from the config directory -# -!includedir /etc/my.cnf.d - diff --git a/templates/Fedora/38/etc/my.cnf.d/auth_gssapi.cnf b/templates/Fedora/38/etc/my.cnf.d/auth_gssapi.cnf deleted file mode 100644 index c7cbc78..0000000 --- a/templates/Fedora/38/etc/my.cnf.d/auth_gssapi.cnf +++ /dev/null @@ -1,2 +0,0 @@ -[mariadb] -#plugin-load-add=auth_gssapi.so diff --git a/templates/Fedora/38/etc/my.cnf.d/client.cnf b/templates/Fedora/38/etc/my.cnf.d/client.cnf deleted file mode 100644 index 05442bf..0000000 --- a/templates/Fedora/38/etc/my.cnf.d/client.cnf +++ /dev/null @@ -1,14 +0,0 @@ -# -# These two groups are read by the client library -# Use it for options that affect all clients, but not the server -# -[client] -default-character-set = utf8mb4 - -# This group is not read by mysql client library, -# If you use the same .cnf file for MySQL and MariaDB, -# use it for MariaDB-only client options -[client-mariadb] -ssl -ssl-verify-server-cert - diff --git a/templates/Fedora/38/etc/my.cnf.d/cracklib_password_check.cnf b/templates/Fedora/38/etc/my.cnf.d/cracklib_password_check.cnf deleted file mode 100644 index 72cbcb1..0000000 --- a/templates/Fedora/38/etc/my.cnf.d/cracklib_password_check.cnf +++ /dev/null @@ -1,2 +0,0 @@ -[mariadb] -#plugin-load-add=cracklib_password_check.so diff --git a/templates/Fedora/38/etc/my.cnf.d/enable_encryption.preset b/templates/Fedora/38/etc/my.cnf.d/enable_encryption.preset deleted file mode 100644 index 722db7e..0000000 --- a/templates/Fedora/38/etc/my.cnf.d/enable_encryption.preset +++ /dev/null @@ -1,20 +0,0 @@ -# -# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d) -# and it will enable data at rest encryption. This is a simple way to -# ensure that everything that can be encrypted will be and your -# data will not leak unencrypted. -# -# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a -# newer version and your edits will be lost. Instead, add your edits -# to the .cnf file after the !include directive. -# -# NOTE that you also need to install an encryption plugin for the encryption -# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management -# -[mariadb] -aria-encrypt-tables -encrypt-binlog -encrypt-tmp-disk-tables -encrypt-tmp-files -loose-innodb-encrypt-log -loose-innodb-encrypt-tables diff --git a/templates/Fedora/38/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/38/etc/my.cnf.d/mariadb-server.cnf deleted file mode 100644 index 7239135..0000000 --- a/templates/Fedora/38/etc/my.cnf.d/mariadb-server.cnf +++ /dev/null @@ -1,59 +0,0 @@ -# -# These groups are read by MariaDB server. -# Use it for options that only the server (but not clients) should see -# -# See the examples of server my.cnf files in /usr/share/mysql/ -# - -# this is read by the standalone daemon and embedded servers -[server] - -# this is only for the mysqld standalone daemon -# Settings user and group are ignored when systemd is used. -# If you need to run mysqld under a different user or group, -# customize your systemd unit file for mysqld/mariadb according to the -# instructions in http://fedoraproject.org/wiki/Systemd -[mysqld] -datadir=/var/lib/mysql -socket=/var/lib/mysql/mysql.sock -log-error=/var/log/mariadb/mariadb.log -pid-file=/run/mariadb/mariadb.pid -character-set-server = utf8mb4 -ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm -ssl-key=/etc/my.cnf.d/certificates/privkey.epm -tls-version=TLSv1.2,TLSv1.3 - - -# -# * Galera-related settings -# -[galera] -# Mandatory settings -#wsrep_on=ON -#wsrep_provider= -#wsrep_cluster_address= -#binlog_format=row -#default_storage_engine=InnoDB -#innodb_autoinc_lock_mode=2 -# -# Allow server to accept connections on all interfaces. -# -#bind-address=0.0.0.0 -# -# Optional setting -#wsrep_slave_threads=1 -#innodb_flush_log_at_trx_commit=0 - -# this is only for embedded server -[embedded] - -# This group is only read by MariaDB servers, not by MySQL. -# If you use the same .cnf file for MySQL and MariaDB, -# you can put MariaDB-only options here -[mariadb] - -# This group is only read by MariaDB-10.5 servers. -# If you use the same .cnf file for MariaDB of different versions, -# use this group for options that older servers don't understand -[mariadb-10.5] - diff --git a/templates/Fedora/38/etc/my.cnf.d/mysql-clients.cnf b/templates/Fedora/38/etc/my.cnf.d/mysql-clients.cnf deleted file mode 100644 index 3df9b7b..0000000 --- a/templates/Fedora/38/etc/my.cnf.d/mysql-clients.cnf +++ /dev/null @@ -1,23 +0,0 @@ -# -# These groups are read by MariaDB command-line tools -# Use it for options that affect only one utility -# - -[mysql] - -[mysql_upgrade] - -[mysqladmin] - -[mysqlbinlog] - -[mysqlcheck] - -[mysqldump] - -[mysqlimport] - -[mysqlshow] - -[mysqlslap] - diff --git a/templates/Fedora/38/etc/my.cnf.d/spider.cnf b/templates/Fedora/38/etc/my.cnf.d/spider.cnf deleted file mode 100644 index ebc9968..0000000 --- a/templates/Fedora/38/etc/my.cnf.d/spider.cnf +++ /dev/null @@ -1,7 +0,0 @@ -[mariadb] -# -# Uncomment line to enable -# -#plugin-load-add = ha_spider - -# Read more at https://mariadb.com/kb/en/spider/ diff --git a/templates/Fedora/38/etc/phpMyAdmin/config.inc.php b/templates/Fedora/38/etc/phpMyAdmin/config.inc.php deleted file mode 100644 index b973a14..0000000 --- a/templates/Fedora/38/etc/phpMyAdmin/config.inc.php +++ /dev/null @@ -1,153 +0,0 @@ -. - */ - -declare(strict_types=1); - -/** - * This is needed for cookie based authentication to encrypt password in - * cookie. Needs to be 32 chars long. - */ -$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ - -/** - * Servers configuration - */ -$i = 0; - -/** - * First server - */ -$i++; -/* Authentication type */ -$cfg['Servers'][$i]['auth_type'] = 'cookie'; -/* Server parameters */ -$cfg['Servers'][$i]['host'] = 'localhost'; -$cfg['Servers'][$i]['compress'] = false; -$cfg['Servers'][$i]['AllowNoPassword'] = false; - -/** - * phpMyAdmin configuration storage settings. - */ - -/* User used to manipulate with storage */ -// $cfg['Servers'][$i]['controlhost'] = ''; -// $cfg['Servers'][$i]['controlport'] = ''; -// $cfg['Servers'][$i]['controluser'] = 'pma'; -// $cfg['Servers'][$i]['controlpass'] = 'pmapass'; - -/* Storage database and tables */ -// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; -// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; -// $cfg['Servers'][$i]['relation'] = 'pma__relation'; -// $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; -// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; -// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; -// $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; -// $cfg['Servers'][$i]['history'] = 'pma__history'; -// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; -// $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; -// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; -// $cfg['Servers'][$i]['recent'] = 'pma__recent'; -// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; -// $cfg['Servers'][$i]['users'] = 'pma__users'; -// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; -// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; -// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; -// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; -// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; -// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; - -/** - * End of servers configuration - */ - -/** - * Directories for saving/loading files from server - */ -$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload'; -$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; - -/** - * Whether to display icons or text or both icons and text in table row - * action segment. Value can be either of 'icons', 'text' or 'both'. - * default = 'both' - */ -//$cfg['RowActionType'] = 'icons'; - -/** - * Defines whether a user should be displayed a "show all (records)" - * button in browse mode or not. - * default = false - */ -//$cfg['ShowAll'] = true; - -/** - * Number of rows displayed when browsing a result set. If the result - * set contains more rows, "Previous" and "Next". - * Possible values: 25, 50, 100, 250, 500 - * default = 25 - */ -//$cfg['MaxRows'] = 50; - -/** - * Disallow editing of binary fields - * valid values are: - * false allow editing - * 'blob' allow editing except for BLOB fields - * 'noblob' disallow editing except for BLOB fields - * 'all' disallow editing - * default = 'blob' - */ -//$cfg['ProtectBinary'] = false; - -/** - * Default language to use, if not browser-defined or user-defined - * (you find all languages in the locale folder) - * uncomment the desired line: - * default = 'en' - */ -//$cfg['DefaultLang'] = 'en'; -//$cfg['DefaultLang'] = 'de'; - -/** - * How many columns should be used for table display of a database? - * (a value larger than 1 results in some information being hidden) - * default = 1 - */ -//$cfg['PropertiesNumColumns'] = 2; - -/** - * Set to true if you want DB-based query history.If false, this utilizes - * JS-routines to display query history (lost by window close) - * - * This requires configuration storage enabled, see above. - * default = false - */ -//$cfg['QueryHistoryDB'] = true; - -/** - * When using DB-based query history, how many entries should be kept? - * default = 25 - */ -//$cfg['QueryHistoryMax'] = 100; - -/** - * Whether or not to query the user before sending the error report to - * the phpMyAdmin team when a JavaScript error occurs - * - * Available options - * ('ask' | 'always' | 'never') - * default = 'ask' - */ -//$cfg['SendErrorReports'] = 'always'; - -/** - * You can find more configuration options in the documentation - * in the doc/ folder or at . - */ diff --git a/templates/Fedora/38/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/38/usr/lib/systemd/system/mariadb-copytls.service deleted file mode 100644 index 3f63078..0000000 --- a/templates/Fedora/38/usr/lib/systemd/system/mariadb-copytls.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Copy TLS Certificates for Mariadb - -[Service] -Type=oneshot -ExecStartPre=mkdir -p /etc/my.cnf.d/certificates -ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/{{ mariadb_vhost }}/*.pem /etc/my.cnf.d/certificates/' -ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates - -[Install] -WantedBy=mariadb.service diff --git a/templates/Fedora/38/usr/lib/systemd/system/mariadb-copytls.timer b/templates/Fedora/38/usr/lib/systemd/system/mariadb-copytls.timer deleted file mode 100644 index 8e5ad7b..0000000 --- a/templates/Fedora/38/usr/lib/systemd/system/mariadb-copytls.timer +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Copy TLS Certificates for Mariadb - -[Timer] -OnUnitActiveSec=5min - -[Install] -WantedBy=mariadb.service diff --git a/templates/Fedora/38/usr/lib/systemd/system/mariadb.service b/templates/Fedora/38/usr/lib/systemd/system/mariadb.service deleted file mode 100644 index d61fd82..0000000 --- a/templates/Fedora/38/usr/lib/systemd/system/mariadb.service +++ /dev/null @@ -1,64 +0,0 @@ -# It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, the -# best way is to: -# -# root> systemctl edit mariadb.service -# -# Then add additonal directives under a section (probably [Service]). -# -# For more info about custom unit files, see systemd.unit(5) or -# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F -# -# For example, if you want to increase MariaDB's open-files-limit to 10000, -# you need to increase systemd's LimitNOFILE setting, use the contents below: -# -# [Service] -# LimitNOFILE=10000 -# - -[Unit] -Description=MariaDB 10.5 database server -Documentation=man:mariadbd(8) -Documentation=https://mariadb.com/kb/en/library/systemd/ -After=network.target - -[Install] -WantedBy=multi-user.target -Alias=mysql.service -Alias=mysqld.service - -[Service] -Type=notify -User=mysql -Group=mysql - -ExecStartPre=/usr/libexec/mariadb-check-socket -# '%n' expands to 'Full unit name'; man systemd.unit -ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n -# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug #547485 -ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER -ExecStartPost=/usr/libexec/mariadb-check-upgrade - -# Setting this to true can break replication and the Type=notify settings -# See also bind-address MariaDB option. -PrivateNetwork=false - -KillSignal=SIGTERM - -# Don't want to see an automated SIGKILL ever -SendSIGKILL=no - -# Restart crashed server only, on-failure would also restart, for example, when -# my.cnf contains unknown option -Restart=on-abort -RestartSec=5s - -UMask=007 - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true diff --git a/templates/Fedora/38/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/38/usr/lib/systemd/system/mariadb@.service deleted file mode 100644 index 10ca8fd..0000000 --- a/templates/Fedora/38/usr/lib/systemd/system/mariadb@.service +++ /dev/null @@ -1,85 +0,0 @@ -# Multi instance version of MariaDB. For if you run mutiple verions at once. -# Also used for mariadb@bootstrap to bootstrap Galera. -# -# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in -# /etc/@my.cnf to change per instance settings. A minimumal necessary -# configuration items to change to avoid conflicts between instances is: -# -# [mariadbd.instancename] -# # TCP port to make available for clients -# port=3306 -# # Socket to make available for clients -# socket=/tmp/mariadb-instancename.sock -# # Where MariaDB should store all its data -# datadir=/usr/local/mariadb-instancename/data -# -# and start the service via: -# -# root> systemctl start mariadb@{instancename}.server -# -# It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, for -# all instances, the best way is: -# -# root> systemctl edit mariadb@.service -# -# Then add additonal directives under a section (probably [Service]). -# -# If you only want to change a specific instance: -# -# root> systemctl edit mariadb@{instancename}.server -# -# For more info about custom unit files, see systemd.unit(5) or -# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F -# -# For example, if you want to increase MariaDB's open-files-limit to 10000, -# you need to increase systemd's LimitNOFILE setting, use the contents below: -# -# [Service] -# LimitNOFILE=10000 - -[Unit] -Description=MariaDB 10.5 database server -Documentation=man:mariadbd(8) -Documentation=https://mariadb.com/kb/en/library/systemd/ -After=network.target - -[Install] -WantedBy=multi-user.target -Alias=mysql.service -Alias=mysqld.service - -[Service] -Type=notify -User=mysql -Group=mysql - -ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I -ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n -# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug #547485 -ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER -ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I - -# Setting this to true can break replication and the Type=notify settings -# See also bind-address MariaDB option. -PrivateNetwork=false - -KillSignal=SIGTERM - -# Don't want to see an automated SIGKILL ever -SendSIGKILL=no - -# Restart crashed server only, on-failure would also restart, for example, when -# my.cnf contains unknown option -Restart=on-abort -RestartSec=5s - -UMask=007 - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true diff --git a/templates/Fedora/39/etc/httpd/conf.d/phpMyAdmin.conf b/templates/Fedora/39/etc/httpd/conf.d/phpMyAdmin.conf deleted file mode 100644 index 98738c7..0000000 --- a/templates/Fedora/39/etc/httpd/conf.d/phpMyAdmin.conf +++ /dev/null @@ -1,46 +0,0 @@ -# phpMyAdmin - Web based MySQL browser written in php -# -# Allows only localhost by default -# -# But allowing phpMyAdmin to anyone other than localhost should be considered -# dangerous unless properly secured by SSL - -Alias /phpMyAdmin /usr/share/phpMyAdmin -Alias /phpmyadmin /usr/share/phpMyAdmin - - - AddDefaultCharset UTF-8 - Require ssl - - - - Require local - - -# These directories do not require access over HTTP - taken from the original -# phpMyAdmin upstream tarball -# - - Require all denied - - - - Require all denied - - - - Require all denied - - - - Require all denied - - -# This configuration prevents mod_security at phpMyAdmin directories from -# filtering SQL etc. This may break your mod_security implementation. -# -# -# -# SecRuleInheritance Off -# -# diff --git a/templates/Fedora/39/etc/my.cnf b/templates/Fedora/39/etc/my.cnf deleted file mode 100644 index 913b88f..0000000 --- a/templates/Fedora/39/etc/my.cnf +++ /dev/null @@ -1,11 +0,0 @@ -# -# This group is read both both by the client and the server -# use it for options that affect everything -# -[client-server] - -# -# include all files from the config directory -# -!includedir /etc/my.cnf.d - diff --git a/templates/Fedora/39/etc/my.cnf.d/auth_gssapi.cnf b/templates/Fedora/39/etc/my.cnf.d/auth_gssapi.cnf deleted file mode 100644 index c7cbc78..0000000 --- a/templates/Fedora/39/etc/my.cnf.d/auth_gssapi.cnf +++ /dev/null @@ -1,2 +0,0 @@ -[mariadb] -#plugin-load-add=auth_gssapi.so diff --git a/templates/Fedora/39/etc/my.cnf.d/client.cnf b/templates/Fedora/39/etc/my.cnf.d/client.cnf deleted file mode 100644 index 05442bf..0000000 --- a/templates/Fedora/39/etc/my.cnf.d/client.cnf +++ /dev/null @@ -1,14 +0,0 @@ -# -# These two groups are read by the client library -# Use it for options that affect all clients, but not the server -# -[client] -default-character-set = utf8mb4 - -# This group is not read by mysql client library, -# If you use the same .cnf file for MySQL and MariaDB, -# use it for MariaDB-only client options -[client-mariadb] -ssl -ssl-verify-server-cert - diff --git a/templates/Fedora/39/etc/my.cnf.d/cracklib_password_check.cnf b/templates/Fedora/39/etc/my.cnf.d/cracklib_password_check.cnf deleted file mode 100644 index 72cbcb1..0000000 --- a/templates/Fedora/39/etc/my.cnf.d/cracklib_password_check.cnf +++ /dev/null @@ -1,2 +0,0 @@ -[mariadb] -#plugin-load-add=cracklib_password_check.so diff --git a/templates/Fedora/39/etc/my.cnf.d/enable_encryption.preset b/templates/Fedora/39/etc/my.cnf.d/enable_encryption.preset deleted file mode 100644 index 722db7e..0000000 --- a/templates/Fedora/39/etc/my.cnf.d/enable_encryption.preset +++ /dev/null @@ -1,20 +0,0 @@ -# -# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d) -# and it will enable data at rest encryption. This is a simple way to -# ensure that everything that can be encrypted will be and your -# data will not leak unencrypted. -# -# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a -# newer version and your edits will be lost. Instead, add your edits -# to the .cnf file after the !include directive. -# -# NOTE that you also need to install an encryption plugin for the encryption -# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management -# -[mariadb] -aria-encrypt-tables -encrypt-binlog -encrypt-tmp-disk-tables -encrypt-tmp-files -loose-innodb-encrypt-log -loose-innodb-encrypt-tables diff --git a/templates/Fedora/39/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/39/etc/my.cnf.d/mariadb-server.cnf deleted file mode 100644 index 7239135..0000000 --- a/templates/Fedora/39/etc/my.cnf.d/mariadb-server.cnf +++ /dev/null @@ -1,59 +0,0 @@ -# -# These groups are read by MariaDB server. -# Use it for options that only the server (but not clients) should see -# -# See the examples of server my.cnf files in /usr/share/mysql/ -# - -# this is read by the standalone daemon and embedded servers -[server] - -# this is only for the mysqld standalone daemon -# Settings user and group are ignored when systemd is used. -# If you need to run mysqld under a different user or group, -# customize your systemd unit file for mysqld/mariadb according to the -# instructions in http://fedoraproject.org/wiki/Systemd -[mysqld] -datadir=/var/lib/mysql -socket=/var/lib/mysql/mysql.sock -log-error=/var/log/mariadb/mariadb.log -pid-file=/run/mariadb/mariadb.pid -character-set-server = utf8mb4 -ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm -ssl-key=/etc/my.cnf.d/certificates/privkey.epm -tls-version=TLSv1.2,TLSv1.3 - - -# -# * Galera-related settings -# -[galera] -# Mandatory settings -#wsrep_on=ON -#wsrep_provider= -#wsrep_cluster_address= -#binlog_format=row -#default_storage_engine=InnoDB -#innodb_autoinc_lock_mode=2 -# -# Allow server to accept connections on all interfaces. -# -#bind-address=0.0.0.0 -# -# Optional setting -#wsrep_slave_threads=1 -#innodb_flush_log_at_trx_commit=0 - -# this is only for embedded server -[embedded] - -# This group is only read by MariaDB servers, not by MySQL. -# If you use the same .cnf file for MySQL and MariaDB, -# you can put MariaDB-only options here -[mariadb] - -# This group is only read by MariaDB-10.5 servers. -# If you use the same .cnf file for MariaDB of different versions, -# use this group for options that older servers don't understand -[mariadb-10.5] - diff --git a/templates/Fedora/39/etc/my.cnf.d/mysql-clients.cnf b/templates/Fedora/39/etc/my.cnf.d/mysql-clients.cnf deleted file mode 100644 index 3df9b7b..0000000 --- a/templates/Fedora/39/etc/my.cnf.d/mysql-clients.cnf +++ /dev/null @@ -1,23 +0,0 @@ -# -# These groups are read by MariaDB command-line tools -# Use it for options that affect only one utility -# - -[mysql] - -[mysql_upgrade] - -[mysqladmin] - -[mysqlbinlog] - -[mysqlcheck] - -[mysqldump] - -[mysqlimport] - -[mysqlshow] - -[mysqlslap] - diff --git a/templates/Fedora/39/etc/my.cnf.d/spider.cnf b/templates/Fedora/39/etc/my.cnf.d/spider.cnf deleted file mode 100644 index ebc9968..0000000 --- a/templates/Fedora/39/etc/my.cnf.d/spider.cnf +++ /dev/null @@ -1,7 +0,0 @@ -[mariadb] -# -# Uncomment line to enable -# -#plugin-load-add = ha_spider - -# Read more at https://mariadb.com/kb/en/spider/ diff --git a/templates/Fedora/39/etc/phpMyAdmin/config.inc.php b/templates/Fedora/39/etc/phpMyAdmin/config.inc.php deleted file mode 100644 index b973a14..0000000 --- a/templates/Fedora/39/etc/phpMyAdmin/config.inc.php +++ /dev/null @@ -1,153 +0,0 @@ -. - */ - -declare(strict_types=1); - -/** - * This is needed for cookie based authentication to encrypt password in - * cookie. Needs to be 32 chars long. - */ -$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ - -/** - * Servers configuration - */ -$i = 0; - -/** - * First server - */ -$i++; -/* Authentication type */ -$cfg['Servers'][$i]['auth_type'] = 'cookie'; -/* Server parameters */ -$cfg['Servers'][$i]['host'] = 'localhost'; -$cfg['Servers'][$i]['compress'] = false; -$cfg['Servers'][$i]['AllowNoPassword'] = false; - -/** - * phpMyAdmin configuration storage settings. - */ - -/* User used to manipulate with storage */ -// $cfg['Servers'][$i]['controlhost'] = ''; -// $cfg['Servers'][$i]['controlport'] = ''; -// $cfg['Servers'][$i]['controluser'] = 'pma'; -// $cfg['Servers'][$i]['controlpass'] = 'pmapass'; - -/* Storage database and tables */ -// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; -// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; -// $cfg['Servers'][$i]['relation'] = 'pma__relation'; -// $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; -// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; -// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; -// $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; -// $cfg['Servers'][$i]['history'] = 'pma__history'; -// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; -// $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; -// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; -// $cfg['Servers'][$i]['recent'] = 'pma__recent'; -// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; -// $cfg['Servers'][$i]['users'] = 'pma__users'; -// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; -// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; -// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; -// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; -// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; -// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; - -/** - * End of servers configuration - */ - -/** - * Directories for saving/loading files from server - */ -$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload'; -$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; - -/** - * Whether to display icons or text or both icons and text in table row - * action segment. Value can be either of 'icons', 'text' or 'both'. - * default = 'both' - */ -//$cfg['RowActionType'] = 'icons'; - -/** - * Defines whether a user should be displayed a "show all (records)" - * button in browse mode or not. - * default = false - */ -//$cfg['ShowAll'] = true; - -/** - * Number of rows displayed when browsing a result set. If the result - * set contains more rows, "Previous" and "Next". - * Possible values: 25, 50, 100, 250, 500 - * default = 25 - */ -//$cfg['MaxRows'] = 50; - -/** - * Disallow editing of binary fields - * valid values are: - * false allow editing - * 'blob' allow editing except for BLOB fields - * 'noblob' disallow editing except for BLOB fields - * 'all' disallow editing - * default = 'blob' - */ -//$cfg['ProtectBinary'] = false; - -/** - * Default language to use, if not browser-defined or user-defined - * (you find all languages in the locale folder) - * uncomment the desired line: - * default = 'en' - */ -//$cfg['DefaultLang'] = 'en'; -//$cfg['DefaultLang'] = 'de'; - -/** - * How many columns should be used for table display of a database? - * (a value larger than 1 results in some information being hidden) - * default = 1 - */ -//$cfg['PropertiesNumColumns'] = 2; - -/** - * Set to true if you want DB-based query history.If false, this utilizes - * JS-routines to display query history (lost by window close) - * - * This requires configuration storage enabled, see above. - * default = false - */ -//$cfg['QueryHistoryDB'] = true; - -/** - * When using DB-based query history, how many entries should be kept? - * default = 25 - */ -//$cfg['QueryHistoryMax'] = 100; - -/** - * Whether or not to query the user before sending the error report to - * the phpMyAdmin team when a JavaScript error occurs - * - * Available options - * ('ask' | 'always' | 'never') - * default = 'ask' - */ -//$cfg['SendErrorReports'] = 'always'; - -/** - * You can find more configuration options in the documentation - * in the doc/ folder or at . - */ diff --git a/templates/Fedora/39/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/39/usr/lib/systemd/system/mariadb-copytls.service deleted file mode 100644 index 3f63078..0000000 --- a/templates/Fedora/39/usr/lib/systemd/system/mariadb-copytls.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Copy TLS Certificates for Mariadb - -[Service] -Type=oneshot -ExecStartPre=mkdir -p /etc/my.cnf.d/certificates -ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/{{ mariadb_vhost }}/*.pem /etc/my.cnf.d/certificates/' -ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates - -[Install] -WantedBy=mariadb.service diff --git a/templates/Fedora/39/usr/lib/systemd/system/mariadb-copytls.timer b/templates/Fedora/39/usr/lib/systemd/system/mariadb-copytls.timer deleted file mode 100644 index 8e5ad7b..0000000 --- a/templates/Fedora/39/usr/lib/systemd/system/mariadb-copytls.timer +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Copy TLS Certificates for Mariadb - -[Timer] -OnUnitActiveSec=5min - -[Install] -WantedBy=mariadb.service diff --git a/templates/Fedora/39/usr/lib/systemd/system/mariadb.service b/templates/Fedora/39/usr/lib/systemd/system/mariadb.service deleted file mode 100644 index d61fd82..0000000 --- a/templates/Fedora/39/usr/lib/systemd/system/mariadb.service +++ /dev/null @@ -1,64 +0,0 @@ -# It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, the -# best way is to: -# -# root> systemctl edit mariadb.service -# -# Then add additonal directives under a section (probably [Service]). -# -# For more info about custom unit files, see systemd.unit(5) or -# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F -# -# For example, if you want to increase MariaDB's open-files-limit to 10000, -# you need to increase systemd's LimitNOFILE setting, use the contents below: -# -# [Service] -# LimitNOFILE=10000 -# - -[Unit] -Description=MariaDB 10.5 database server -Documentation=man:mariadbd(8) -Documentation=https://mariadb.com/kb/en/library/systemd/ -After=network.target - -[Install] -WantedBy=multi-user.target -Alias=mysql.service -Alias=mysqld.service - -[Service] -Type=notify -User=mysql -Group=mysql - -ExecStartPre=/usr/libexec/mariadb-check-socket -# '%n' expands to 'Full unit name'; man systemd.unit -ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n -# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug #547485 -ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER -ExecStartPost=/usr/libexec/mariadb-check-upgrade - -# Setting this to true can break replication and the Type=notify settings -# See also bind-address MariaDB option. -PrivateNetwork=false - -KillSignal=SIGTERM - -# Don't want to see an automated SIGKILL ever -SendSIGKILL=no - -# Restart crashed server only, on-failure would also restart, for example, when -# my.cnf contains unknown option -Restart=on-abort -RestartSec=5s - -UMask=007 - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true diff --git a/templates/Fedora/39/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/39/usr/lib/systemd/system/mariadb@.service deleted file mode 100644 index 10ca8fd..0000000 --- a/templates/Fedora/39/usr/lib/systemd/system/mariadb@.service +++ /dev/null @@ -1,85 +0,0 @@ -# Multi instance version of MariaDB. For if you run mutiple verions at once. -# Also used for mariadb@bootstrap to bootstrap Galera. -# -# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in -# /etc/@my.cnf to change per instance settings. A minimumal necessary -# configuration items to change to avoid conflicts between instances is: -# -# [mariadbd.instancename] -# # TCP port to make available for clients -# port=3306 -# # Socket to make available for clients -# socket=/tmp/mariadb-instancename.sock -# # Where MariaDB should store all its data -# datadir=/usr/local/mariadb-instancename/data -# -# and start the service via: -# -# root> systemctl start mariadb@{instancename}.server -# -# It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, for -# all instances, the best way is: -# -# root> systemctl edit mariadb@.service -# -# Then add additonal directives under a section (probably [Service]). -# -# If you only want to change a specific instance: -# -# root> systemctl edit mariadb@{instancename}.server -# -# For more info about custom unit files, see systemd.unit(5) or -# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F -# -# For example, if you want to increase MariaDB's open-files-limit to 10000, -# you need to increase systemd's LimitNOFILE setting, use the contents below: -# -# [Service] -# LimitNOFILE=10000 - -[Unit] -Description=MariaDB 10.5 database server -Documentation=man:mariadbd(8) -Documentation=https://mariadb.com/kb/en/library/systemd/ -After=network.target - -[Install] -WantedBy=multi-user.target -Alias=mysql.service -Alias=mysqld.service - -[Service] -Type=notify -User=mysql -Group=mysql - -ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I -ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n -# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug #547485 -ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER -ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I - -# Setting this to true can break replication and the Type=notify settings -# See also bind-address MariaDB option. -PrivateNetwork=false - -KillSignal=SIGTERM - -# Don't want to see an automated SIGKILL ever -SendSIGKILL=no - -# Restart crashed server only, on-failure would also restart, for example, when -# my.cnf contains unknown option -Restart=on-abort -RestartSec=5s - -UMask=007 - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true diff --git a/templates/Fedora/40/etc/httpd/conf.d/phpMyAdmin.conf b/templates/Fedora/40/etc/httpd/conf.d/phpMyAdmin.conf deleted file mode 100644 index 98738c7..0000000 --- a/templates/Fedora/40/etc/httpd/conf.d/phpMyAdmin.conf +++ /dev/null @@ -1,46 +0,0 @@ -# phpMyAdmin - Web based MySQL browser written in php -# -# Allows only localhost by default -# -# But allowing phpMyAdmin to anyone other than localhost should be considered -# dangerous unless properly secured by SSL - -Alias /phpMyAdmin /usr/share/phpMyAdmin -Alias /phpmyadmin /usr/share/phpMyAdmin - - - AddDefaultCharset UTF-8 - Require ssl - - - - Require local - - -# These directories do not require access over HTTP - taken from the original -# phpMyAdmin upstream tarball -# - - Require all denied - - - - Require all denied - - - - Require all denied - - - - Require all denied - - -# This configuration prevents mod_security at phpMyAdmin directories from -# filtering SQL etc. This may break your mod_security implementation. -# -# -# -# SecRuleInheritance Off -# -# diff --git a/templates/Fedora/40/etc/my.cnf b/templates/Fedora/40/etc/my.cnf deleted file mode 100644 index 913b88f..0000000 --- a/templates/Fedora/40/etc/my.cnf +++ /dev/null @@ -1,11 +0,0 @@ -# -# This group is read both both by the client and the server -# use it for options that affect everything -# -[client-server] - -# -# include all files from the config directory -# -!includedir /etc/my.cnf.d - diff --git a/templates/Fedora/40/etc/my.cnf.d/auth_gssapi.cnf b/templates/Fedora/40/etc/my.cnf.d/auth_gssapi.cnf deleted file mode 100644 index c7cbc78..0000000 --- a/templates/Fedora/40/etc/my.cnf.d/auth_gssapi.cnf +++ /dev/null @@ -1,2 +0,0 @@ -[mariadb] -#plugin-load-add=auth_gssapi.so diff --git a/templates/Fedora/40/etc/my.cnf.d/client.cnf b/templates/Fedora/40/etc/my.cnf.d/client.cnf deleted file mode 100644 index 05442bf..0000000 --- a/templates/Fedora/40/etc/my.cnf.d/client.cnf +++ /dev/null @@ -1,14 +0,0 @@ -# -# These two groups are read by the client library -# Use it for options that affect all clients, but not the server -# -[client] -default-character-set = utf8mb4 - -# This group is not read by mysql client library, -# If you use the same .cnf file for MySQL and MariaDB, -# use it for MariaDB-only client options -[client-mariadb] -ssl -ssl-verify-server-cert - diff --git a/templates/Fedora/40/etc/my.cnf.d/cracklib_password_check.cnf b/templates/Fedora/40/etc/my.cnf.d/cracklib_password_check.cnf deleted file mode 100644 index 72cbcb1..0000000 --- a/templates/Fedora/40/etc/my.cnf.d/cracklib_password_check.cnf +++ /dev/null @@ -1,2 +0,0 @@ -[mariadb] -#plugin-load-add=cracklib_password_check.so diff --git a/templates/Fedora/40/etc/my.cnf.d/enable_encryption.preset b/templates/Fedora/40/etc/my.cnf.d/enable_encryption.preset deleted file mode 100644 index 722db7e..0000000 --- a/templates/Fedora/40/etc/my.cnf.d/enable_encryption.preset +++ /dev/null @@ -1,20 +0,0 @@ -# -# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d) -# and it will enable data at rest encryption. This is a simple way to -# ensure that everything that can be encrypted will be and your -# data will not leak unencrypted. -# -# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a -# newer version and your edits will be lost. Instead, add your edits -# to the .cnf file after the !include directive. -# -# NOTE that you also need to install an encryption plugin for the encryption -# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management -# -[mariadb] -aria-encrypt-tables -encrypt-binlog -encrypt-tmp-disk-tables -encrypt-tmp-files -loose-innodb-encrypt-log -loose-innodb-encrypt-tables diff --git a/templates/Fedora/40/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/40/etc/my.cnf.d/mariadb-server.cnf deleted file mode 100644 index 7239135..0000000 --- a/templates/Fedora/40/etc/my.cnf.d/mariadb-server.cnf +++ /dev/null @@ -1,59 +0,0 @@ -# -# These groups are read by MariaDB server. -# Use it for options that only the server (but not clients) should see -# -# See the examples of server my.cnf files in /usr/share/mysql/ -# - -# this is read by the standalone daemon and embedded servers -[server] - -# this is only for the mysqld standalone daemon -# Settings user and group are ignored when systemd is used. -# If you need to run mysqld under a different user or group, -# customize your systemd unit file for mysqld/mariadb according to the -# instructions in http://fedoraproject.org/wiki/Systemd -[mysqld] -datadir=/var/lib/mysql -socket=/var/lib/mysql/mysql.sock -log-error=/var/log/mariadb/mariadb.log -pid-file=/run/mariadb/mariadb.pid -character-set-server = utf8mb4 -ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm -ssl-key=/etc/my.cnf.d/certificates/privkey.epm -tls-version=TLSv1.2,TLSv1.3 - - -# -# * Galera-related settings -# -[galera] -# Mandatory settings -#wsrep_on=ON -#wsrep_provider= -#wsrep_cluster_address= -#binlog_format=row -#default_storage_engine=InnoDB -#innodb_autoinc_lock_mode=2 -# -# Allow server to accept connections on all interfaces. -# -#bind-address=0.0.0.0 -# -# Optional setting -#wsrep_slave_threads=1 -#innodb_flush_log_at_trx_commit=0 - -# this is only for embedded server -[embedded] - -# This group is only read by MariaDB servers, not by MySQL. -# If you use the same .cnf file for MySQL and MariaDB, -# you can put MariaDB-only options here -[mariadb] - -# This group is only read by MariaDB-10.5 servers. -# If you use the same .cnf file for MariaDB of different versions, -# use this group for options that older servers don't understand -[mariadb-10.5] - diff --git a/templates/Fedora/40/etc/my.cnf.d/mysql-clients.cnf b/templates/Fedora/40/etc/my.cnf.d/mysql-clients.cnf deleted file mode 100644 index 3df9b7b..0000000 --- a/templates/Fedora/40/etc/my.cnf.d/mysql-clients.cnf +++ /dev/null @@ -1,23 +0,0 @@ -# -# These groups are read by MariaDB command-line tools -# Use it for options that affect only one utility -# - -[mysql] - -[mysql_upgrade] - -[mysqladmin] - -[mysqlbinlog] - -[mysqlcheck] - -[mysqldump] - -[mysqlimport] - -[mysqlshow] - -[mysqlslap] - diff --git a/templates/Fedora/40/etc/my.cnf.d/spider.cnf b/templates/Fedora/40/etc/my.cnf.d/spider.cnf deleted file mode 100644 index ebc9968..0000000 --- a/templates/Fedora/40/etc/my.cnf.d/spider.cnf +++ /dev/null @@ -1,7 +0,0 @@ -[mariadb] -# -# Uncomment line to enable -# -#plugin-load-add = ha_spider - -# Read more at https://mariadb.com/kb/en/spider/ diff --git a/templates/Fedora/40/etc/phpMyAdmin/config.inc.php b/templates/Fedora/40/etc/phpMyAdmin/config.inc.php deleted file mode 100644 index b973a14..0000000 --- a/templates/Fedora/40/etc/phpMyAdmin/config.inc.php +++ /dev/null @@ -1,153 +0,0 @@ -. - */ - -declare(strict_types=1); - -/** - * This is needed for cookie based authentication to encrypt password in - * cookie. Needs to be 32 chars long. - */ -$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ - -/** - * Servers configuration - */ -$i = 0; - -/** - * First server - */ -$i++; -/* Authentication type */ -$cfg['Servers'][$i]['auth_type'] = 'cookie'; -/* Server parameters */ -$cfg['Servers'][$i]['host'] = 'localhost'; -$cfg['Servers'][$i]['compress'] = false; -$cfg['Servers'][$i]['AllowNoPassword'] = false; - -/** - * phpMyAdmin configuration storage settings. - */ - -/* User used to manipulate with storage */ -// $cfg['Servers'][$i]['controlhost'] = ''; -// $cfg['Servers'][$i]['controlport'] = ''; -// $cfg['Servers'][$i]['controluser'] = 'pma'; -// $cfg['Servers'][$i]['controlpass'] = 'pmapass'; - -/* Storage database and tables */ -// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; -// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; -// $cfg['Servers'][$i]['relation'] = 'pma__relation'; -// $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; -// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; -// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; -// $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; -// $cfg['Servers'][$i]['history'] = 'pma__history'; -// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; -// $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; -// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; -// $cfg['Servers'][$i]['recent'] = 'pma__recent'; -// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; -// $cfg['Servers'][$i]['users'] = 'pma__users'; -// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; -// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; -// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; -// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; -// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; -// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; - -/** - * End of servers configuration - */ - -/** - * Directories for saving/loading files from server - */ -$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload'; -$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; - -/** - * Whether to display icons or text or both icons and text in table row - * action segment. Value can be either of 'icons', 'text' or 'both'. - * default = 'both' - */ -//$cfg['RowActionType'] = 'icons'; - -/** - * Defines whether a user should be displayed a "show all (records)" - * button in browse mode or not. - * default = false - */ -//$cfg['ShowAll'] = true; - -/** - * Number of rows displayed when browsing a result set. If the result - * set contains more rows, "Previous" and "Next". - * Possible values: 25, 50, 100, 250, 500 - * default = 25 - */ -//$cfg['MaxRows'] = 50; - -/** - * Disallow editing of binary fields - * valid values are: - * false allow editing - * 'blob' allow editing except for BLOB fields - * 'noblob' disallow editing except for BLOB fields - * 'all' disallow editing - * default = 'blob' - */ -//$cfg['ProtectBinary'] = false; - -/** - * Default language to use, if not browser-defined or user-defined - * (you find all languages in the locale folder) - * uncomment the desired line: - * default = 'en' - */ -//$cfg['DefaultLang'] = 'en'; -//$cfg['DefaultLang'] = 'de'; - -/** - * How many columns should be used for table display of a database? - * (a value larger than 1 results in some information being hidden) - * default = 1 - */ -//$cfg['PropertiesNumColumns'] = 2; - -/** - * Set to true if you want DB-based query history.If false, this utilizes - * JS-routines to display query history (lost by window close) - * - * This requires configuration storage enabled, see above. - * default = false - */ -//$cfg['QueryHistoryDB'] = true; - -/** - * When using DB-based query history, how many entries should be kept? - * default = 25 - */ -//$cfg['QueryHistoryMax'] = 100; - -/** - * Whether or not to query the user before sending the error report to - * the phpMyAdmin team when a JavaScript error occurs - * - * Available options - * ('ask' | 'always' | 'never') - * default = 'ask' - */ -//$cfg['SendErrorReports'] = 'always'; - -/** - * You can find more configuration options in the documentation - * in the doc/ folder or at . - */ diff --git a/templates/Fedora/40/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/40/usr/lib/systemd/system/mariadb-copytls.service deleted file mode 100644 index 3f63078..0000000 --- a/templates/Fedora/40/usr/lib/systemd/system/mariadb-copytls.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Copy TLS Certificates for Mariadb - -[Service] -Type=oneshot -ExecStartPre=mkdir -p /etc/my.cnf.d/certificates -ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/{{ mariadb_vhost }}/*.pem /etc/my.cnf.d/certificates/' -ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates - -[Install] -WantedBy=mariadb.service diff --git a/templates/Fedora/40/usr/lib/systemd/system/mariadb-copytls.timer b/templates/Fedora/40/usr/lib/systemd/system/mariadb-copytls.timer deleted file mode 100644 index 8e5ad7b..0000000 --- a/templates/Fedora/40/usr/lib/systemd/system/mariadb-copytls.timer +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Copy TLS Certificates for Mariadb - -[Timer] -OnUnitActiveSec=5min - -[Install] -WantedBy=mariadb.service diff --git a/templates/Fedora/40/usr/lib/systemd/system/mariadb.service b/templates/Fedora/40/usr/lib/systemd/system/mariadb.service deleted file mode 100644 index d61fd82..0000000 --- a/templates/Fedora/40/usr/lib/systemd/system/mariadb.service +++ /dev/null @@ -1,64 +0,0 @@ -# It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, the -# best way is to: -# -# root> systemctl edit mariadb.service -# -# Then add additonal directives under a section (probably [Service]). -# -# For more info about custom unit files, see systemd.unit(5) or -# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F -# -# For example, if you want to increase MariaDB's open-files-limit to 10000, -# you need to increase systemd's LimitNOFILE setting, use the contents below: -# -# [Service] -# LimitNOFILE=10000 -# - -[Unit] -Description=MariaDB 10.5 database server -Documentation=man:mariadbd(8) -Documentation=https://mariadb.com/kb/en/library/systemd/ -After=network.target - -[Install] -WantedBy=multi-user.target -Alias=mysql.service -Alias=mysqld.service - -[Service] -Type=notify -User=mysql -Group=mysql - -ExecStartPre=/usr/libexec/mariadb-check-socket -# '%n' expands to 'Full unit name'; man systemd.unit -ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n -# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug #547485 -ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER -ExecStartPost=/usr/libexec/mariadb-check-upgrade - -# Setting this to true can break replication and the Type=notify settings -# See also bind-address MariaDB option. -PrivateNetwork=false - -KillSignal=SIGTERM - -# Don't want to see an automated SIGKILL ever -SendSIGKILL=no - -# Restart crashed server only, on-failure would also restart, for example, when -# my.cnf contains unknown option -Restart=on-abort -RestartSec=5s - -UMask=007 - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true diff --git a/templates/Fedora/40/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/40/usr/lib/systemd/system/mariadb@.service deleted file mode 100644 index 10ca8fd..0000000 --- a/templates/Fedora/40/usr/lib/systemd/system/mariadb@.service +++ /dev/null @@ -1,85 +0,0 @@ -# Multi instance version of MariaDB. For if you run mutiple verions at once. -# Also used for mariadb@bootstrap to bootstrap Galera. -# -# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in -# /etc/@my.cnf to change per instance settings. A minimumal necessary -# configuration items to change to avoid conflicts between instances is: -# -# [mariadbd.instancename] -# # TCP port to make available for clients -# port=3306 -# # Socket to make available for clients -# socket=/tmp/mariadb-instancename.sock -# # Where MariaDB should store all its data -# datadir=/usr/local/mariadb-instancename/data -# -# and start the service via: -# -# root> systemctl start mariadb@{instancename}.server -# -# It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, for -# all instances, the best way is: -# -# root> systemctl edit mariadb@.service -# -# Then add additonal directives under a section (probably [Service]). -# -# If you only want to change a specific instance: -# -# root> systemctl edit mariadb@{instancename}.server -# -# For more info about custom unit files, see systemd.unit(5) or -# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F -# -# For example, if you want to increase MariaDB's open-files-limit to 10000, -# you need to increase systemd's LimitNOFILE setting, use the contents below: -# -# [Service] -# LimitNOFILE=10000 - -[Unit] -Description=MariaDB 10.5 database server -Documentation=man:mariadbd(8) -Documentation=https://mariadb.com/kb/en/library/systemd/ -After=network.target - -[Install] -WantedBy=multi-user.target -Alias=mysql.service -Alias=mysqld.service - -[Service] -Type=notify -User=mysql -Group=mysql - -ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I -ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n -# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug #547485 -ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER -ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I - -# Setting this to true can break replication and the Type=notify settings -# See also bind-address MariaDB option. -PrivateNetwork=false - -KillSignal=SIGTERM - -# Don't want to see an automated SIGKILL ever -SendSIGKILL=no - -# Restart crashed server only, on-failure would also restart, for example, when -# my.cnf contains unknown option -Restart=on-abort -RestartSec=5s - -UMask=007 - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true diff --git a/templates/Fedora/41/etc/httpd/conf.d/phpMyAdmin.conf b/templates/Fedora/41/etc/httpd/conf.d/phpMyAdmin.conf deleted file mode 100644 index 98738c7..0000000 --- a/templates/Fedora/41/etc/httpd/conf.d/phpMyAdmin.conf +++ /dev/null @@ -1,46 +0,0 @@ -# phpMyAdmin - Web based MySQL browser written in php -# -# Allows only localhost by default -# -# But allowing phpMyAdmin to anyone other than localhost should be considered -# dangerous unless properly secured by SSL - -Alias /phpMyAdmin /usr/share/phpMyAdmin -Alias /phpmyadmin /usr/share/phpMyAdmin - - - AddDefaultCharset UTF-8 - Require ssl - - - - Require local - - -# These directories do not require access over HTTP - taken from the original -# phpMyAdmin upstream tarball -# - - Require all denied - - - - Require all denied - - - - Require all denied - - - - Require all denied - - -# This configuration prevents mod_security at phpMyAdmin directories from -# filtering SQL etc. This may break your mod_security implementation. -# -# -# -# SecRuleInheritance Off -# -# diff --git a/templates/Fedora/41/etc/my.cnf b/templates/Fedora/41/etc/my.cnf deleted file mode 100644 index 913b88f..0000000 --- a/templates/Fedora/41/etc/my.cnf +++ /dev/null @@ -1,11 +0,0 @@ -# -# This group is read both both by the client and the server -# use it for options that affect everything -# -[client-server] - -# -# include all files from the config directory -# -!includedir /etc/my.cnf.d - diff --git a/templates/Fedora/41/etc/my.cnf.d/auth_gssapi.cnf b/templates/Fedora/41/etc/my.cnf.d/auth_gssapi.cnf deleted file mode 100644 index c7cbc78..0000000 --- a/templates/Fedora/41/etc/my.cnf.d/auth_gssapi.cnf +++ /dev/null @@ -1,2 +0,0 @@ -[mariadb] -#plugin-load-add=auth_gssapi.so diff --git a/templates/Fedora/41/etc/my.cnf.d/client.cnf b/templates/Fedora/41/etc/my.cnf.d/client.cnf deleted file mode 100644 index 05442bf..0000000 --- a/templates/Fedora/41/etc/my.cnf.d/client.cnf +++ /dev/null @@ -1,14 +0,0 @@ -# -# These two groups are read by the client library -# Use it for options that affect all clients, but not the server -# -[client] -default-character-set = utf8mb4 - -# This group is not read by mysql client library, -# If you use the same .cnf file for MySQL and MariaDB, -# use it for MariaDB-only client options -[client-mariadb] -ssl -ssl-verify-server-cert - diff --git a/templates/Fedora/41/etc/my.cnf.d/cracklib_password_check.cnf b/templates/Fedora/41/etc/my.cnf.d/cracklib_password_check.cnf deleted file mode 100644 index 72cbcb1..0000000 --- a/templates/Fedora/41/etc/my.cnf.d/cracklib_password_check.cnf +++ /dev/null @@ -1,2 +0,0 @@ -[mariadb] -#plugin-load-add=cracklib_password_check.so diff --git a/templates/Fedora/41/etc/my.cnf.d/enable_encryption.preset b/templates/Fedora/41/etc/my.cnf.d/enable_encryption.preset deleted file mode 100644 index 722db7e..0000000 --- a/templates/Fedora/41/etc/my.cnf.d/enable_encryption.preset +++ /dev/null @@ -1,20 +0,0 @@ -# -# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d) -# and it will enable data at rest encryption. This is a simple way to -# ensure that everything that can be encrypted will be and your -# data will not leak unencrypted. -# -# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a -# newer version and your edits will be lost. Instead, add your edits -# to the .cnf file after the !include directive. -# -# NOTE that you also need to install an encryption plugin for the encryption -# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management -# -[mariadb] -aria-encrypt-tables -encrypt-binlog -encrypt-tmp-disk-tables -encrypt-tmp-files -loose-innodb-encrypt-log -loose-innodb-encrypt-tables diff --git a/templates/Fedora/41/etc/my.cnf.d/hashicorp_key_management.cnf b/templates/Fedora/41/etc/my.cnf.d/hashicorp_key_management.cnf deleted file mode 100644 index 275626a..0000000 --- a/templates/Fedora/41/etc/my.cnf.d/hashicorp_key_management.cnf +++ /dev/null @@ -1,117 +0,0 @@ -# Copyright (C) 2019-2022 MariaDB Corporation -# -# This is a default configuration for the Hashicorp Vault plugin. -# You can read more about the parameters of this plugin in the -# hashicorp_key_management.txt file. -# -# NOTE THAT YOU MUST MANUALLY UNCOMMENT THE "plugin-load-add" -# LINE AND ALL THE NECESSARY PARAMETERS BELOW, SETTING THEM -# TO APPROPRIATE VALUES! -# -[mariadb] - -# -# To use Hashicorp Vault KMS, the plugin must be preloaded and -# activated on the server: -# -#plugin-load-add=hashicorp_key_management.so - -# Most of its parameters should not be changed during plugin -# operation and therefore must be preconfigured as part of -# the server configuration: - -# -# HTTP[s] URL that is used to connect to the Hashicorp Vault server. -# It must include the name of the scheme ("https://" for a secure -# connection) and, according to the API rules for storages of the -# key-value type in Hashicorp Vault, after the server address, the -# path must begin with the "/v1/" string (as prefix), for example: -# "https://127.0.0.1:8200/v1/my_secrets" -# -#hashicorp-key-management-vault-url="" - -# -# Authentication token that passed to the Hashicorp Vault -# in the request header: -# -#hashicorp-key-management-token="" - -# -# Optional path to the Certificate Authority (CA) bundle -# (is a file that contains root and intermediate certificates): -# -#hashicorp-key-management-vault-ca="" - -# -# Set the duration (in seconds) for the Hashicorp Vault server -# connection timeout. The allowed range is from 1 to 86400 seconds. -# The user can also specify a zero value, which means the default -# timeout value set by the libcurl library (currently 300 seconds): -# -#hashicorp-key-management-timeout=15 - -# -# Number of server request retries in case of timeout: -# -#hashicorp-key-management-retries=3 - -# -# Enable key caching (storing key values received from -# the Hashicorp Vault server in the local memory): -# -#hashicorp-key-management-caching-enabled="on" - -# -# This parameter instructs the plugin to use the key values -# or version numbers taken from the cache in the event of a -# timeout when accessing the vault server. By default this -# option is disabled. -# -# Please note that key values or version numbers will be read -# from the cache when the timeout expires only after the number -# of attempts to read them from the storage server that specified -# by the hashicorp-key-management-retries parameter has been -# exhausted: -# -#hashicorp-key-management-use-cache-on-timeout="off" - -# -# The time (in milliseconds) after which the value of the key -# stored in the cache becomes invalid and an attempt to read this -# data causes a new request send to the vault server. By default, -# cache entries become invalid after 60,000 milliseconds (after -# one minute). -# -# If the value of this parameter is zero, then the keys will always -# be considered invalid, but they still can be used if the vault -# server is unavailable and the corresponding cache operating mode -# (--[loose-]hashicorp-key-management-use-cache-on-timeout="on") -# is enabled. -# -#hashicorp-key-management-cache-timeout=0 - -# -# The time (in milliseconds) after which the information about -# latest version number of the key (which stored in the cache) -# becomes invalid and an attempt to read this information causes -# a new request send to the vault server. -# -# If the value of this parameter is zero, then information abount -# latest key version numbers always considered invalid, unless -# there is no communication with the vault server and use of the -# cache is allowed when the server is unavailable. -# -# By default, this parameter is zero, that is, the latest version -# numbers for the keys stored in the cache are considered always -# invalid, except when the vault server is unavailable and use -# of the cache is allowed on server failures. -# -#hashicorp-key-management-cache-version-timeout=0 - -# -# This parameter enables ("on", this is the default value) or disables -# ("off") checking the kv storage version during plugin initialization. -# The plugin requires storage to be version 2 or older in order for it -# to work properly. -# -#hashicorp-key-management-check-kv-version=on diff --git a/templates/Fedora/41/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/41/etc/my.cnf.d/mariadb-server.cnf deleted file mode 100644 index 3ae4a70..0000000 --- a/templates/Fedora/41/etc/my.cnf.d/mariadb-server.cnf +++ /dev/null @@ -1,59 +0,0 @@ -# -# These groups are read by MariaDB server. -# Use it for options that only the server (but not clients) should see -# -# See the examples of server my.cnf files in /usr/share/mysql/ -# - -# this is read by the standalone daemon and embedded servers -[server] - -# this is only for the mysqld standalone daemon -# Settings user and group are ignored when systemd is used. -# If you need to run mysqld under a different user or group, -# customize your systemd unit file for mysqld/mariadb according to the -# instructions in http://fedoraproject.org/wiki/Systemd -[mysqld] -datadir=/var/lib/mysql -socket=/var/lib/mysql/mysql.sock -log-error=/var/log/mariadb/mariadb.log -pid-file=/run/mariadb/mariadb.pid -character-set-server = utf8mb4 -ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm -ssl-key=/etc/my.cnf.d/certificates/privkey.epm -tls-version=TLSv1.2,TLSv1.3 - - -# -# * Galera-related settings -# -[galera] -# Mandatory settings -#wsrep_on=ON -#wsrep_provider= -#wsrep_cluster_address= -#binlog_format=row -#default_storage_engine=InnoDB -#innodb_autoinc_lock_mode=2 -# -# Allow server to accept connections on all interfaces. -# -#bind-address=0.0.0.0 -# -# Optional setting -#wsrep_slave_threads=1 -#innodb_flush_log_at_trx_commit=0 - -# this is only for embedded server -[embedded] - -# This group is only read by MariaDB servers, not by MySQL. -# If you use the same .cnf file for MySQL and MariaDB, -# you can put MariaDB-only options here -[mariadb] - -# This group is only read by MariaDB-10.11 servers. -# If you use the same .cnf file for MariaDB of different versions, -# use this group for options that older servers don't understand -[mariadb-10.11] - diff --git a/templates/Fedora/41/etc/my.cnf.d/mysql-clients.cnf b/templates/Fedora/41/etc/my.cnf.d/mysql-clients.cnf deleted file mode 100644 index 3df9b7b..0000000 --- a/templates/Fedora/41/etc/my.cnf.d/mysql-clients.cnf +++ /dev/null @@ -1,23 +0,0 @@ -# -# These groups are read by MariaDB command-line tools -# Use it for options that affect only one utility -# - -[mysql] - -[mysql_upgrade] - -[mysqladmin] - -[mysqlbinlog] - -[mysqlcheck] - -[mysqldump] - -[mysqlimport] - -[mysqlshow] - -[mysqlslap] - diff --git a/templates/Fedora/41/etc/my.cnf.d/provider_bzip2.cnf b/templates/Fedora/41/etc/my.cnf.d/provider_bzip2.cnf deleted file mode 100644 index 9b855e8..0000000 --- a/templates/Fedora/41/etc/my.cnf.d/provider_bzip2.cnf +++ /dev/null @@ -1,3 +0,0 @@ -[server] -plugin_load_add=provider_bzip2 -provider_bzip2=force_plus_permanent diff --git a/templates/Fedora/41/etc/my.cnf.d/provider_lz4.cnf b/templates/Fedora/41/etc/my.cnf.d/provider_lz4.cnf deleted file mode 100644 index 0b8a3ec..0000000 --- a/templates/Fedora/41/etc/my.cnf.d/provider_lz4.cnf +++ /dev/null @@ -1,3 +0,0 @@ -[server] -plugin_load_add=provider_lz4 -provider_lz4=force_plus_permanent diff --git a/templates/Fedora/41/etc/my.cnf.d/provider_lzma.cnf b/templates/Fedora/41/etc/my.cnf.d/provider_lzma.cnf deleted file mode 100644 index 3a05a35..0000000 --- a/templates/Fedora/41/etc/my.cnf.d/provider_lzma.cnf +++ /dev/null @@ -1,3 +0,0 @@ -[server] -plugin_load_add=provider_lzma -provider_lzma=force_plus_permanent diff --git a/templates/Fedora/41/etc/my.cnf.d/provider_lzo.cnf b/templates/Fedora/41/etc/my.cnf.d/provider_lzo.cnf deleted file mode 100644 index 6580198..0000000 --- a/templates/Fedora/41/etc/my.cnf.d/provider_lzo.cnf +++ /dev/null @@ -1,3 +0,0 @@ -[server] -plugin_load_add=provider_lzo -provider_lzo=force_plus_permanent diff --git a/templates/Fedora/41/etc/my.cnf.d/provider_snappy.cnf b/templates/Fedora/41/etc/my.cnf.d/provider_snappy.cnf deleted file mode 100644 index da78207..0000000 --- a/templates/Fedora/41/etc/my.cnf.d/provider_snappy.cnf +++ /dev/null @@ -1,3 +0,0 @@ -[server] -plugin_load_add=provider_snappy -provider_snappy=force_plus_permanent diff --git a/templates/Fedora/41/etc/my.cnf.d/spider.cnf b/templates/Fedora/41/etc/my.cnf.d/spider.cnf deleted file mode 100644 index ebc9968..0000000 --- a/templates/Fedora/41/etc/my.cnf.d/spider.cnf +++ /dev/null @@ -1,7 +0,0 @@ -[mariadb] -# -# Uncomment line to enable -# -#plugin-load-add = ha_spider - -# Read more at https://mariadb.com/kb/en/spider/ diff --git a/templates/Fedora/41/etc/phpMyAdmin/config.inc.php b/templates/Fedora/41/etc/phpMyAdmin/config.inc.php deleted file mode 100644 index b973a14..0000000 --- a/templates/Fedora/41/etc/phpMyAdmin/config.inc.php +++ /dev/null @@ -1,153 +0,0 @@ -. - */ - -declare(strict_types=1); - -/** - * This is needed for cookie based authentication to encrypt password in - * cookie. Needs to be 32 chars long. - */ -$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ - -/** - * Servers configuration - */ -$i = 0; - -/** - * First server - */ -$i++; -/* Authentication type */ -$cfg['Servers'][$i]['auth_type'] = 'cookie'; -/* Server parameters */ -$cfg['Servers'][$i]['host'] = 'localhost'; -$cfg['Servers'][$i]['compress'] = false; -$cfg['Servers'][$i]['AllowNoPassword'] = false; - -/** - * phpMyAdmin configuration storage settings. - */ - -/* User used to manipulate with storage */ -// $cfg['Servers'][$i]['controlhost'] = ''; -// $cfg['Servers'][$i]['controlport'] = ''; -// $cfg['Servers'][$i]['controluser'] = 'pma'; -// $cfg['Servers'][$i]['controlpass'] = 'pmapass'; - -/* Storage database and tables */ -// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; -// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; -// $cfg['Servers'][$i]['relation'] = 'pma__relation'; -// $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; -// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; -// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; -// $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; -// $cfg['Servers'][$i]['history'] = 'pma__history'; -// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; -// $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; -// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; -// $cfg['Servers'][$i]['recent'] = 'pma__recent'; -// $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; -// $cfg['Servers'][$i]['users'] = 'pma__users'; -// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; -// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; -// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; -// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; -// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; -// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; - -/** - * End of servers configuration - */ - -/** - * Directories for saving/loading files from server - */ -$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload'; -$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; - -/** - * Whether to display icons or text or both icons and text in table row - * action segment. Value can be either of 'icons', 'text' or 'both'. - * default = 'both' - */ -//$cfg['RowActionType'] = 'icons'; - -/** - * Defines whether a user should be displayed a "show all (records)" - * button in browse mode or not. - * default = false - */ -//$cfg['ShowAll'] = true; - -/** - * Number of rows displayed when browsing a result set. If the result - * set contains more rows, "Previous" and "Next". - * Possible values: 25, 50, 100, 250, 500 - * default = 25 - */ -//$cfg['MaxRows'] = 50; - -/** - * Disallow editing of binary fields - * valid values are: - * false allow editing - * 'blob' allow editing except for BLOB fields - * 'noblob' disallow editing except for BLOB fields - * 'all' disallow editing - * default = 'blob' - */ -//$cfg['ProtectBinary'] = false; - -/** - * Default language to use, if not browser-defined or user-defined - * (you find all languages in the locale folder) - * uncomment the desired line: - * default = 'en' - */ -//$cfg['DefaultLang'] = 'en'; -//$cfg['DefaultLang'] = 'de'; - -/** - * How many columns should be used for table display of a database? - * (a value larger than 1 results in some information being hidden) - * default = 1 - */ -//$cfg['PropertiesNumColumns'] = 2; - -/** - * Set to true if you want DB-based query history.If false, this utilizes - * JS-routines to display query history (lost by window close) - * - * This requires configuration storage enabled, see above. - * default = false - */ -//$cfg['QueryHistoryDB'] = true; - -/** - * When using DB-based query history, how many entries should be kept? - * default = 25 - */ -//$cfg['QueryHistoryMax'] = 100; - -/** - * Whether or not to query the user before sending the error report to - * the phpMyAdmin team when a JavaScript error occurs - * - * Available options - * ('ask' | 'always' | 'never') - * default = 'ask' - */ -//$cfg['SendErrorReports'] = 'always'; - -/** - * You can find more configuration options in the documentation - * in the doc/ folder or at . - */ diff --git a/templates/Fedora/41/usr/lib/systemd/system/mariadb-copytls.service b/templates/Fedora/41/usr/lib/systemd/system/mariadb-copytls.service deleted file mode 100644 index 3f63078..0000000 --- a/templates/Fedora/41/usr/lib/systemd/system/mariadb-copytls.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Copy TLS Certificates for Mariadb - -[Service] -Type=oneshot -ExecStartPre=mkdir -p /etc/my.cnf.d/certificates -ExecStart=/bin/bash -lc 'cp /etc/httpd/md/domains/{{ mariadb_vhost }}/*.pem /etc/my.cnf.d/certificates/' -ExecStartPost=chown -R mysql:mysql /etc/my.cnf.d/certificates - -[Install] -WantedBy=mariadb.service diff --git a/templates/Fedora/41/usr/lib/systemd/system/mariadb-copytls.timer b/templates/Fedora/41/usr/lib/systemd/system/mariadb-copytls.timer deleted file mode 100644 index 8e5ad7b..0000000 --- a/templates/Fedora/41/usr/lib/systemd/system/mariadb-copytls.timer +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Copy TLS Certificates for Mariadb - -[Timer] -OnUnitActiveSec=5min - -[Install] -WantedBy=mariadb.service diff --git a/templates/Fedora/41/usr/lib/systemd/system/mariadb.service b/templates/Fedora/41/usr/lib/systemd/system/mariadb.service deleted file mode 100644 index e1236bb..0000000 --- a/templates/Fedora/41/usr/lib/systemd/system/mariadb.service +++ /dev/null @@ -1,64 +0,0 @@ -# It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, the -# best way is to: -# -# root> systemctl edit mariadb.service -# -# Then add additonal directives under a section (probably [Service]). -# -# For more info about custom unit files, see systemd.unit(5) or -# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F -# -# For example, if you want to increase MariaDB's open-files-limit to 10000, -# you need to increase systemd's LimitNOFILE setting, use the contents below: -# -# [Service] -# LimitNOFILE=10000 -# - -[Unit] -Description=MariaDB 10.11 database server -Documentation=man:mariadbd(8) -Documentation=https://mariadb.com/kb/en/library/systemd/ -After=network.target - -[Install] -WantedBy=multi-user.target -Alias=mysql.service -Alias=mysqld.service - -[Service] -Type=notify -User=mysql -Group=mysql - -ExecStartPre=/usr/libexec/mariadb-check-socket -# '%n' expands to 'Full unit name'; man systemd.unit -ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n -# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug #547485 -ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER -ExecStartPost=/usr/libexec/mariadb-check-upgrade - -# Setting this to true can break replication and the Type=notify settings -# See also bind-address MariaDB option. -PrivateNetwork=false - -KillSignal=SIGTERM - -# Don't want to see an automated SIGKILL ever -SendSIGKILL=no - -# Restart crashed server only, on-failure would also restart, for example, when -# my.cnf contains unknown option -Restart=on-abort -RestartSec=5s - -UMask=007 - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true diff --git a/templates/Fedora/41/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/41/usr/lib/systemd/system/mariadb@.service deleted file mode 100644 index ef60ec1..0000000 --- a/templates/Fedora/41/usr/lib/systemd/system/mariadb@.service +++ /dev/null @@ -1,85 +0,0 @@ -# Multi instance version of MariaDB. For if you run mutiple verions at once. -# Also used for mariadb@bootstrap to bootstrap Galera. -# -# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in -# /etc/@my.cnf to change per instance settings. A minimumal necessary -# configuration items to change to avoid conflicts between instances is: -# -# [mariadbd.instancename] -# # TCP port to make available for clients -# port=3306 -# # Socket to make available for clients -# socket=/tmp/mariadb-instancename.sock -# # Where MariaDB should store all its data -# datadir=/usr/local/mariadb-instancename/data -# -# and start the service via: -# -# root> systemctl start mariadb@{instancename}.server -# -# It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, for -# all instances, the best way is: -# -# root> systemctl edit mariadb@.service -# -# Then add additonal directives under a section (probably [Service]). -# -# If you only want to change a specific instance: -# -# root> systemctl edit mariadb@{instancename}.server -# -# For more info about custom unit files, see systemd.unit(5) or -# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F -# -# For example, if you want to increase MariaDB's open-files-limit to 10000, -# you need to increase systemd's LimitNOFILE setting, use the contents below: -# -# [Service] -# LimitNOFILE=10000 - -[Unit] -Description=MariaDB 10.11 database server -Documentation=man:mariadbd(8) -Documentation=https://mariadb.com/kb/en/library/systemd/ -After=network.target - -[Install] -WantedBy=multi-user.target -Alias=mysql.service -Alias=mysqld.service - -[Service] -Type=notify -User=mysql -Group=mysql - -ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I -ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n -# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug #547485 -ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER -ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I - -# Setting this to true can break replication and the Type=notify settings -# See also bind-address MariaDB option. -PrivateNetwork=false - -KillSignal=SIGTERM - -# Don't want to see an automated SIGKILL ever -SendSIGKILL=no - -# Restart crashed server only, on-failure would also restart, for example, when -# my.cnf contains unknown option -Restart=on-abort -RestartSec=5s - -UMask=007 - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true diff --git a/vars/Fedora-34-default.yml b/vars/Fedora-34-default.yml deleted file mode 100644 index be65d9f..0000000 --- a/vars/Fedora-34-default.yml +++ /dev/null @@ -1,100 +0,0 @@ ---- -# vars file for ensure_mariadb -package_list: - - name: 'mariadb' - state: 'present' - - name: 'mariadb-server' - state: 'present' - - name: 'phpMyAdmin' - state: 'present' -firewall_list: - - permanent: 'yes' - service: 'mysql' - state: 'enabled' -service_list: - - name: 'httpd.service' - state: 'started' - enabled: 'yes' - - name: 'httpd-reload.timer' - state: 'started' - enabled: 'yes' - - name: 'php-fpm.service' - state: 'started' - enabled: 'yes' - - name: 'mariadb-copytls.service' - state: 'started' - enabled: 'yes' - - name: 'mariadb.service' - state: 'started' - enabled: 'yes' -template_list: - - dest: '/etc/my.cnf.d/client.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' - - dest: '/etc/my.cnf.d/mariadb-server.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' - - dest: '/etc/my.cnf.d/mysql-clients.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' - - dest: '/etc/my.cnf.d/spider.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' - - dest: '/etc/my.cnf.d/enable_encryption.preset' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' - - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' - - dest: '/etc/my.cnf.d/auth_gssapi.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' - - dest: '/etc/phpMyAdmin/config.inc.php' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' - - dest: '/etc/my.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' - - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' - - dest: '/usr/lib/systemd/system/mariadb.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' - - dest: '/usr/lib/systemd/system/mariadb@.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' - - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' - - dest: '/usr/lib/systemd/system/mariadb-copytls.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' diff --git a/vars/Fedora-35-default.yml b/vars/Fedora-35-default.yml deleted file mode 100644 index be65d9f..0000000 --- a/vars/Fedora-35-default.yml +++ /dev/null @@ -1,100 +0,0 @@ ---- -# vars file for ensure_mariadb -package_list: - - name: 'mariadb' - state: 'present' - - name: 'mariadb-server' - state: 'present' - - name: 'phpMyAdmin' - state: 'present' -firewall_list: - - permanent: 'yes' - service: 'mysql' - state: 'enabled' -service_list: - - name: 'httpd.service' - state: 'started' - enabled: 'yes' - - name: 'httpd-reload.timer' - state: 'started' - enabled: 'yes' - - name: 'php-fpm.service' - state: 'started' - enabled: 'yes' - - name: 'mariadb-copytls.service' - state: 'started' - enabled: 'yes' - - name: 'mariadb.service' - state: 'started' - enabled: 'yes' -template_list: - - dest: '/etc/my.cnf.d/client.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' - - dest: '/etc/my.cnf.d/mariadb-server.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' - - dest: '/etc/my.cnf.d/mysql-clients.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' - - dest: '/etc/my.cnf.d/spider.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' - - dest: '/etc/my.cnf.d/enable_encryption.preset' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' - - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' - - dest: '/etc/my.cnf.d/auth_gssapi.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' - - dest: '/etc/phpMyAdmin/config.inc.php' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' - - dest: '/etc/my.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' - - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' - - dest: '/usr/lib/systemd/system/mariadb.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' - - dest: '/usr/lib/systemd/system/mariadb@.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' - - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' - - dest: '/usr/lib/systemd/system/mariadb-copytls.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' diff --git a/vars/Fedora-36-default.yml b/vars/Fedora-36-default.yml deleted file mode 100644 index be65d9f..0000000 --- a/vars/Fedora-36-default.yml +++ /dev/null @@ -1,100 +0,0 @@ ---- -# vars file for ensure_mariadb -package_list: - - name: 'mariadb' - state: 'present' - - name: 'mariadb-server' - state: 'present' - - name: 'phpMyAdmin' - state: 'present' -firewall_list: - - permanent: 'yes' - service: 'mysql' - state: 'enabled' -service_list: - - name: 'httpd.service' - state: 'started' - enabled: 'yes' - - name: 'httpd-reload.timer' - state: 'started' - enabled: 'yes' - - name: 'php-fpm.service' - state: 'started' - enabled: 'yes' - - name: 'mariadb-copytls.service' - state: 'started' - enabled: 'yes' - - name: 'mariadb.service' - state: 'started' - enabled: 'yes' -template_list: - - dest: '/etc/my.cnf.d/client.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' - - dest: '/etc/my.cnf.d/mariadb-server.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' - - dest: '/etc/my.cnf.d/mysql-clients.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' - - dest: '/etc/my.cnf.d/spider.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' - - dest: '/etc/my.cnf.d/enable_encryption.preset' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' - - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' - - dest: '/etc/my.cnf.d/auth_gssapi.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' - - dest: '/etc/phpMyAdmin/config.inc.php' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' - - dest: '/etc/my.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' - - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' - - dest: '/usr/lib/systemd/system/mariadb.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' - - dest: '/usr/lib/systemd/system/mariadb@.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' - - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' - - dest: '/usr/lib/systemd/system/mariadb-copytls.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' diff --git a/vars/Fedora-37-default.yml b/vars/Fedora-37-default.yml deleted file mode 100644 index be65d9f..0000000 --- a/vars/Fedora-37-default.yml +++ /dev/null @@ -1,100 +0,0 @@ ---- -# vars file for ensure_mariadb -package_list: - - name: 'mariadb' - state: 'present' - - name: 'mariadb-server' - state: 'present' - - name: 'phpMyAdmin' - state: 'present' -firewall_list: - - permanent: 'yes' - service: 'mysql' - state: 'enabled' -service_list: - - name: 'httpd.service' - state: 'started' - enabled: 'yes' - - name: 'httpd-reload.timer' - state: 'started' - enabled: 'yes' - - name: 'php-fpm.service' - state: 'started' - enabled: 'yes' - - name: 'mariadb-copytls.service' - state: 'started' - enabled: 'yes' - - name: 'mariadb.service' - state: 'started' - enabled: 'yes' -template_list: - - dest: '/etc/my.cnf.d/client.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' - - dest: '/etc/my.cnf.d/mariadb-server.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' - - dest: '/etc/my.cnf.d/mysql-clients.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' - - dest: '/etc/my.cnf.d/spider.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' - - dest: '/etc/my.cnf.d/enable_encryption.preset' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' - - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' - - dest: '/etc/my.cnf.d/auth_gssapi.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' - - dest: '/etc/phpMyAdmin/config.inc.php' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' - - dest: '/etc/my.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' - - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' - - dest: '/usr/lib/systemd/system/mariadb.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' - - dest: '/usr/lib/systemd/system/mariadb@.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' - - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' - - dest: '/usr/lib/systemd/system/mariadb-copytls.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' diff --git a/vars/Fedora-38-default.yml b/vars/Fedora-38-default.yml deleted file mode 100644 index be65d9f..0000000 --- a/vars/Fedora-38-default.yml +++ /dev/null @@ -1,100 +0,0 @@ ---- -# vars file for ensure_mariadb -package_list: - - name: 'mariadb' - state: 'present' - - name: 'mariadb-server' - state: 'present' - - name: 'phpMyAdmin' - state: 'present' -firewall_list: - - permanent: 'yes' - service: 'mysql' - state: 'enabled' -service_list: - - name: 'httpd.service' - state: 'started' - enabled: 'yes' - - name: 'httpd-reload.timer' - state: 'started' - enabled: 'yes' - - name: 'php-fpm.service' - state: 'started' - enabled: 'yes' - - name: 'mariadb-copytls.service' - state: 'started' - enabled: 'yes' - - name: 'mariadb.service' - state: 'started' - enabled: 'yes' -template_list: - - dest: '/etc/my.cnf.d/client.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' - - dest: '/etc/my.cnf.d/mariadb-server.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' - - dest: '/etc/my.cnf.d/mysql-clients.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' - - dest: '/etc/my.cnf.d/spider.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' - - dest: '/etc/my.cnf.d/enable_encryption.preset' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' - - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' - - dest: '/etc/my.cnf.d/auth_gssapi.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' - - dest: '/etc/phpMyAdmin/config.inc.php' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' - - dest: '/etc/my.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' - - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' - - dest: '/usr/lib/systemd/system/mariadb.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' - - dest: '/usr/lib/systemd/system/mariadb@.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' - - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' - - dest: '/usr/lib/systemd/system/mariadb-copytls.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' diff --git a/vars/Fedora-39-default.yml b/vars/Fedora-39-default.yml deleted file mode 100644 index be65d9f..0000000 --- a/vars/Fedora-39-default.yml +++ /dev/null @@ -1,100 +0,0 @@ ---- -# vars file for ensure_mariadb -package_list: - - name: 'mariadb' - state: 'present' - - name: 'mariadb-server' - state: 'present' - - name: 'phpMyAdmin' - state: 'present' -firewall_list: - - permanent: 'yes' - service: 'mysql' - state: 'enabled' -service_list: - - name: 'httpd.service' - state: 'started' - enabled: 'yes' - - name: 'httpd-reload.timer' - state: 'started' - enabled: 'yes' - - name: 'php-fpm.service' - state: 'started' - enabled: 'yes' - - name: 'mariadb-copytls.service' - state: 'started' - enabled: 'yes' - - name: 'mariadb.service' - state: 'started' - enabled: 'yes' -template_list: - - dest: '/etc/my.cnf.d/client.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' - - dest: '/etc/my.cnf.d/mariadb-server.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' - - dest: '/etc/my.cnf.d/mysql-clients.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' - - dest: '/etc/my.cnf.d/spider.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' - - dest: '/etc/my.cnf.d/enable_encryption.preset' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' - - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' - - dest: '/etc/my.cnf.d/auth_gssapi.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' - - dest: '/etc/phpMyAdmin/config.inc.php' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' - - dest: '/etc/my.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' - - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' - - dest: '/usr/lib/systemd/system/mariadb.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' - - dest: '/usr/lib/systemd/system/mariadb@.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' - - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' - - dest: '/usr/lib/systemd/system/mariadb-copytls.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' diff --git a/vars/Fedora-40-default.yml b/vars/Fedora-40-default.yml deleted file mode 100644 index be65d9f..0000000 --- a/vars/Fedora-40-default.yml +++ /dev/null @@ -1,100 +0,0 @@ ---- -# vars file for ensure_mariadb -package_list: - - name: 'mariadb' - state: 'present' - - name: 'mariadb-server' - state: 'present' - - name: 'phpMyAdmin' - state: 'present' -firewall_list: - - permanent: 'yes' - service: 'mysql' - state: 'enabled' -service_list: - - name: 'httpd.service' - state: 'started' - enabled: 'yes' - - name: 'httpd-reload.timer' - state: 'started' - enabled: 'yes' - - name: 'php-fpm.service' - state: 'started' - enabled: 'yes' - - name: 'mariadb-copytls.service' - state: 'started' - enabled: 'yes' - - name: 'mariadb.service' - state: 'started' - enabled: 'yes' -template_list: - - dest: '/etc/my.cnf.d/client.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' - - dest: '/etc/my.cnf.d/mariadb-server.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' - - dest: '/etc/my.cnf.d/mysql-clients.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' - - dest: '/etc/my.cnf.d/spider.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' - - dest: '/etc/my.cnf.d/enable_encryption.preset' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' - - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' - - dest: '/etc/my.cnf.d/auth_gssapi.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' - - dest: '/etc/phpMyAdmin/config.inc.php' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' - - dest: '/etc/my.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' - - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' - - dest: '/usr/lib/systemd/system/mariadb.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' - - dest: '/usr/lib/systemd/system/mariadb@.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' - - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' - - dest: '/usr/lib/systemd/system/mariadb-copytls.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' diff --git a/vars/Fedora-41-default.yml b/vars/Fedora-41-default.yml deleted file mode 100644 index 76c03d0..0000000 --- a/vars/Fedora-41-default.yml +++ /dev/null @@ -1,130 +0,0 @@ ---- -# vars file for ensure_mariadb -package_list: - - name: 'mariadb' - state: 'present' - - name: 'mariadb-server' - state: 'present' - - name: 'phpMyAdmin' - state: 'present' -firewall_list: - - permanent: 'yes' - service: 'mysql' - state: 'enabled' -service_list: - - name: 'httpd.service' - state: 'started' - enabled: 'yes' - - name: 'httpd-reload.timer' - state: 'started' - enabled: 'yes' - - name: 'php-fpm.service' - state: 'started' - enabled: 'yes' - - name: 'mariadb-copytls.service' - state: 'started' - enabled: 'yes' - - name: 'mariadb.service' - state: 'started' - enabled: 'yes' -template_list: - - dest: '/etc/my.cnf.d/client.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' - - dest: '/etc/my.cnf.d/mariadb-server.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' - - dest: '/etc/my.cnf.d/mysql-clients.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' - - dest: '/etc/my.cnf.d/spider.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' - - dest: '/etc/my.cnf.d/enable_encryption.preset' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' - - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' - - dest: '/etc/my.cnf.d/auth_gssapi.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' - - dest: '/etc/my.cnf.d/hashicorp_key_management.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/hashicorp_key_management.cnf' - - dest: '/etc/my.cnf.d/provider_bzip2.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_bzip2.cnf' - - dest: '/etc/my.cnf.d/provider_lz4.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lz4.cnf' - - dest: '/etc/my.cnf.d/provider_lzma.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lzma.cnf' - - dest: '/etc/my.cnf.d/provider_lzo.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lzo.cnf' - - dest: '/etc/my.cnf.d/provider_snappy.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_snappy.cnf' - - dest: '/etc/phpMyAdmin/config.inc.php' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' - - dest: '/etc/my.cnf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' - - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' - - dest: '/usr/lib/systemd/system/mariadb.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' - - dest: '/usr/lib/systemd/system/mariadb@.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' - - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' - - dest: '/usr/lib/systemd/system/mariadb-copytls.service' - group: 'root' - mode: '0644' - owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' diff --git a/vars/Fedora-42-default.yml b/vars/Fedora-42-default.yml index 76c03d0..6b707e8 100644 --- a/vars/Fedora-42-default.yml +++ b/vars/Fedora-42-default.yml @@ -32,99 +32,99 @@ template_list: group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/client.cnf' - dest: '/etc/my.cnf.d/mariadb-server.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/mariadb-server.cnf' - dest: '/etc/my.cnf.d/mysql-clients.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/mysql-clients.cnf' - dest: '/etc/my.cnf.d/spider.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/spider.cnf' - dest: '/etc/my.cnf.d/enable_encryption.preset' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/enable_encryption.preset' - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/cracklib_password_check.cnf' - dest: '/etc/my.cnf.d/auth_gssapi.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/auth_gssapi.cnf' - dest: '/etc/my.cnf.d/hashicorp_key_management.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/hashicorp_key_management.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/hashicorp_key_management.cnf' - dest: '/etc/my.cnf.d/provider_bzip2.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_bzip2.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/provider_bzip2.cnf' - dest: '/etc/my.cnf.d/provider_lz4.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lz4.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/provider_lz4.cnf' - dest: '/etc/my.cnf.d/provider_lzma.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lzma.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/provider_lzma.cnf' - dest: '/etc/my.cnf.d/provider_lzo.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lzo.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/provider_lzo.cnf' - dest: '/etc/my.cnf.d/provider_snappy.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_snappy.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/provider_snappy.cnf' - dest: '/etc/phpMyAdmin/config.inc.php' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/phpMyAdmin/config.inc.php' - dest: '/etc/my.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf' - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/phpMyAdmin.conf' - dest: '/usr/lib/systemd/system/mariadb.service' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb.service' - dest: '/usr/lib/systemd/system/mariadb@.service' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb@.service' - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb-copytls.timer' - dest: '/usr/lib/systemd/system/mariadb-copytls.service' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb-copytls.service' diff --git a/vars/Fedora-43-default.yml b/vars/Fedora-43-default.yml index 76c03d0..6b707e8 100644 --- a/vars/Fedora-43-default.yml +++ b/vars/Fedora-43-default.yml @@ -32,99 +32,99 @@ template_list: group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/client.cnf' - dest: '/etc/my.cnf.d/mariadb-server.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/mariadb-server.cnf' - dest: '/etc/my.cnf.d/mysql-clients.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/mysql-clients.cnf' - dest: '/etc/my.cnf.d/spider.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/spider.cnf' - dest: '/etc/my.cnf.d/enable_encryption.preset' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/enable_encryption.preset' - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/cracklib_password_check.cnf' - dest: '/etc/my.cnf.d/auth_gssapi.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/auth_gssapi.cnf' - dest: '/etc/my.cnf.d/hashicorp_key_management.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/hashicorp_key_management.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/hashicorp_key_management.cnf' - dest: '/etc/my.cnf.d/provider_bzip2.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_bzip2.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/provider_bzip2.cnf' - dest: '/etc/my.cnf.d/provider_lz4.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lz4.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/provider_lz4.cnf' - dest: '/etc/my.cnf.d/provider_lzma.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lzma.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/provider_lzma.cnf' - dest: '/etc/my.cnf.d/provider_lzo.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lzo.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/provider_lzo.cnf' - dest: '/etc/my.cnf.d/provider_snappy.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_snappy.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/provider_snappy.cnf' - dest: '/etc/phpMyAdmin/config.inc.php' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/phpMyAdmin/config.inc.php' - dest: '/etc/my.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf' - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/phpMyAdmin.conf' - dest: '/usr/lib/systemd/system/mariadb.service' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb.service' - dest: '/usr/lib/systemd/system/mariadb@.service' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb@.service' - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb-copytls.timer' - dest: '/usr/lib/systemd/system/mariadb-copytls.service' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb-copytls.service' diff --git a/vars/Fedora-44-default.yml b/vars/Fedora-44-default.yml index 76c03d0..6b707e8 100644 --- a/vars/Fedora-44-default.yml +++ b/vars/Fedora-44-default.yml @@ -32,99 +32,99 @@ template_list: group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/client.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/client.cnf' - dest: '/etc/my.cnf.d/mariadb-server.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mariadb-server.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/mariadb-server.cnf' - dest: '/etc/my.cnf.d/mysql-clients.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/mysql-clients.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/mysql-clients.cnf' - dest: '/etc/my.cnf.d/spider.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/spider.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/spider.cnf' - dest: '/etc/my.cnf.d/enable_encryption.preset' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/enable_encryption.preset' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/enable_encryption.preset' - dest: '/etc/my.cnf.d/cracklib_password_check.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/cracklib_password_check.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/cracklib_password_check.cnf' - dest: '/etc/my.cnf.d/auth_gssapi.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/auth_gssapi.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/auth_gssapi.cnf' - dest: '/etc/my.cnf.d/hashicorp_key_management.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/hashicorp_key_management.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/hashicorp_key_management.cnf' - dest: '/etc/my.cnf.d/provider_bzip2.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_bzip2.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/provider_bzip2.cnf' - dest: '/etc/my.cnf.d/provider_lz4.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lz4.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/provider_lz4.cnf' - dest: '/etc/my.cnf.d/provider_lzma.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lzma.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/provider_lzma.cnf' - dest: '/etc/my.cnf.d/provider_lzo.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_lzo.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/provider_lzo.cnf' - dest: '/etc/my.cnf.d/provider_snappy.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf.d/provider_snappy.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/provider_snappy.cnf' - dest: '/etc/phpMyAdmin/config.inc.php' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/phpMyAdmin/config.inc.php' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/phpMyAdmin/config.inc.php' - dest: '/etc/my.cnf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/my.cnf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf' - dest: '/etc/httpd/conf.d/phpMyAdmin.conf' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/httpd/conf.d/phpMyAdmin.conf' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/phpMyAdmin.conf' - dest: '/usr/lib/systemd/system/mariadb.service' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb.service' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb.service' - dest: '/usr/lib/systemd/system/mariadb@.service' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb@.service' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb@.service' - dest: '/usr/lib/systemd/system/mariadb-copytls.timer' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.timer' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb-copytls.timer' - dest: '/usr/lib/systemd/system/mariadb-copytls.service' group: 'root' mode: '0644' owner: 'root' - src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/mariadb-copytls.service' + src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb-copytls.service' From d6d3b5082da06c27dfe04ae716799a5be8c23fe0 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Fri, 8 May 2026 23:57:33 -0400 Subject: [PATCH 32/40] More ansible-core 2.20 fixes Signed-off-by: Jason Rothstein --- tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 69587a5..196bb8e 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -113,8 +113,8 @@ - name: 'ensure firewall' when: - ansible_facts["system"] == 'Linux' - - packages["firewalld"] is defined - - packages["python3-firewall"] is defined + - ansible_facts.packages["firewalld"] is defined + - ansible_facts.packages["python3-firewall"] is defined - ensure_mariadb is defined - ensure_mariadb.firewall_list is defined - ensure_mariadb.firewall_list is iterable From 1a75050dad7cfdc78341ee9cdd9f50fc526c6b7d Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Fri, 8 May 2026 23:57:51 -0400 Subject: [PATCH 33/40] Fix mariadb and phpMyAdmin templates not change what shouldn't be Signed-off-by: Jason Rothstein --- .../Fedora/42/etc/phpMyAdmin/config.inc.php | 13 +++++++++--- .../42/usr/lib/systemd/system/mariadb.service | 21 ++++++++++++++++++- .../usr/lib/systemd/system/mariadb@.service | 21 ++++++++++++++++++- .../Fedora/43/etc/phpMyAdmin/config.inc.php | 13 +++++++++--- .../43/usr/lib/systemd/system/mariadb.service | 21 ++++++++++++++++++- .../usr/lib/systemd/system/mariadb@.service | 21 ++++++++++++++++++- .../Fedora/44/etc/phpMyAdmin/config.inc.php | 13 +++++++++--- .../44/usr/lib/systemd/system/mariadb.service | 21 ++++++++++++++++++- .../usr/lib/systemd/system/mariadb@.service | 21 ++++++++++++++++++- 9 files changed, 150 insertions(+), 15 deletions(-) diff --git a/templates/Fedora/42/etc/phpMyAdmin/config.inc.php b/templates/Fedora/42/etc/phpMyAdmin/config.inc.php index b973a14..76ce8b2 100644 --- a/templates/Fedora/42/etc/phpMyAdmin/config.inc.php +++ b/templates/Fedora/42/etc/phpMyAdmin/config.inc.php @@ -10,10 +10,10 @@ declare(strict_types=1); /** - * This is needed for cookie based authentication to encrypt password in - * cookie. Needs to be 32 chars long. + * This is needed for cookie based authentication to encrypt the cookie. + * Needs to be a 32-bytes long string of random bytes. See FAQ 2.10. */ -$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ +$cfg['blowfish_secret'] = '26227697261f24526e194bb441ff689e'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ /** * Servers configuration @@ -147,6 +147,13 @@ $cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; */ //$cfg['SendErrorReports'] = 'always'; +/** + * 'URLQueryEncryption' defines whether phpMyAdmin will encrypt sensitive data from the URL query string. + * 'URLQueryEncryptionSecretKey' is a 32 bytes long secret key used to encrypt/decrypt the URL query string. + */ +//$cfg['URLQueryEncryption'] = true; +//$cfg['URLQueryEncryptionSecretKey'] = ''; + /** * You can find more configuration options in the documentation * in the doc/ folder or at . diff --git a/templates/Fedora/42/usr/lib/systemd/system/mariadb.service b/templates/Fedora/42/usr/lib/systemd/system/mariadb.service index e1236bb..260b2ee 100644 --- a/templates/Fedora/42/usr/lib/systemd/system/mariadb.service +++ b/templates/Fedora/42/usr/lib/systemd/system/mariadb.service @@ -32,15 +32,34 @@ Type=notify User=mysql Group=mysql +# Use an environment file to pass variable _WSREP_NEW_CLUSTER +EnvironmentFile=-/run/mariadb/wsrep-new-cluster +# Use an environment file to pass variable _WSREP_START_POSITION +EnvironmentFile=-/run/mariadb/wsrep-start-position + ExecStartPre=/usr/libexec/mariadb-check-socket # '%n' expands to 'Full unit name'; man systemd.unit ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n + +# Perform automatic wsrep recovery. When server is started without wsrep, +# galera_recovery simply returns an empty string. In any case, however, +# the script is not expected to return with a non-zero status. +# It is always safe to remove /run/mariadb/wsrep-start-position +# environment file. +# Do not panic if galera_recovery script is not available. (MDEV-10538) +ExecStartPre=/bin/sh -c "[ ! -e /usr/bin/galera_recovery ] && VAR= || \ + VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] \ + && echo _WSREP_START_POSITION=$VAR > /run/mariadb/wsrep-start-position || exit 1" + # MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf # Note: we set --basedir to prevent probes that might trigger SELinux alarms, # per bug #547485 -ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION ExecStartPost=/usr/libexec/mariadb-check-upgrade +# Unset _WSREP_START_POSITION environment variable. +ExecStartPost=/bin/rm -f /run/mariadb/wsrep-start-position + # Setting this to true can break replication and the Type=notify settings # See also bind-address MariaDB option. PrivateNetwork=false diff --git a/templates/Fedora/42/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/42/usr/lib/systemd/system/mariadb@.service index ef60ec1..9999a22 100644 --- a/templates/Fedora/42/usr/lib/systemd/system/mariadb@.service +++ b/templates/Fedora/42/usr/lib/systemd/system/mariadb@.service @@ -54,14 +54,33 @@ Type=notify User=mysql Group=mysql +# Use an environment file to pass variable _WSREP_NEW_CLUSTER +EnvironmentFile=-/run/mariadb/wsrep-new-cluster +# Use an environment file to pass variable _WSREP_START_POSITION +EnvironmentFile=-/run/mariadb/wsrep-start-position + ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n + +# Perform automatic wsrep recovery. When server is started without wsrep, +# galera_recovery simply returns an empty string. In any case, however, +# the script is not expected to return with a non-zero status. +# It is always safe to remove /run/mariadb/wsrep-start-position +# environment file. +# Do not panic if galera_recovery script is not available. (MDEV-10538) +ExecStartPre=/bin/sh -c "[ ! -e /usr/bin/galera_recovery ] && VAR= || \ + VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] \ + && echo _WSREP_START_POSITION=$VAR > /run/mariadb/wsrep-start-position || exit 1" + # MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf # Note: we set --basedir to prevent probes that might trigger SELinux alarms, # per bug #547485 -ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I +# Unset _WSREP_START_POSITION environment variable. +ExecStartPost=/bin/rm -f /run/mariadb/wsrep-start-position + # Setting this to true can break replication and the Type=notify settings # See also bind-address MariaDB option. PrivateNetwork=false diff --git a/templates/Fedora/43/etc/phpMyAdmin/config.inc.php b/templates/Fedora/43/etc/phpMyAdmin/config.inc.php index b973a14..76ce8b2 100644 --- a/templates/Fedora/43/etc/phpMyAdmin/config.inc.php +++ b/templates/Fedora/43/etc/phpMyAdmin/config.inc.php @@ -10,10 +10,10 @@ declare(strict_types=1); /** - * This is needed for cookie based authentication to encrypt password in - * cookie. Needs to be 32 chars long. + * This is needed for cookie based authentication to encrypt the cookie. + * Needs to be a 32-bytes long string of random bytes. See FAQ 2.10. */ -$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ +$cfg['blowfish_secret'] = '26227697261f24526e194bb441ff689e'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ /** * Servers configuration @@ -147,6 +147,13 @@ $cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; */ //$cfg['SendErrorReports'] = 'always'; +/** + * 'URLQueryEncryption' defines whether phpMyAdmin will encrypt sensitive data from the URL query string. + * 'URLQueryEncryptionSecretKey' is a 32 bytes long secret key used to encrypt/decrypt the URL query string. + */ +//$cfg['URLQueryEncryption'] = true; +//$cfg['URLQueryEncryptionSecretKey'] = ''; + /** * You can find more configuration options in the documentation * in the doc/ folder or at . diff --git a/templates/Fedora/43/usr/lib/systemd/system/mariadb.service b/templates/Fedora/43/usr/lib/systemd/system/mariadb.service index e1236bb..260b2ee 100644 --- a/templates/Fedora/43/usr/lib/systemd/system/mariadb.service +++ b/templates/Fedora/43/usr/lib/systemd/system/mariadb.service @@ -32,15 +32,34 @@ Type=notify User=mysql Group=mysql +# Use an environment file to pass variable _WSREP_NEW_CLUSTER +EnvironmentFile=-/run/mariadb/wsrep-new-cluster +# Use an environment file to pass variable _WSREP_START_POSITION +EnvironmentFile=-/run/mariadb/wsrep-start-position + ExecStartPre=/usr/libexec/mariadb-check-socket # '%n' expands to 'Full unit name'; man systemd.unit ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n + +# Perform automatic wsrep recovery. When server is started without wsrep, +# galera_recovery simply returns an empty string. In any case, however, +# the script is not expected to return with a non-zero status. +# It is always safe to remove /run/mariadb/wsrep-start-position +# environment file. +# Do not panic if galera_recovery script is not available. (MDEV-10538) +ExecStartPre=/bin/sh -c "[ ! -e /usr/bin/galera_recovery ] && VAR= || \ + VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] \ + && echo _WSREP_START_POSITION=$VAR > /run/mariadb/wsrep-start-position || exit 1" + # MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf # Note: we set --basedir to prevent probes that might trigger SELinux alarms, # per bug #547485 -ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION ExecStartPost=/usr/libexec/mariadb-check-upgrade +# Unset _WSREP_START_POSITION environment variable. +ExecStartPost=/bin/rm -f /run/mariadb/wsrep-start-position + # Setting this to true can break replication and the Type=notify settings # See also bind-address MariaDB option. PrivateNetwork=false diff --git a/templates/Fedora/43/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/43/usr/lib/systemd/system/mariadb@.service index ef60ec1..9999a22 100644 --- a/templates/Fedora/43/usr/lib/systemd/system/mariadb@.service +++ b/templates/Fedora/43/usr/lib/systemd/system/mariadb@.service @@ -54,14 +54,33 @@ Type=notify User=mysql Group=mysql +# Use an environment file to pass variable _WSREP_NEW_CLUSTER +EnvironmentFile=-/run/mariadb/wsrep-new-cluster +# Use an environment file to pass variable _WSREP_START_POSITION +EnvironmentFile=-/run/mariadb/wsrep-start-position + ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n + +# Perform automatic wsrep recovery. When server is started without wsrep, +# galera_recovery simply returns an empty string. In any case, however, +# the script is not expected to return with a non-zero status. +# It is always safe to remove /run/mariadb/wsrep-start-position +# environment file. +# Do not panic if galera_recovery script is not available. (MDEV-10538) +ExecStartPre=/bin/sh -c "[ ! -e /usr/bin/galera_recovery ] && VAR= || \ + VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] \ + && echo _WSREP_START_POSITION=$VAR > /run/mariadb/wsrep-start-position || exit 1" + # MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf # Note: we set --basedir to prevent probes that might trigger SELinux alarms, # per bug #547485 -ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I +# Unset _WSREP_START_POSITION environment variable. +ExecStartPost=/bin/rm -f /run/mariadb/wsrep-start-position + # Setting this to true can break replication and the Type=notify settings # See also bind-address MariaDB option. PrivateNetwork=false diff --git a/templates/Fedora/44/etc/phpMyAdmin/config.inc.php b/templates/Fedora/44/etc/phpMyAdmin/config.inc.php index b973a14..76ce8b2 100644 --- a/templates/Fedora/44/etc/phpMyAdmin/config.inc.php +++ b/templates/Fedora/44/etc/phpMyAdmin/config.inc.php @@ -10,10 +10,10 @@ declare(strict_types=1); /** - * This is needed for cookie based authentication to encrypt password in - * cookie. Needs to be 32 chars long. + * This is needed for cookie based authentication to encrypt the cookie. + * Needs to be a 32-bytes long string of random bytes. See FAQ 2.10. */ -$cfg['blowfish_secret'] = '22ba7cd24c092bec00a83751012d0082'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ +$cfg['blowfish_secret'] = '26227697261f24526e194bb441ff689e'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ /** * Servers configuration @@ -147,6 +147,13 @@ $cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; */ //$cfg['SendErrorReports'] = 'always'; +/** + * 'URLQueryEncryption' defines whether phpMyAdmin will encrypt sensitive data from the URL query string. + * 'URLQueryEncryptionSecretKey' is a 32 bytes long secret key used to encrypt/decrypt the URL query string. + */ +//$cfg['URLQueryEncryption'] = true; +//$cfg['URLQueryEncryptionSecretKey'] = ''; + /** * You can find more configuration options in the documentation * in the doc/ folder or at . diff --git a/templates/Fedora/44/usr/lib/systemd/system/mariadb.service b/templates/Fedora/44/usr/lib/systemd/system/mariadb.service index e1236bb..260b2ee 100644 --- a/templates/Fedora/44/usr/lib/systemd/system/mariadb.service +++ b/templates/Fedora/44/usr/lib/systemd/system/mariadb.service @@ -32,15 +32,34 @@ Type=notify User=mysql Group=mysql +# Use an environment file to pass variable _WSREP_NEW_CLUSTER +EnvironmentFile=-/run/mariadb/wsrep-new-cluster +# Use an environment file to pass variable _WSREP_START_POSITION +EnvironmentFile=-/run/mariadb/wsrep-start-position + ExecStartPre=/usr/libexec/mariadb-check-socket # '%n' expands to 'Full unit name'; man systemd.unit ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n + +# Perform automatic wsrep recovery. When server is started without wsrep, +# galera_recovery simply returns an empty string. In any case, however, +# the script is not expected to return with a non-zero status. +# It is always safe to remove /run/mariadb/wsrep-start-position +# environment file. +# Do not panic if galera_recovery script is not available. (MDEV-10538) +ExecStartPre=/bin/sh -c "[ ! -e /usr/bin/galera_recovery ] && VAR= || \ + VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] \ + && echo _WSREP_START_POSITION=$VAR > /run/mariadb/wsrep-start-position || exit 1" + # MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf # Note: we set --basedir to prevent probes that might trigger SELinux alarms, # per bug #547485 -ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStart=/usr/libexec/mariadbd --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION ExecStartPost=/usr/libexec/mariadb-check-upgrade +# Unset _WSREP_START_POSITION environment variable. +ExecStartPost=/bin/rm -f /run/mariadb/wsrep-start-position + # Setting this to true can break replication and the Type=notify settings # See also bind-address MariaDB option. PrivateNetwork=false diff --git a/templates/Fedora/44/usr/lib/systemd/system/mariadb@.service b/templates/Fedora/44/usr/lib/systemd/system/mariadb@.service index ef60ec1..9999a22 100644 --- a/templates/Fedora/44/usr/lib/systemd/system/mariadb@.service +++ b/templates/Fedora/44/usr/lib/systemd/system/mariadb@.service @@ -54,14 +54,33 @@ Type=notify User=mysql Group=mysql +# Use an environment file to pass variable _WSREP_NEW_CLUSTER +EnvironmentFile=-/run/mariadb/wsrep-new-cluster +# Use an environment file to pass variable _WSREP_START_POSITION +EnvironmentFile=-/run/mariadb/wsrep-start-position + ExecStartPre=/usr/libexec/mariadb-check-socket --defaults-group-suffix=.%I ExecStartPre=/usr/libexec/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n + +# Perform automatic wsrep recovery. When server is started without wsrep, +# galera_recovery simply returns an empty string. In any case, however, +# the script is not expected to return with a non-zero status. +# It is always safe to remove /run/mariadb/wsrep-start-position +# environment file. +# Do not panic if galera_recovery script is not available. (MDEV-10538) +ExecStartPre=/bin/sh -c "[ ! -e /usr/bin/galera_recovery ] && VAR= || \ + VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] \ + && echo _WSREP_START_POSITION=$VAR > /run/mariadb/wsrep-start-position || exit 1" + # MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf # Note: we set --basedir to prevent probes that might trigger SELinux alarms, # per bug #547485 -ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStart=/usr/libexec/mariadbd --defaults-group-suffix=.%I --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION ExecStartPost=/usr/libexec/mariadb-check-upgrade --defaults-group-suffix=.%I +# Unset _WSREP_START_POSITION environment variable. +ExecStartPost=/bin/rm -f /run/mariadb/wsrep-start-position + # Setting this to true can break replication and the Type=notify settings # See also bind-address MariaDB option. PrivateNetwork=false From 71b6eab350577f2ed3d7da8e7abb0c1eb8ce4630 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sat, 9 May 2026 00:45:03 -0400 Subject: [PATCH 34/40] use the correct .pem file extension for certificates Signed-off-by: Jason Rothstein --- templates/Fedora/42/etc/my.cnf.d/mariadb-server.cnf | 6 +++--- templates/Fedora/43/etc/my.cnf.d/mariadb-server.cnf | 6 +++--- templates/Fedora/44/etc/my.cnf.d/mariadb-server.cnf | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/templates/Fedora/42/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/42/etc/my.cnf.d/mariadb-server.cnf index 3ae4a70..81a54f6 100644 --- a/templates/Fedora/42/etc/my.cnf.d/mariadb-server.cnf +++ b/templates/Fedora/42/etc/my.cnf.d/mariadb-server.cnf @@ -19,9 +19,9 @@ socket=/var/lib/mysql/mysql.sock log-error=/var/log/mariadb/mariadb.log pid-file=/run/mariadb/mariadb.pid character-set-server = utf8mb4 -ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm -ssl-key=/etc/my.cnf.d/certificates/privkey.epm -tls-version=TLSv1.2,TLSv1.3 +ssl-cert=/etc/my.cnf.d/certificates/pubcert.pem +ssl-key=/etc/my.cnf.d/certificates/privkey.pem +tls-version=TLSv1.3,TLSv1.2 # diff --git a/templates/Fedora/43/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/43/etc/my.cnf.d/mariadb-server.cnf index 3ae4a70..81a54f6 100644 --- a/templates/Fedora/43/etc/my.cnf.d/mariadb-server.cnf +++ b/templates/Fedora/43/etc/my.cnf.d/mariadb-server.cnf @@ -19,9 +19,9 @@ socket=/var/lib/mysql/mysql.sock log-error=/var/log/mariadb/mariadb.log pid-file=/run/mariadb/mariadb.pid character-set-server = utf8mb4 -ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm -ssl-key=/etc/my.cnf.d/certificates/privkey.epm -tls-version=TLSv1.2,TLSv1.3 +ssl-cert=/etc/my.cnf.d/certificates/pubcert.pem +ssl-key=/etc/my.cnf.d/certificates/privkey.pem +tls-version=TLSv1.3,TLSv1.2 # diff --git a/templates/Fedora/44/etc/my.cnf.d/mariadb-server.cnf b/templates/Fedora/44/etc/my.cnf.d/mariadb-server.cnf index 3ae4a70..81a54f6 100644 --- a/templates/Fedora/44/etc/my.cnf.d/mariadb-server.cnf +++ b/templates/Fedora/44/etc/my.cnf.d/mariadb-server.cnf @@ -19,9 +19,9 @@ socket=/var/lib/mysql/mysql.sock log-error=/var/log/mariadb/mariadb.log pid-file=/run/mariadb/mariadb.pid character-set-server = utf8mb4 -ssl-cert=/etc/my.cnf.d/certificates/pubcert.epm -ssl-key=/etc/my.cnf.d/certificates/privkey.epm -tls-version=TLSv1.2,TLSv1.3 +ssl-cert=/etc/my.cnf.d/certificates/pubcert.pem +ssl-key=/etc/my.cnf.d/certificates/privkey.pem +tls-version=TLSv1.3,TLSv1.2 # From 5b2ee333be03ecb6b3beb171b398465a271e4641 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sat, 9 May 2026 11:34:22 -0400 Subject: [PATCH 35/40] Add db and user management Signed-off-by: Jason Rothstein --- tasks/main.yml | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index 196bb8e..c93563e 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -150,5 +150,89 @@ - 'ensure_mariadb.service_restart' - name: 'flush handlers' meta: 'flush_handlers' +- name: 'ensure mariadb databases' + when: + - mariadb_db_list is defined + - mariadb_db_list is iterable + community.mysql.mysql_db: + ca_cert: '{{ item.ca_cert | default(OMIT) }}' + chdir: '{{ item.chdir | default(OMIT) }}' + check_hostname: '{{ item.check_hostname | default(OMIT) }}' + check_implicit_admin: '{{ item.check_implicit_admin | default(OMIT) }}' + client_cert: '{{ item.client_cert | default(OMIT) }}' + client_key: '{{ item.client_key | default(OMIT) }}' + collation: '{{ item.collation | default(OMIT) }}' + config_file: '{{ item.config_file | default(OMIT) }}' + config_overrides_defaults: '{{ item.config_overrides_defaults | default(OMIT) }}' + connect_timeout: '{{ item.connect_timeout | default(OMIT) }}' + dump_extra_args: '{{ item.dump_extra_args | default(OMIT) }}' + encoding: '{{ item.encoding | default(OMIT) }}' + force: '{{ item.force | default(OMIT) }}' + hex_blob: '{{ item.hex_blob | default(OMIT) }}' + ignore_tables: '{{ item.ignore_tables | default(OMIT) }}' + login_host: '{{ item.login_host | default(OMIT) }}' + login_password: '{{ item.login_password | default(OMIT) }}' + login_port: '{{ item.login_port | default(OMIT) }}' + login_unix_socket: '{{ item.login_unix_socket | default(OMIT) }}' + login_user: '{{ item.login_user | default(OMIT) }}' + master_data: '{{ item.master_data | default(OMIT) }}' + name: '{{ item.name }}' + pipefail: '{{ item.pipefail | default(OMIT) }}' + quick: '{{ item.quick | default(OMIT) }}' + restrict_config_file: '{{ item.restrict_config_file | default(OMIT) }}' + single_transaction: '{{ item.single_transaction | default(OMIT) }}' + skip_lock_tables: '{{ item.skip_lock_tables | default(OMIT) }}' + sql_log_bin: '{{ item.sql_log_bin | default(OMIT) }}' + state: '{{ item.state }}' + target: '{{ item.target | default(OMIT) }}' + unsafe_login_password: '{{ item.unsafe_login_password | default(OMIT) }}' + use_shell: '{{ item.use_shell | default(OMIT) }}' + loop: '{{ mariadb_db_list }}' + loop_control: + label: '{{ item.name }} will be {{ item.state }}' +- name: 'ensure mariadb users' + when: + - mariadb_db_list is defined + - mariadb_db_list is iterable + community.mysql.mysql_user: + append_privs: '{{ item.append_privs | default(OMIT) }}' + attributes: '{{ item.attributes | default(OMIT) }}' + ca_cert: '{{ item.ca_cert | default(OMIT) }}' + check_hostname: '{{ item.check_hostname | default(OMIT) }}' + check_implicit_admin: '{{ item.check_implicit_admin | default(OMIT) }}' + client_cert: '{{ item.client_cert | default(OMIT) }}' + client_key: '{{ item.client_key | default(OMIT) }}' + column_case_sensitive: '{{ item.column_case_sensitive | default(OMIT) }}' + config_file: '{{ item.config_file | default(OMIT) }}' + connect_timeout: '{{ item.connect_timeout | default(OMIT) }}' + encrypted: '{{ item.encrypted | default(OMIT) }}' + force_context: '{{ item.force_context | default(OMIT) }}' + host: '{{ item.host | default(OMIT) }}' + host_all: '{{ item.host_all | default(OMIT) }}' + locked: '{{ item.locked | default(OMIT) }}' + login_host: '{{ item.login_host | default(OMIT) }}' + login_password: '{{ item.login_password | default(OMIT) }}' + login_port: '{{ item.login_port | default(OMIT) }}' + login_unix_socket: '{{ item.login_unix_socket | default(OMIT) }}' + login_user: '{{ item.login_user | default(OMIT) }}' + name: '{{ item.name }}' + password: '{{ item.password | default(OMIT) }}' + password_expire: '{{ item.password_expire | default(OMIT) }}' + password_expire_interval: '{{ item.password_expire_interval | default(OMIT) }}' + plugin: '{{ item.plugin | default(OMIT) }}' + plugin_auth_string: '{{ item.plugin_auth_string | default(OMIT) }}' + plugin_hash_string: '{{ item.plugin_hash_string | default(OMIT) }}' + priv: '{{ item.priv | default(OMIT) }}' + resource_limits: '{{ item.resource_limits | default(OMIT) }}' + salt: '{{ item.salt | default(OMIT) }}' + session_vars: '{{ item.session_vars | default(OMIT) }}' + sql_log_bin: '{{ item.sql_log_bin | default(OMIT) }}' + state: '{{ item.state }}' + subtract_privs: '{{ item.subtract_privs | default(OMIT) }}' + tls_requires: '{{ item.tls_requires | default(OMIT) }}' + update_password: '{{ item.update_password | default(OMIT) }}' + loop: '{{ mariadb_db_list }}' + loop_control: + label: '{{ item.name }} will be {{ item.state }}' ... From 305a3e80d2276ce00cf8f36da68e3bc161e71841 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sat, 9 May 2026 13:51:00 -0400 Subject: [PATCH 36/40] default(omit) Signed-off-by: Jason Rothstein --- tasks/main.yml | 128 ++++++++++++++++++++++++------------------------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index c93563e..e75a7d7 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -155,38 +155,38 @@ - mariadb_db_list is defined - mariadb_db_list is iterable community.mysql.mysql_db: - ca_cert: '{{ item.ca_cert | default(OMIT) }}' - chdir: '{{ item.chdir | default(OMIT) }}' - check_hostname: '{{ item.check_hostname | default(OMIT) }}' - check_implicit_admin: '{{ item.check_implicit_admin | default(OMIT) }}' - client_cert: '{{ item.client_cert | default(OMIT) }}' - client_key: '{{ item.client_key | default(OMIT) }}' - collation: '{{ item.collation | default(OMIT) }}' - config_file: '{{ item.config_file | default(OMIT) }}' - config_overrides_defaults: '{{ item.config_overrides_defaults | default(OMIT) }}' - connect_timeout: '{{ item.connect_timeout | default(OMIT) }}' - dump_extra_args: '{{ item.dump_extra_args | default(OMIT) }}' - encoding: '{{ item.encoding | default(OMIT) }}' - force: '{{ item.force | default(OMIT) }}' - hex_blob: '{{ item.hex_blob | default(OMIT) }}' - ignore_tables: '{{ item.ignore_tables | default(OMIT) }}' - login_host: '{{ item.login_host | default(OMIT) }}' - login_password: '{{ item.login_password | default(OMIT) }}' - login_port: '{{ item.login_port | default(OMIT) }}' - login_unix_socket: '{{ item.login_unix_socket | default(OMIT) }}' - login_user: '{{ item.login_user | default(OMIT) }}' - master_data: '{{ item.master_data | default(OMIT) }}' + ca_cert: '{{ item.ca_cert | default(omit) }}' + chdir: '{{ item.chdir | default(omit) }}' + check_hostname: '{{ item.check_hostname | default(omit) }}' + check_implicit_admin: '{{ item.check_implicit_admin | default(omit) }}' + client_cert: '{{ item.client_cert | default(omit) }}' + client_key: '{{ item.client_key | default(omit) }}' + collation: '{{ item.collation | default(omit) }}' + config_file: '{{ item.config_file | default(omit) }}' + config_overrides_defaults: '{{ item.config_overrides_defaults | default(omit) }}' + connect_timeout: '{{ item.connect_timeout | default(omit) }}' + dump_extra_args: '{{ item.dump_extra_args | default(omit) }}' + encoding: '{{ item.encoding | default(omit) }}' + force: '{{ item.force | default(omit) }}' + hex_blob: '{{ item.hex_blob | default(omit) }}' + ignore_tables: '{{ item.ignore_tables | default(omit) }}' + login_host: '{{ item.login_host | default(omit) }}' + login_password: '{{ item.login_password | default(omit) }}' + login_port: '{{ item.login_port | default(omit) }}' + login_unix_socket: '{{ item.login_unix_socket | default(omit) }}' + login_user: '{{ item.login_user | default(omit) }}' + master_data: '{{ item.master_data | default(omit) }}' name: '{{ item.name }}' - pipefail: '{{ item.pipefail | default(OMIT) }}' - quick: '{{ item.quick | default(OMIT) }}' - restrict_config_file: '{{ item.restrict_config_file | default(OMIT) }}' - single_transaction: '{{ item.single_transaction | default(OMIT) }}' - skip_lock_tables: '{{ item.skip_lock_tables | default(OMIT) }}' - sql_log_bin: '{{ item.sql_log_bin | default(OMIT) }}' + pipefail: '{{ item.pipefail | default(omit) }}' + quick: '{{ item.quick | default(omit) }}' + restrict_config_file: '{{ item.restrict_config_file | default(omit) }}' + single_transaction: '{{ item.single_transaction | default(omit) }}' + skip_lock_tables: '{{ item.skip_lock_tables | default(omit) }}' + sql_log_bin: '{{ item.sql_log_bin | default(omit) }}' state: '{{ item.state }}' - target: '{{ item.target | default(OMIT) }}' - unsafe_login_password: '{{ item.unsafe_login_password | default(OMIT) }}' - use_shell: '{{ item.use_shell | default(OMIT) }}' + target: '{{ item.target | default(omit) }}' + unsafe_login_password: '{{ item.unsafe_login_password | default(omit) }}' + use_shell: '{{ item.use_shell | default(omit) }}' loop: '{{ mariadb_db_list }}' loop_control: label: '{{ item.name }} will be {{ item.state }}' @@ -195,42 +195,42 @@ - mariadb_db_list is defined - mariadb_db_list is iterable community.mysql.mysql_user: - append_privs: '{{ item.append_privs | default(OMIT) }}' - attributes: '{{ item.attributes | default(OMIT) }}' - ca_cert: '{{ item.ca_cert | default(OMIT) }}' - check_hostname: '{{ item.check_hostname | default(OMIT) }}' - check_implicit_admin: '{{ item.check_implicit_admin | default(OMIT) }}' - client_cert: '{{ item.client_cert | default(OMIT) }}' - client_key: '{{ item.client_key | default(OMIT) }}' - column_case_sensitive: '{{ item.column_case_sensitive | default(OMIT) }}' - config_file: '{{ item.config_file | default(OMIT) }}' - connect_timeout: '{{ item.connect_timeout | default(OMIT) }}' - encrypted: '{{ item.encrypted | default(OMIT) }}' - force_context: '{{ item.force_context | default(OMIT) }}' - host: '{{ item.host | default(OMIT) }}' - host_all: '{{ item.host_all | default(OMIT) }}' - locked: '{{ item.locked | default(OMIT) }}' - login_host: '{{ item.login_host | default(OMIT) }}' - login_password: '{{ item.login_password | default(OMIT) }}' - login_port: '{{ item.login_port | default(OMIT) }}' - login_unix_socket: '{{ item.login_unix_socket | default(OMIT) }}' - login_user: '{{ item.login_user | default(OMIT) }}' + append_privs: '{{ item.append_privs | default(omit) }}' + attributes: '{{ item.attributes | default(omit) }}' + ca_cert: '{{ item.ca_cert | default(omit) }}' + check_hostname: '{{ item.check_hostname | default(omit) }}' + check_implicit_admin: '{{ item.check_implicit_admin | default(omit) }}' + client_cert: '{{ item.client_cert | default(omit) }}' + client_key: '{{ item.client_key | default(omit) }}' + column_case_sensitive: '{{ item.column_case_sensitive | default(omit) }}' + config_file: '{{ item.config_file | default(omit) }}' + connect_timeout: '{{ item.connect_timeout | default(omit) }}' + encrypted: '{{ item.encrypted | default(omit) }}' + force_context: '{{ item.force_context | default(omit) }}' + host: '{{ item.host | default(omit) }}' + host_all: '{{ item.host_all | default(omit) }}' + locked: '{{ item.locked | default(omit) }}' + login_host: '{{ item.login_host | default(omit) }}' + login_password: '{{ item.login_password | default(omit) }}' + login_port: '{{ item.login_port | default(omit) }}' + login_unix_socket: '{{ item.login_unix_socket | default(omit) }}' + login_user: '{{ item.login_user | default(omit) }}' name: '{{ item.name }}' - password: '{{ item.password | default(OMIT) }}' - password_expire: '{{ item.password_expire | default(OMIT) }}' - password_expire_interval: '{{ item.password_expire_interval | default(OMIT) }}' - plugin: '{{ item.plugin | default(OMIT) }}' - plugin_auth_string: '{{ item.plugin_auth_string | default(OMIT) }}' - plugin_hash_string: '{{ item.plugin_hash_string | default(OMIT) }}' - priv: '{{ item.priv | default(OMIT) }}' - resource_limits: '{{ item.resource_limits | default(OMIT) }}' - salt: '{{ item.salt | default(OMIT) }}' - session_vars: '{{ item.session_vars | default(OMIT) }}' - sql_log_bin: '{{ item.sql_log_bin | default(OMIT) }}' + password: '{{ item.password | default(omit) }}' + password_expire: '{{ item.password_expire | default(omit) }}' + password_expire_interval: '{{ item.password_expire_interval | default(omit) }}' + plugin: '{{ item.plugin | default(omit) }}' + plugin_auth_string: '{{ item.plugin_auth_string | default(omit) }}' + plugin_hash_string: '{{ item.plugin_hash_string | default(omit) }}' + priv: '{{ item.priv | default(omit) }}' + resource_limits: '{{ item.resource_limits | default(omit) }}' + salt: '{{ item.salt | default(omit) }}' + session_vars: '{{ item.session_vars | default(omit) }}' + sql_log_bin: '{{ item.sql_log_bin | default(omit) }}' state: '{{ item.state }}' - subtract_privs: '{{ item.subtract_privs | default(OMIT) }}' - tls_requires: '{{ item.tls_requires | default(OMIT) }}' - update_password: '{{ item.update_password | default(OMIT) }}' + subtract_privs: '{{ item.subtract_privs | default(omit) }}' + tls_requires: '{{ item.tls_requires | default(omit) }}' + update_password: '{{ item.update_password | default(omit) }}' loop: '{{ mariadb_db_list }}' loop_control: label: '{{ item.name }} will be {{ item.state }}' From 293b4727cb1e7fecf736cf9ccc2bd50d07752241 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sat, 9 May 2026 14:06:36 -0400 Subject: [PATCH 37/40] Add python mysql drivers to manage with Signed-off-by: Jason Rothstein --- vars/Fedora-42-default.yml | 2 ++ vars/Fedora-43-default.yml | 2 ++ vars/Fedora-44-default.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/vars/Fedora-42-default.yml b/vars/Fedora-42-default.yml index 6b707e8..73602e8 100644 --- a/vars/Fedora-42-default.yml +++ b/vars/Fedora-42-default.yml @@ -7,6 +7,8 @@ package_list: state: 'present' - name: 'phpMyAdmin' state: 'present' + - name: 'python3-mysqlclient' + state: 'present' firewall_list: - permanent: 'yes' service: 'mysql' diff --git a/vars/Fedora-43-default.yml b/vars/Fedora-43-default.yml index 6b707e8..73602e8 100644 --- a/vars/Fedora-43-default.yml +++ b/vars/Fedora-43-default.yml @@ -7,6 +7,8 @@ package_list: state: 'present' - name: 'phpMyAdmin' state: 'present' + - name: 'python3-mysqlclient' + state: 'present' firewall_list: - permanent: 'yes' service: 'mysql' diff --git a/vars/Fedora-44-default.yml b/vars/Fedora-44-default.yml index 6b707e8..73602e8 100644 --- a/vars/Fedora-44-default.yml +++ b/vars/Fedora-44-default.yml @@ -7,6 +7,8 @@ package_list: state: 'present' - name: 'phpMyAdmin' state: 'present' + - name: 'python3-mysqlclient' + state: 'present' firewall_list: - permanent: 'yes' service: 'mysql' From 2f6473b7721f315224008302b743301cecb45d2b Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sat, 9 May 2026 15:09:21 -0400 Subject: [PATCH 38/40] Use the preferred python mysql client Signed-off-by: Jason Rothstein --- vars/Fedora-42-default.yml | 2 +- vars/Fedora-43-default.yml | 2 +- vars/Fedora-44-default.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vars/Fedora-42-default.yml b/vars/Fedora-42-default.yml index 73602e8..4b94aa7 100644 --- a/vars/Fedora-42-default.yml +++ b/vars/Fedora-42-default.yml @@ -7,7 +7,7 @@ package_list: state: 'present' - name: 'phpMyAdmin' state: 'present' - - name: 'python3-mysqlclient' + - name: 'python3-PyMySQL' state: 'present' firewall_list: - permanent: 'yes' diff --git a/vars/Fedora-43-default.yml b/vars/Fedora-43-default.yml index 73602e8..4b94aa7 100644 --- a/vars/Fedora-43-default.yml +++ b/vars/Fedora-43-default.yml @@ -7,7 +7,7 @@ package_list: state: 'present' - name: 'phpMyAdmin' state: 'present' - - name: 'python3-mysqlclient' + - name: 'python3-PyMySQL' state: 'present' firewall_list: - permanent: 'yes' diff --git a/vars/Fedora-44-default.yml b/vars/Fedora-44-default.yml index 73602e8..4b94aa7 100644 --- a/vars/Fedora-44-default.yml +++ b/vars/Fedora-44-default.yml @@ -7,7 +7,7 @@ package_list: state: 'present' - name: 'phpMyAdmin' state: 'present' - - name: 'python3-mysqlclient' + - name: 'python3-PyMySQL' state: 'present' firewall_list: - permanent: 'yes' From c29646f24acd9352067e883663ec1faf5941927b Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sat, 9 May 2026 17:27:46 -0400 Subject: [PATCH 39/40] Allow UNIX Socket connections to function Signed-off-by: Jason Rothstein --- templates/Fedora/42/etc/my.cnf.d/client.cnf | 2 +- templates/Fedora/43/etc/my.cnf.d/client.cnf | 2 +- templates/Fedora/44/etc/my.cnf.d/client.cnf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/Fedora/42/etc/my.cnf.d/client.cnf b/templates/Fedora/42/etc/my.cnf.d/client.cnf index 05442bf..2a70c23 100644 --- a/templates/Fedora/42/etc/my.cnf.d/client.cnf +++ b/templates/Fedora/42/etc/my.cnf.d/client.cnf @@ -10,5 +10,5 @@ default-character-set = utf8mb4 # use it for MariaDB-only client options [client-mariadb] ssl -ssl-verify-server-cert +# ssl-verify-server-cert diff --git a/templates/Fedora/43/etc/my.cnf.d/client.cnf b/templates/Fedora/43/etc/my.cnf.d/client.cnf index 05442bf..2a70c23 100644 --- a/templates/Fedora/43/etc/my.cnf.d/client.cnf +++ b/templates/Fedora/43/etc/my.cnf.d/client.cnf @@ -10,5 +10,5 @@ default-character-set = utf8mb4 # use it for MariaDB-only client options [client-mariadb] ssl -ssl-verify-server-cert +# ssl-verify-server-cert diff --git a/templates/Fedora/44/etc/my.cnf.d/client.cnf b/templates/Fedora/44/etc/my.cnf.d/client.cnf index 05442bf..2a70c23 100644 --- a/templates/Fedora/44/etc/my.cnf.d/client.cnf +++ b/templates/Fedora/44/etc/my.cnf.d/client.cnf @@ -10,5 +10,5 @@ default-character-set = utf8mb4 # use it for MariaDB-only client options [client-mariadb] ssl -ssl-verify-server-cert +# ssl-verify-server-cert From 9db90c39bdcb2ac355f24de078f09bf6376b08b6 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sat, 9 May 2026 19:47:58 -0400 Subject: [PATCH 40/40] Pass the user list to user creation instead of the db list Signed-off-by: Jason Rothstein --- tasks/main.yml | 6 +++--- vars/Fedora-42-default.yml | 2 ++ vars/Fedora-43-default.yml | 2 ++ vars/Fedora-44-default.yml | 2 ++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index e75a7d7..90d9b36 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -192,8 +192,8 @@ label: '{{ item.name }} will be {{ item.state }}' - name: 'ensure mariadb users' when: - - mariadb_db_list is defined - - mariadb_db_list is iterable + - mariadb_user_list is defined + - mariadb_user_list is iterable community.mysql.mysql_user: append_privs: '{{ item.append_privs | default(omit) }}' attributes: '{{ item.attributes | default(omit) }}' @@ -231,7 +231,7 @@ subtract_privs: '{{ item.subtract_privs | default(omit) }}' tls_requires: '{{ item.tls_requires | default(omit) }}' update_password: '{{ item.update_password | default(omit) }}' - loop: '{{ mariadb_db_list }}' + loop: '{{ mariadb_user_list }}' loop_control: label: '{{ item.name }} will be {{ item.state }}' ... diff --git a/vars/Fedora-42-default.yml b/vars/Fedora-42-default.yml index 4b94aa7..fa4bcd4 100644 --- a/vars/Fedora-42-default.yml +++ b/vars/Fedora-42-default.yml @@ -130,3 +130,5 @@ template_list: mode: '0644' owner: 'root' src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb-copytls.service' +... + diff --git a/vars/Fedora-43-default.yml b/vars/Fedora-43-default.yml index 4b94aa7..fa4bcd4 100644 --- a/vars/Fedora-43-default.yml +++ b/vars/Fedora-43-default.yml @@ -130,3 +130,5 @@ template_list: mode: '0644' owner: 'root' src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb-copytls.service' +... + diff --git a/vars/Fedora-44-default.yml b/vars/Fedora-44-default.yml index 4b94aa7..fa4bcd4 100644 --- a/vars/Fedora-44-default.yml +++ b/vars/Fedora-44-default.yml @@ -130,3 +130,5 @@ template_list: mode: '0644' owner: 'root' src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb-copytls.service' +... +