<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=Ansible%2FNginx_Playbook%2FVagrant_Setup</id>
	<title>Ansible/Nginx Playbook/Vagrant Setup - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=Ansible%2FNginx_Playbook%2FVagrant_Setup"/>
	<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Ansible/Nginx_Playbook/Vagrant_Setup&amp;action=history"/>
	<updated>2026-06-19T12:25:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.12</generator>
	<entry>
		<id>https://charlesreid1.com/w/index.php?title=Ansible/Nginx_Playbook/Vagrant_Setup&amp;diff=25627&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;=Nginx Playbook: Vagrant Setup=  This page assumes that we are using Ansible to manage virtual machines created by Vagrant (which is like a Virtual Box wrapper for the com...&quot;</title>
		<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Ansible/Nginx_Playbook/Vagrant_Setup&amp;diff=25627&amp;oldid=prev"/>
		<updated>2018-12-07T19:16:08Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;=Nginx Playbook: Vagrant Setup=  This page assumes that we are using Ansible to manage virtual machines created by &lt;a href=&quot;/wiki/Vagrant&quot; title=&quot;Vagrant&quot;&gt;Vagrant&lt;/a&gt; (which is like a Virtual Box wrapper for the com...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Nginx Playbook: Vagrant Setup=&lt;br /&gt;
&lt;br /&gt;
This page assumes that we are using Ansible to manage virtual machines created by [[Vagrant]] (which is like a Virtual Box wrapper for the command line). &lt;br /&gt;
&lt;br /&gt;
==Initializing vagrant machines==&lt;br /&gt;
&lt;br /&gt;
The example on the [[Vagrant]] page (spinning up a Ubuntu Trusty node) walks through the process. Briefly:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vagrant init ubuntu/trusty64&lt;br /&gt;
vagrant up&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will automatically create a Vagrantfile.&lt;br /&gt;
&lt;br /&gt;
You can also [https://charlesreid1.com/wiki/Ansible/Full_Stack_Playbook#Vagrant_multi-machine_setup set up vagrant to use multiple machines], as in the more complicated [[Ansible/Full Stack Playbook]] example.&lt;br /&gt;
&lt;br /&gt;
==Remap ports and reload==&lt;br /&gt;
&lt;br /&gt;
Next, we want to remap some ports.&lt;br /&gt;
&lt;br /&gt;
We want to arrange the Vagrant machine so that we map the local port 8080 to the vagrant machine&amp;#039;s port 80, and map the local port 8443 to the vagrant machine&amp;#039;s port 443.&lt;br /&gt;
&lt;br /&gt;
===Edit Vagrantfile===&lt;br /&gt;
&lt;br /&gt;
The Vagrantfile is a Ruby file that specifies how to start up and set up the Vagrant boxes. We can make modifications to it and ask Vagrant to reload/reboot the virtual machine using the new Vagrantfile. The Vagrantfile should be modified as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VAGRANTFILE_API_VERSION = &amp;quot;2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|&lt;br /&gt;
  config.vm.box = &amp;quot;ubuntu/trusty64&amp;quot;&lt;br /&gt;
  config.vm.network &amp;quot;forwarded_port&amp;quot;, guest: 80, host: 8080&lt;br /&gt;
  config.vm.network &amp;quot;forwarded_port&amp;quot;, guest: 443, host: 8443&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now instruct vagrant to reload from the Vagrantfile:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ vagrant reload&lt;br /&gt;
&lt;br /&gt;
==&amp;gt; default: Forwarding ports...&lt;br /&gt;
    default: 80 =&amp;gt; 8080 (adapter 1)&lt;br /&gt;
    default: 443 =&amp;gt; 8443 (adapter 1)&lt;br /&gt;
    default: 22 =&amp;gt; 2222 (adapter 1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Flags=&lt;br /&gt;
&lt;br /&gt;
{{AnsibleFlag}}&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>