Posted at

ubuntuにinnotopを入れるAnsible Play bookを作ったよ

More than 3 years have passed since last update.

モジュール入れたりいろいろ複雑だったからAnsible Play bookにしておいた。


innotop.yml

- hosts: all

sudo: yes
tasks:
- name: Package prerequisites for Perl
apt: name=make state=present
with_items:
- make
- gcc
- curl
- perl-doc
- libmodule-build-perl

- name: Install cpanminus
shell: curl -L http://cpanmin.us | perl - App::cpanminus

- cpanm: name=DBI
- cpanm: name=Time::HiRes
- cpanm: name=Term::ReadKey
- cpanm: name=DBD::mysql

- name: Get innotop
get_url: url="https://innotop.googlecode.com/files/innotop-1.9.1.tar.gz" dest=/tmp

- name: extract innotop
command: tar xvfz innotop-1.9.1.tar.gz chdir=/tmp creates=/tmp/innotop-1.9.1

- name: install innotop
shell: perl Makefile.PL && make install chdir=/tmp/innotop-1.9.1