From: Mike Cambria Date: Thu, 5 Oct 2017 19:25:38 +0000 (-0400) Subject: ch02 initial libvirt changes X-Git-Url: https://git.halfball.org/?a=commitdiff_plain;h=d1df32c6f4b5d45d1f7b209e5962fce5e3046e43;p=ansiblebook.git ch02 initial libvirt changes --- diff --git a/ch02/playbooks/Vagrantfile b/ch02/playbooks/Vagrantfile index ec7e77b..dc1efb0 100644 --- a/ch02/playbooks/Vagrantfile +++ b/ch02/playbooks/Vagrantfile @@ -1,7 +1,12 @@ + +ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt' + VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - config.vm.box = "ubuntu/trusty64" + #config.vm.box = "ubuntu/trusty64" + config.vm.box = "yk0/ubuntu-xenial" + config.vm.network "forwarded_port", guest: 22, host: 2233 config.vm.network "forwarded_port", guest: 80, host: 8080 config.vm.network "forwarded_port", guest: 443, host: 8443 end diff --git a/ch02/playbooks/ansible.cfg b/ch02/playbooks/ansible.cfg index d2899e1..4debd25 100644 --- a/ch02/playbooks/ansible.cfg +++ b/ch02/playbooks/ansible.cfg @@ -1,5 +1,6 @@ [defaults] inventory = hosts remote_user = vagrant -private_key_file = .vagrant/machines/default/virtualbox/private_key +#private_key_file = .vagrant/machines/default/virtualbox/private_key +private_key_file = .vagrant/machines/default/libvirt/private_key host_key_checking = False diff --git a/ch02/playbooks/hosts b/ch02/playbooks/hosts index 1f1cdb7..551a090 100644 --- a/ch02/playbooks/hosts +++ b/ch02/playbooks/hosts @@ -1,2 +1,3 @@ [webservers] -testserver ansible_host=127.0.0.1 ansible_port=2222 +#testserver ansible_host=127.0.0.1 ansible_port=2222 +testserver ansible_host=127.0.0.1 ansible_port=2233