Skip to content

Instantly share code, notes, and snippets.

@januswel
Created August 12, 2014 20:37
Show Gist options
  • Save januswel/c0e82fd8582710969c88 to your computer and use it in GitHub Desktop.
Save januswel/c0e82fd8582710969c88 to your computer and use it in GitHub Desktop.
ssh config を汚さずに Ansible で Vagrant ホストを扱う ref: http://qiita.com/janus_wel/items/faac04f2ec2cdb50d074
[defaults]
hostfile = .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory
remote_user = vagrant
private_key_file = ~/.vagrant.d/insecure_private_key
host_key_checking = False
--- # generate ansible inventory file with Vagrant
- hosts: default
tasks:
- name: ping
action: ping
config.vm.provision "ansible" do |ansible|
ansible.host_key_checking = false
ansible.playbook = "generate-inventory.yml"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment