Skip to content

Commit

Permalink
modify sysbench install from yum to rpm
Browse files Browse the repository at this point in the history
  • Loading branch information
denglei committed Aug 29, 2014
1 parent 556b793 commit adbaa2a
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
3 changes: 2 additions & 1 deletion sysbench_install/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- name: Install initializtion require software
shell: yum -y install make cmake bc gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5-devel libidn libidn-devel openssl openssl-devel nss_ldap openldap openldap-devel openldap-clients openldap-servers libxslt-devel libevent-devel ntp libtool-ltdl bison libtool vim-enhanced tar wget readline-devel libyaml-devel patch telnet dmidecode
shell: yum -y install make cmake bc gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5-devel libidn libidn-devel openssl openssl-devel nss_ldap openldap openldap-devel openldap-clients openldap-servers libxslt-devel libevent-devel ntp libtool-ltdl bison libtool vim-enhanced tar wget readline-devel libyaml-devel patch telnet dmidecode libselinux-python
poll: 0
Binary file not shown.
Binary file not shown.
Binary file not shown.
25 changes: 22 additions & 3 deletions sysbench_install/roles/sysbench_install/tasks/install.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
- name: Install Base Require Software In Redhat Client
yum: name=sysbench state=latest
- name: Copy Sysbench Require Software To Redhat Client
copy: src={{ item }} dest=/tmp/{{ item }} owner=root group=root
with_items:
- postgresql-libs-8.4.20-1.el6_5.x86_64.rpm
- sysbench-0.4.12-5.el6.x86_64.rpm
when: ansible_os_family == "RedHat" and ansible_distribution_version|int >=6
tags: Only_install_sysbench
- name: Install Sysbench Require Software Repo
shell: rpm -ivh /tmp/{{ item }}
with_items:
- postgresql-libs-8.4.20-1.el6_5.x86_64.rpm
- sysbench-0.4.12-5.el6.x86_64.rpm
when: ansible_os_family == "RedHat" and ansible_distribution_version|int >=6
ignore_errors: yes
when: ansible_os_family == "RedHat" and ansible_distribution_version|int >=6
tags: Only_install_sysbench
- name: Delete Old Software In Redhat Client
shell: rm -rf /tmp/{{ item }}
with_items:
- postgresql-libs-8.4.20-1.el6_5.x86_64.rpm
- sysbench-0.4.12-5.el6.x86_64.rpm
when: ansible_os_family == "RedHat" and ansible_distribution_version|int >=6
tags: Only_install_sysbench
- name: Create Sysbench Test Log Dir In Redhat Client
Expand Down Expand Up @@ -28,7 +47,7 @@
when: ansible_os_family == "RedHat" and ansible_distribution_version|int >=6
tags: Onlytest
- name: Copy Sysbench Test Result from Redhat Client
fetch: src={{ sysbench_log_dir }}/{{ item }} dest=/tmp/{{ item }} flat=yes
fetch: src={{ sysbench_log_dir }}/{{ item }} dest={{ sysbench_log_dir }}/{{ item }} flat=yes
with_items:
- sysbench_cputest_{{ ansible_hostname }}-{{ time.stdout }}.log
- sysbench_threads_{{ ansible_hostname }}-{{ time.stdout }}.log
Expand Down

0 comments on commit adbaa2a

Please sign in to comment.