Skip to content

nidr0x/ubuntu-18-04-packer-ansible-vagrant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ubuntu 18.04 Vagrant box with Packer and Ansible

Packer configuration thats build an Ubuntu 18.04 Vagrant box image and provisions it with Ansible.

Requirements

You will need the following software installed on your local machine:

Ansible is used in the build process within VM (thats install Ansible), so you don't need this on your local machine.

Usage

cd to the directory and run:

$ packer build ubuntu-18.04-vagrant.json

Note: If you are using Arch Linux in your local machine, replace packer command with packer-io

Testing the machine image

The Vagrantfile included in this repository allows quick testing of the Virtualbox image built above. From the same directory, spin up a new Vagrant instance with the following command line:

$ vagrant up

Tweaking the example

If you want to install additional software, instead to do with shell init scripts in Packer, you can do it through Ansible. An Ansible Playbook to add software is available in (ansible/playbook.yml).

For custom timezone, keyboard configuration and other installation things, you can edit (ansible/playbook.yml).

Testing boxes

As you can see, there is not Vagrantfile (but you can add easily). So, you will need to add manually the box to Vagrant. Let's try:

$ vagrant box add ubuntu-18.04.box --name Ubuntu18-Ansible

License

MIT / BSD

About

Ubuntu 18.04 Vagrant box built with Ansible and Packer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages