Compare commits
6 Commits
15f1653e90
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 20f017d808 | |||
| 9fcbbdf23f | |||
| c8432c0507 | |||
| 6cf0422c61 | |||
| acd3223ba3 | |||
| 8a9010a5e6 |
61
meta/main.yml
Normal file
61
meta/main.yml
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
galaxy_info:
|
||||||
|
author: your name
|
||||||
|
description: your 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
|
||||||
|
|
||||||
|
# Some suggested licenses:
|
||||||
|
# - BSD (default)
|
||||||
|
# - MIT
|
||||||
|
# - GPLv2
|
||||||
|
# - GPLv3
|
||||||
|
# - Apache
|
||||||
|
# - CC-BY
|
||||||
|
license: license (GPLv2, CC-BY, etc)
|
||||||
|
|
||||||
|
min_ansible_version: 2.4
|
||||||
|
|
||||||
|
# If this a Container Enabled role, provide the minimum Ansible Container version.
|
||||||
|
# min_ansible_container_version:
|
||||||
|
|
||||||
|
# Optionally specify the branch Galaxy will use when accessing the GitHub
|
||||||
|
# repo for this role. During role install, if no tags are available,
|
||||||
|
# Galaxy will use this branch. During import Galaxy will access files on
|
||||||
|
# this branch. If Travis integration is configured, only notifications for this
|
||||||
|
# branch will be accepted. Otherwise, in all cases, the repo's default branch
|
||||||
|
# (usually master) will be used.
|
||||||
|
#github_branch:
|
||||||
|
|
||||||
|
#
|
||||||
|
# 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:
|
||||||
|
- { role: tco.changelog, myrole_name: ansible_mariadb }
|
||||||
|
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
||||||
|
# if you add dependencies to this list.
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
when: (mariadb_root_password is not defined) or (mariadb_root_password|length ==0)
|
when: (mariadb_root_password is not defined) or (mariadb_root_password|length ==0)
|
||||||
|
|
||||||
- name: install on CentOS
|
- name: install on CentOS
|
||||||
|
when: ansible_os_family == 'RedHat'
|
||||||
block:
|
block:
|
||||||
- name: install repo
|
- name: install repo
|
||||||
vars:
|
vars:
|
||||||
@@ -34,16 +35,9 @@
|
|||||||
- mariadb-server
|
- mariadb-server
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
when: ansible_os_family == 'RedHat'
|
|
||||||
|
|
||||||
|
|
||||||
- name: install mariadb server package - debian
|
|
||||||
ansible.builtin.package:
|
|
||||||
name: "{{ packages_list }}"
|
|
||||||
state: present
|
|
||||||
when: ansible_os_family == "Debian"
|
|
||||||
|
|
||||||
- name: setup logging
|
- name: setup logging
|
||||||
|
when: ansible_os_family == 'RedHat'
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ mariadb_server_log }}"
|
path: "{{ mariadb_server_log }}"
|
||||||
state: touch
|
state: touch
|
||||||
@@ -52,6 +46,7 @@
|
|||||||
mode: 0640
|
mode: 0640
|
||||||
|
|
||||||
- name: setup logfile rotation
|
- name: setup logfile rotation
|
||||||
|
when: ansible_os_family == 'RedHat'
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: mysql_logrotate
|
src: mysql_logrotate
|
||||||
dest: /etc/logrotate.d/mysql.conf
|
dest: /etc/logrotate.d/mysql.conf
|
||||||
@@ -113,7 +108,7 @@
|
|||||||
|
|
||||||
- name: deploy backup script
|
- name: deploy backup script
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: https://infra.opendoor.fr/git/tom/mysql_backup.git
|
repo: https://git.opendoor.fr/tom/mysql_backup.git
|
||||||
dest: /root/bin/mysql_backup
|
dest: /root/bin/mysql_backup
|
||||||
|
|
||||||
- name: backup script permissions
|
- name: backup script permissions
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{{ mariadb_server_log }} {
|
{{ mariadb_server_log }} {
|
||||||
daily
|
daily
|
||||||
rotate 7
|
rotate 7
|
||||||
create 0640 mysql wheel
|
create 0640 mysql {{ admin_group }}
|
||||||
postrotate
|
postrotate
|
||||||
/usr/bin/mysqladmin flush-logs
|
/usr/bin/mysqladmin flush-logs
|
||||||
endscript
|
endscript
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[client]
|
[client]
|
||||||
host=localhost
|
host=localhost
|
||||||
user={{ mariadb_root_username }}
|
user={{ mariadb_root_username }}
|
||||||
password={{ mariadb_root_password }}
|
password="{{ mariadb_root_password }}"
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
packages_list:
|
packages_list:
|
||||||
- mariadb-server
|
- mariadb-server
|
||||||
- python-pymysql
|
|
||||||
admin_group: adm
|
admin_group: adm
|
||||||
|
|
||||||
|
|||||||
1
vars/debian12.yml
Symbolic link
1
vars/debian12.yml
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
debian11.yml
|
||||||
1
vars/debian13.yml
Symbolic link
1
vars/debian13.yml
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
debian.yml
|
||||||
Reference in New Issue
Block a user