mirror of
https://codeberg.org/scottslowe/learning-tools.git
synced 2026-03-11 09:04:37 +00:00
Merge pull request #19 from lowescott/vagrant-ansible-inventory
Switch to Vagrant-generated Ansible inventory
This commit is contained in:
commit
08f48aff4d
3 changed files with 1 additions and 10 deletions
8
lxd/Vagrantfile
vendored
8
lxd/Vagrantfile
vendored
|
|
@ -15,14 +15,6 @@ require 'yaml'
|
|||
# Read YAML file with VM details (box, CPU, and RAM)
|
||||
machines = YAML.load_file(File.join(File.dirname(__FILE__), 'machines.yml'))
|
||||
|
||||
# Create Ansible inventory file
|
||||
# (current contents will be overwritten)
|
||||
f = File.open('hosts','w')
|
||||
machines.each do |machine|
|
||||
f.puts machine['ip_addr']
|
||||
end # machines.each
|
||||
f.close
|
||||
|
||||
# Create and configure the VMs
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
[defaults]
|
||||
inventory = ./hosts
|
||||
inventory = .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory
|
||||
private_key_file = ~/.vagrant.d/insecure_private_key
|
||||
remote_user = vagrant
|
||||
host_key_checking = False
|
||||
|
|
@ -1 +0,0 @@
|
|||
192.168.100.100
|
||||
Loading…
Reference in a new issue