Browse Source

New "percona" role to install Percona repositories and tools

tags/9.8.0^2
Jérémy Lecour 1 year ago
committed by Jérémy Lecour
parent
commit
eb0879f3c2
7 changed files with 96 additions and 0 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +4
    -0
      percona/defaults/main.yml
  3. BIN
      percona/files/percona-release_latest.jessie_all.deb
  4. BIN
      percona/files/percona-release_latest.stretch_all.deb
  5. +30
    -0
      percona/files/percona.asc
  6. +45
    -0
      percona/tasks/main.yml
  7. +16
    -0
      percona/tasks/xtrabackup.yml

+ 1
- 0
CHANGELOG.md View File

@@ -13,6 +13,7 @@ The **patch** part changes incrementally at each release.
### Added
* filebeat: disable cloud_metadata processor by default
* metricbeat: disable cloud_metadata processor by default
* percona : new role to install Percona repositories and tools
* redis: add variable for configure unixsocketperm

### Changed


+ 4
- 0
percona/defaults/main.yml View File

@@ -0,0 +1,4 @@
---

percona__install_xtrabackup: True
percona__xtrabackup_package_name: percona-xtrabackup-24

BIN
percona/files/percona-release_latest.jessie_all.deb View File


BIN
percona/files/percona-release_latest.stretch_all.deb View File


+ 30
- 0
percona/files/percona.asc View File

@@ -0,0 +1,30 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.9 (GNU/Linux)

mQGiBEsm3aERBACyB1E9ixebIMRGtmD45c6c/wi2IVIa6O3G1f6cyHH4ump6ejOi
AX63hhEs4MUCGO7KnON1hpjuNN7MQZtGTJC0iX97X2Mk+IwB1KmBYN9sS/OqhA5C
itj2RAkug4PFHR9dy21v0flj66KjBS3GpuOadpcrZ/k0g7Zi6t7kDWV0hwCgxCa2
f/ESC2MN3q3j9hfMTBhhDCsD/3+iOxtDAUlPMIH50MdK5yqagdj8V/sxaHJ5u/zw
YQunRlhB9f9QUFfhfnjRn8wjeYasMARDctCde5nbx3Pc+nRIXoB4D1Z1ZxRzR/lb
7S4i8KRr9xhommFnDv/egkx+7X1aFp1f2wN2DQ4ecGF4EAAVHwFz8H4eQgsbLsa6
7DV3BACj1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63jYvd0HLkUFhNG+xjkpeI
SQQYEQIACQUCSybdoQIbDAAKCRAcTL3NzS79KlacAJ0aAkBQapIaHNvmAhtVjLPN
wke4ZgCePe3sPPF49lBal7QaYPdjqapa1SQ=
=qcCk
-----END PGP PUBLIC KEY BLOCK-----

+ 45
- 0
percona/tasks/main.yml View File

@@ -0,0 +1,45 @@
---

- set_fact:
percona__apt_config_package_file: "percona-release_latest.{{ ansible_distribution_release }}_all.deb"

- name: Add Percona's official GPG key
apt_key:
data: "{{ lookup('file', 'percona.asc') }}"

- name: Check if percona-release is installed
command: "dpkg -l percona-release"
failed_when: False
changed_when: False
register: percona__apt_config_package_installed

- name: Percona APT config package is available
copy:
src: "{{ percona__apt_config_package_file }}"
dest: "/root/{{ percona__apt_config_package_file }}"
when: not percona__apt_config_package_installed

# - include_role:
# name: remount-usr

- name: Percona APT config package is installed from deb file
apt:
deb: "/root/{{ percona__apt_config_package_file }}"
state: present
register: percona__apt_config_deb
when: not percona__apt_config_package_installed

- name: Percona APT config package is installed from repository
apt:
name: percona-release
state: latest
register: percona__apt_config_deb
when: percona__apt_config_package_installed

- name: APT cache is up-to-date
apt:
update_cache: yes
when: percona__apt_config_deb | changed

- include: xtrabackup.yml
when: percona__install_xtrabackup

+ 16
- 0
percona/tasks/xtrabackup.yml View File

@@ -0,0 +1,16 @@
---

- name: Percona Tools is enabled
command: percona-release enable tools release
# changed_when:
# register: percona__release_enable_tools

- name: APT cache is up-to-date
apt:
update_cache: yes
# when: percona__release_enable_tools | changed

- name: Percona XtraBackup package is installed
apt:
name: "{{ percona__xtrabackup_package_name }}"
state: present

Loading…
Cancel
Save