We won’t show the file here, but you can take a look on Github. It installs Nginx, copies index.html to the right place, and starts the server listening. To keep things simple, this playbook was based on Ansible’s example, Getting Started Writing Your First Playbook. Looking at the ansible_local configuration, we see it points to the playbook.yml file in our directory. We also forward a port so that once you bring the VM up you can test the connection on your host machine’s browser (at Advertisements We configure the VM to use a private network using a static IP in the reserved private address space (see the Vagrant docs on private networks for more information). ![]() This example assumes Vagrant and Virtualbox are installed. The Vagrantfile is only a few lines: nfigure("2") do |config|Ĭonfig.vm.network "forwarded_port", guest: 80, host: 8080Ĭonfig.vm.network 'private_network', ip: '192.168.56.10'Ĭonfig.vm.provision :ansible_local do |ansible|
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |