-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaybook.yml
More file actions
61 lines (55 loc) · 1.56 KB
/
Copy pathplaybook.yml
File metadata and controls
61 lines (55 loc) · 1.56 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
61
# Playbook to install sysbench from the source and also mysql 5.7 community
# version to play with.
---
# file: playbook.yml
- hosts: all
become: true
tasks:
- name: Install required packages to build sysbench
yum:
name: "{{ item }}"
state: present
with_items:
- libtool
- unzip
- autoconf
- automake
- vim
- name: Import MySQL Repository GPG key
rpm_key:
state: present
key: http://dev.mysql.com/doc/refman/5.7/en/checking-gpg-signature.html
- name: Add MySQL 5.7 Community repository
yum_repository:
name: mysql57-community
description: MySQL 5.7 Community Server
file: mysql-community
baseurl: http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/
gpgcheck: yes
- name: Downloading sysbench from GitHub
unarchive:
src: https://github.com/akopytov/sysbench/archive/master.zip
dest: /opt/
copy: no
creates: /opt/sysbench-master/
- name: Install MySQL 5.7 server, client and devel
yum:
name: "{{ item }}"
state: present
with_items:
- mysql-community-server
- mysql-community-client
- mysql-community-libs-compat
- mysql-community-devel
- name: Building sysbench source.
command: ./autogen.sh && ./configure && make && make install
args:
chdir: /opt/sysbench-master/
creates: /usr/local/bin/sysbench
- name: Copying test1.lua script
copy:
src: files/test1.lua
dest: /home/vagrant/test1.lua
owner: vagrant
group: vagrant
mode: "u=rwx,g=r,o=r"