-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathtasks_percona_toolkit.yml
More file actions
60 lines (51 loc) · 1.5 KB
/
Copy pathtasks_percona_toolkit.yml
File metadata and controls
60 lines (51 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# https://github.com/Voronenko/chef-developer_recipes/blob/master/recipes/percona_toolkit.rb
- debug: var=ansible_facts['os_family']
- name: Percona| Check compability
assert:
that: ansible_facts['os_family'] == 'Debian'
tags:
-percona
- name: Percona | Check if is present
command: test -x /usr/bin/pt-deadlock-logger
ignore_errors: yes
register: percona_present
tags:
-percona
-setup
- name: Percona | Download percona-release package
get_url:
url: https://repo.percona.com/apt/percona-release_latest.generic_all.deb
dest: /tmp/percona-release_latest.generic_all.deb
when: percona_present is failed
tags:
-percona
-setup
- name: Percona | Install Percona repository package
apt:
deb: /tmp/percona-release_latest.generic_all.deb
when: percona_present is failed
become: true
tags:
-percona
-setup
- name: Percona | Update APT package list
apt:
update_cache: yes
become: true
when: percona_present is failed
tags:
-percona
-setup
- name: Percona | Install
apt:
update-cache: yes
force: yes
state: present
pkg: percona-toolkit
when: ansible_os_family == "Debian" and percona_present is failed
become: yes
tags:
-percona
-setup
# usage
# Locks: pt-deadlock-logger --daemonize --run-time=3000 --user=root --password=rootpass --create-dest-table --dest D=test_LCX,t=deadlocks,h=127.0.0.1