From the course: Learning HashiCorp Packer

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Solution: Use Ansible to provision the MariaDB server

Solution: Use Ansible to provision the MariaDB server - Packer Tutorial

From the course: Learning HashiCorp Packer

Start my 1-month free trial

Solution: Use Ansible to provision the MariaDB server

(upbeat music) - [Instructor] I have here the files for creating a simple website using the Ansible Provisioner which I'll be using as a base. The first thing I'm going to do is rename the files. So instead of saying NGINX, they say MariaDB. As I've renamed the Ansible playbook, I need to rename where it's referenced in the packer template. I also asked if you could update the Ubuntu image to 18.04. So let's change the filter. As we've updated the image, we no longer need these extra variables here. Now let's update the Ansible playbook. We want to remove all of the NGINX tasks as we're no longer installing that. And we want to use the geerlingguy.mysql role. As per the documentation, there are some extra variables that are needed to make this work. I've already written them out here as a snippet which I will be copying over. That way I don't manage to make a typo. We finally need to tell Ansible to install the…

Contents