LoginSignup
5
5

More than 5 years have passed since last update.

Itamae | dry-run オプションで変更を行わずに動作を確認。板前がトイレを設置せずにトイレ感を味わってみる。 #devops #itamae

Last updated at Posted at 2014-10-10

Itamae | dry-run オプションで変更を行わずに動作を確認。板前がトイレを設置せずにトイレ感を味わってみる。 #devops #itamae

概要

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

dry-run オプションで変更を行わずに動作を確認します。
toilet コマンドのインストールを dry-run で行い、トイレを設置せずにトイレ感を味わってみます。

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

試行

仕様

  • toilet をインストールするだけのレシピを利用。
package "toilet" do
  action :install
end
  • 対象サーバーは、 192.168.33.99 とする。
  • user は vagrant

実行

dry-run オプションは -n--dry-run で指定可能。

# ssh コマンドでローカル環境からプロビジョニング実行
$ itamae ssh -h 192.168.33.99 -n -u vagrant recipe.rb
 INFO : Starting Itamae...
 INFO : Recipe: /cygdrive/d/project/study/qiita/20141010_itamae_dry_run/recipe.rb
 INFO :    package[toilet]
 INFO :       action: install
 INFO :          installed will change from 'false' to 'true'

# 192.168.33.99 に ssh 接続して tree のインストール結果を確認
$ vagrant ssh
$ which toilet
# インストールされていない
$ toilet -v
The program 'toilet' is currently not installed.  You can install it by typing:
sudo apt-get install toilet
$ exit # ローカル環境へ

# dry-run option を外してインストール実施
$ itamae ssh -h 192.168.33.99 -u vagrant recipe.rb
 INFO : Starting Itamae...
 INFO : Recipe: /path/to/your/vagrant_home/itamae_target/recipe.rb
 INFO :    package[toilet]
 INFO :       action: install
 INFO :          installed will change from 'false' to 'true'

# 192.168.33.99 に ssh 接続して tree のインストール結果を確認
$ vagrant ssh
$ which toilet
# インストールされていない
$ toilet -v
The program 'toilet' is currently not installed.  You can install it by typing:
sudo apt-get install toilet
$ exit # ローカル環境へ
$ 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 ]

おまけ

せっかくインストールしたトイレを堪能

$ sudo apt-get install toilet-fonts
$ toilet "Itamae" -F gay

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

itamae_toilet_gay.png

$ toilet "Itamae" -F metal

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

itamae_toilet_metal.png

$ toilet -f bigascii9 -F gay itamae


   #
          #
          #
 ###    #####  .###.  ## #   .###.   ###
   #      #    #: :#  #:#:#  #: :#     :#
   #      #        #  # # #      #  #   #
   #      #    :####  # # #  :####  #####
   #      #    #:  #  # # #  #:  #  #
   #      #.   #.  #  # # #  #.  #      #
 #####    :##  :##:#  # # #  :##:#   ###:

itamae_toilet_gay_bigascii9.png

参照

5
5
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
5
5