LoginSignup
2
2

More than 5 years have passed since last update.

ansibleをlocal modeで実行

Last updated at Posted at 2014-10-28

目的

localhostにインベントリファイルなしにansibleでプロビジョニングする。

20150905追記) ansible のバージョンアップの影響で以下の方法では実行出来なくなってしまいました。
localhost に対して実行する場合もインベントリファイルを用意してください m(_ _)m

以下、古い内容ですm(_ _)m ↓↓

playbookの用意

connection: local の設定を利用する

php.yaml
---
- host: localhost
  connection: local
  tasks:
    - name: composerインストール
      shell: curl -sS https://getcomposer.org/installer | php

実行

$ ansible-playbook php.yaml

注意事項?

  • ansibleコマンドでは、パースエラーが起きて実行できなかった。。
2
2
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
2
2