1
4

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 で、接続情報をすべてコマンドラインで与える

Posted at

playbook の記述とは、対象のホスト(群)に対する操作方法を記述するもので、「対象のホスト群が何か」情報はあとから提供される想定。inventory という仕組みで統一的に記述できるようにはなっているけれども、ちょっとした ansible 実行でいちいちこれを指定するのは手間。コマンドラインでもろもろの情報を与えて playbook を実行したい、イメージは ssh でコマンドを発行する感じで。

説明は省いて、これを行う方法だけを書くと次。


ansible-playbook -v -u ubuntu --private-key ~/.ssh/thekey.pem -i '192.168.33.33,' the-playbook.yml
1
4
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
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?