vagrant provisionの実行時に、エラー「The Ansible software could not be found! 」

カテゴリ: Ansible, Vagrant

Vagrantを使っていて、ansibleでサーバのプロビジョニングをしようとした時、The Ansible software could not be found!エラーが出る場合があります。

$ vagrant provision
==> default: Running provisioner: ansible...
Vagrant gathered an unknown Ansible version:

and falls back on the compatibility mode '1.8'.

Alternatively, the compatibility mode can be specified in your Vagrantfile:

    default: Running ansible-playbook...
The Ansible software could not be found! Please verify
that Ansible is correctly installed on your host system.

If you haven't installed Ansible yet, please install Ansible
on your host system. Vagrant can't do this for you in a safe and
automated way.
Please check for more information.



brew install ansible

インストール後に、ansible --versionを実行すればインストールできたか確認できあます。

$ ansible --version
ansible 2.5.1
  config file = None
  configured module search path = [u'/Users/username/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/2.5.1/libexec/lib/python2.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.14 (default, Mar 22 2018, 14:43:05) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]





メールアドレスが公開されることはありません。 が付いている欄は必須項目です