Add fail2ban role and clean up yaml lint noise

This commit is contained in:
2026-08-08 23:50:32 -05:00
parent 9b837dd780
commit 6c7ecfc724
352 changed files with 4632 additions and 4186 deletions
+120 -102
View File
@@ -1,134 +1,152 @@
---
# vars file for ensure_mariadb
package_list:
- name: 'mariadb'
state: 'present'
- name: 'mariadb-server'
state: 'present'
- name: 'phpMyAdmin'
state: 'present'
- name: 'python3-PyMySQL'
state: 'present'
- name: mariadb
state: present
- name: mariadb-server
state: present
- name: phpMyAdmin
state: present
- name: python3-PyMySQL
state: present
firewall_list:
- permanent: 'yes'
service: 'mysql'
state: 'enabled'
service: mysql
state: enabled
service_list:
- name: 'httpd.service'
state: 'started'
- name: httpd.service
state: started
enabled: 'yes'
- name: 'httpd-reload.timer'
state: 'started'
- name: httpd-reload.timer
state: started
enabled: 'yes'
- name: 'php-fpm.service'
state: 'started'
- name: php-fpm.service
state: started
enabled: 'yes'
- name: 'mariadb-copytls.service'
state: 'started'
- name: mariadb-copytls.service
state: started
enabled: 'yes'
- name: 'mariadb.service'
state: 'started'
- name: mariadb.service
state: started
enabled: 'yes'
template_list:
- dest: '/etc/my.cnf.d/client.cnf'
group: 'root'
- dest: /etc/my.cnf.d/client.cnf
group: root
mode: '0644'
owner: 'root'
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'
owner: root
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_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/mariadb-server.cnf'
- dest: '/etc/my.cnf.d/mysql-clients.cnf'
group: 'root'
owner: root
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_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/mysql-clients.cnf'
- dest: '/etc/my.cnf.d/spider.cnf'
group: 'root'
owner: root
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_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/spider.cnf'
- dest: '/etc/my.cnf.d/enable_encryption.preset'
group: 'root'
owner: root
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_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'
owner: root
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_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'
owner: root
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_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'
owner: root
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_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'
owner: root
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_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/provider_bzip2.cnf'
- dest: '/etc/my.cnf.d/provider_lz4.cnf'
group: 'root'
owner: root
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_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/provider_lz4.cnf'
- dest: '/etc/my.cnf.d/provider_lzma.cnf'
group: 'root'
owner: root
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_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/provider_lzma.cnf'
- dest: '/etc/my.cnf.d/provider_lzo.cnf'
group: 'root'
owner: root
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_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/provider_lzo.cnf'
- dest: '/etc/my.cnf.d/provider_snappy.cnf'
group: 'root'
owner: root
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_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf.d/provider_snappy.cnf'
- dest: '/etc/phpMyAdmin/config.inc.php'
group: 'root'
owner: root
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_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/phpMyAdmin/config.inc.php'
- dest: '/etc/my.cnf'
group: 'root'
owner: root
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_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/my.cnf'
- dest: '/etc/httpd/conf.d/phpMyAdmin.conf'
group: 'root'
owner: root
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_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/phpMyAdmin.conf'
- dest: '/usr/lib/systemd/system/mariadb.service'
group: 'root'
owner: root
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_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb.service'
- dest: '/usr/lib/systemd/system/mariadb@.service'
group: 'root'
owner: root
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_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb@.service'
- dest: '/usr/lib/systemd/system/mariadb-copytls.timer'
group: 'root'
owner: root
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_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb-copytls.timer'
- dest: '/usr/lib/systemd/system/mariadb-copytls.service'
group: 'root'
owner: root
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_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/mariadb-copytls.service'
...
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/mariadb-copytls.service'