LoginSignup
1
1

More than 1 year has passed since last update.

Ansible | ssh のキャッシュを無効にする

Last updated at Posted at 2017-06-30
~/.ansible.cfg
[ssh_connection]
ssh_args = -o ControlMaster=no

この設定をしておかないと、
失敗するようにインベントリファイルを書換えたのに、何故かsshコネクションが成功する という、謎の事態が生じる場合があった。

  • パスワード入力が必要なサーバーに対して、パスワード指定を消してアクセスしたのに、うまく接続できてしまう。
  • 手元から known_hosts ファイルを消したのに、認証の質問なしで、うまく接続できてしまう。

など。

ファイル設場所

いずれかの場所に置く。

  • .ansible.cfg (カレントディレクトリに設定する場合)
  • ~/.ansible.cfg (ユーザーディレクトリに設定する場合)
  • /etc/ansible/ansible.cfg (システムに設定する場合)

環境

  • ansible 1.9.6
  • Mac OS Sierra 10.12.4

参考

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

Twitter

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