ansible to Vagrant boxes

  • メモ
    • 手動で実行する場合、ポート番号とかをインベントリファイルに書く必要がある。全部書くとこんな感じ
[servers]
c ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 ansible_ssh_private_key_file=/home/yuk/.vagrant.d/insecure_private_key ansible_ssh_user=vagrant
    • 普通は vagrant に任せたほうが良い?最低限の設定は以下
Vagrant.configure("2") do |config|
  config.vm.provision "ansible" do |ansible|
    ansible.playbook = "playbook.yml"
  end
end

実行は以下

$ vagrant provision

CentOS6.5 で ansible を使う

  • メモ
    • ssh で接続するときに、 ~/.ssh/config の Port を見てくれないようなので、インベントリファイルに書く必要がありそう

CentOS6.5 で chef (chef-solo) を使う

  • インストール
    • chef-solo を使うには、 client をインストールすれば良い。
# curl -L https://www.opscode.com/chef/install.sh | bash

CentOS6.5 で puppet を使う

$ sudo rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm
$ sudo yum update
$ sudo yum install puppet
  • puppet をサーバクライアントで動かすのは試してない
    • クライアントは、サーバにある manifest の_どれ_を処理するんだろう?
      • manifests/ にあるもの全部?
      • manifests/site.pp ?