お気軽Ansibleはじめ

Ansibleを使ってみようかなと思って Ansible が使える Vagrantfile を作っといた。

github.com

Ansible Local Provisioner

Ansibleトライするのに、Macにインストールせずにやりたいなって思って。Vagrant 1.8で導入されたAnsible Local Provisionerを使うことにした。

shin1x1.hatenablog.com

Ansible 2.0を検出できない

でも、なんか、Ansible 2.0でなんか変わったみたいで、Ansible Local ProvisionerがAnsibleを検出できないみたいね。こんなエラーがでた。

default: Installing Ansible...
The Ansible software could not be found! Please verify
that Ansible is correctly installed on your guest system.

If you haven't installed Ansible yet, please install Ansible
on your Vagrant basebox, or enable the automated setup with the
`install` option of this provisioner. Please check
https://docs.vagrantup.com/v2/provisioning/ansible_local.html
for more information.


1.8.2で修正されるみたい。

ansible_local provisioner can't detect ansible 2.0 install due to changed exit codes · Issue #6793 · mitchellh/vagrant · GitHub

とりあえずは、そこで紹介されてるworkaroundをVagrantfileに書いといた。一回エラーが出た後、もう一回provisionしたらOK。

さてー。playbook.ymlをごにょごにょして遊ぶかなー。

sahara使ってロールバックしたらいいかなって思うんだけど、なんかsnapshotの機能が公式に追加されたんだったっけ?またみとこ。

2/6 16:30追記: みといた。
bufferings.hatenablog.com