LoginSignup
13
12

More than 5 years have passed since last update.

Itamae | vagrant-itamae plugin で Vagrantにトイレを設置 #devops #itamae

Last updated at Posted at 2014-10-14

Itamae | vagrant-itamae plugin で Vagrantにトイレを設置 #devops #itamae

概要

プロビジョニングツール Itamae

vagrant-itamae plugin で プロビジョニングを行います。
vagrant-itamae GitHub
toilet コマンドのインストールします。

※toilet コマンドについては下記リンク参照
http://www.tecmint.com/20-funny-commands-of-linux-or-linux-is-fun-in-terminal/

インストール

$ vagrant plugin install vagrant-itamae

試行

前提

動作確認に使用した Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.define "itamae-target" do |web|
    web.vm.provider :virtualbox do |vb|
      vb.name = "itamae_target"
    end
    web.vm.hostname = "itamae-target"
    web.vm.box = "precise64"
    web.vm.network :private_network, ip: "192.168.33.99"

    config.vm.provision :itamae do |config|
      config.sudo = true
      config.recipes = ['./recipe.rb']
    end
  end
end

仕様

  • toilet をインストールするだけのレシピを利用。
execute 'apt-get-upgrade' do
  command 'apt-get upgrade -y'
end

execute 'apt-get update' do
  command 'apt-get update -y'
end

package "toilet" do
  action :install
end
  • Vagrant の VM名は itamae_target
  • user は vagrant

実行

# プロビジョニング実行
$ vagrant up
$ vagrant ssh
$ which toilet
/usr/bin/toilet
$ toilet -v
TOIlet Copyright 2006 Sam Hocevar
Internet: <sam@hocevar.net> Version: 0.2, date:

TOIlet, along with the various TOIlet fonts and documentation, may be
freely copied and distributed.

If you use TOIlet, please send an e-mail message to <sam@hocevar.net>.

The latest version of TOIlet is available from the web site,
        http://libcaca.zoy.org/toilet.html

Usage: toilet [ -hkostvSW ] [ -d fontdirectory ]
              [ -f fontfile ] [ -F filter ] [ -w outputwidth ]
              [ -I infocode ] [ -E format ] [ message ]

$ toilet "Itamae" -F gay

 mmmmm    m
   #    mm#mm   mmm   mmmmm   mmm    mmm
   #      #    "   #  # # #  "   #  #"  #
   #      #    m"""#  # # #  m"""#  #""""
 mm#mm    "mm  "mm"#  # # #  "mm"#  "#mm"

itamae_toilet_gay.png

参照

13
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
12