6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ansible×Cowsay

Posted at
  • cowsayがインストールされているしたマシンでAnsibleを実行すると、牛が出てきます。
  • Localマシンならいいけど、プロダクション、ステージングでやると怒られます。
__________________ 
< PLAY [test-play] >
------------------ 
       \   ^__^
        \  (oo)\_______
           (__)\       )\/\
               ||----w |
               ||     ||

______________ 
< TASK [setup] >
-------------- 
       \   ^__^
        \  (oo)\_______
           (__)\       )\/\
               ||----w |
               ||     ||

ok: [10.0.0.90]
_____________________ 
< TASK [epel-install] >
--------------------- 
       \   ^__^
        \  (oo)\_______
           (__)\       )\/\
               ||----w |
               ||     ||

ok: [10.0.0.90]
______________________ 
< TASK [nginx-install] >
---------------------- 
       \   ^__^
        \  (oo)\_______
           (__)\       )\/\
               ||----w |
               ||     ||

ok: [10.0.0.90]
_____________________ 
< TASK [nginx-status] >
--------------------- 
       \   ^__^
        \  (oo)\_______
           (__)\       )\/\
               ||----w |
               ||     ||

ok: [10.0.0.90]
____________ 
< PLAY RECAP >
------------ 
       \   ^__^
        \  (oo)\_______
           (__)\       )\/\
               ||----w |
               ||     ||

10.0.0.90                  : ok=4    changed=0    unreachable=0    failed=0   
  • ansible.cfgでnocowsをコメントアウトすれば、牛は出てこないです。
/etc/ansible/ansible.cfg
# don't like cows?  that's unfortunate.
# set to 1 if you don't want cowsay support or export ANSIBLE_NOCOWS=1 
nocows = 1

PLAY [test-play] ***************************************************************

TASK [setup] *******************************************************************
ok: [10.0.0.90]

TASK [epel-install] ************************************************************
ok: [10.0.0.90]

TASK [nginx-install] ***********************************************************
ok: [10.0.0.90]

TASK [nginx-status] ************************************************************
ok: [10.0.0.90]

PLAY RECAP *********************************************************************
10.0.0.90                  : ok=4    changed=0    unreachable=0    failed=0
6
6
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
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?