Browse code

Add Vagrantfile

Robert Cranston authored on 13/04/2020 22:21:29
Showing 3 changed files

1 1
new file mode 100644
... ...
@@ -0,0 +1,2 @@
1
+/.vagrant
2
+/*-console.log
... ...
@@ -19,8 +19,13 @@ ansible-playbook -K -i $host, site.yml
19 19
 (note the comma!) replacing `$host` with the host you want to set up (can be
20 20
 `localhost`, perhaps adding `--connection=local`).
21 21
 
22
+A [`Vagrantfile`][] that uses it is also provided, try it out with the usual
23
+[`vagrant up`][].
24
+
22 25
 [`site.yml`]: site.yml
23 26
 [playbook]: https://docs.ansible.com/ansible/latest/user_guide/playbooks.html
27
+[`Vagrantfile`]: Vagrantfile
28
+[`vagrant up`]: https://www.vagrantup.com/docs/cli/up.html
24 29
 
25 30
 ## License
26 31
 
27 32
new file mode 100644
... ...
@@ -0,0 +1,12 @@
1
+Vagrant.configure(2) do |config|
2
+  config.vm.box = 'ubuntu/focal64'
3
+
4
+  config.vm.provision 'shell', inline: <<~'SHELL'
5
+    export DEBIAN_FRONTEND="noninteractive"
6
+    apt-get update
7
+  SHELL
8
+
9
+  config.vm.provision 'ansible' do |ansible|
10
+    ansible.playbook = 'site.yml'
11
+  end
12
+end