O'Reilly logo

Effective DevOps with AWS - Second Edition by Nathaniel Felsen, Giuseppe Borgese, Yogesh Raheja

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the Ansible playbook for Jenkins

Start by navigating to our ansible roles directory:

$ cd ansible/roles  

This directory should contain the helloworld and nodejs directories, with the configurations that we created previously in Chapter 3, Treating Your Infrastructure as Code. We are now going to create our Jenkins role with the ansible-galaxy command:

$ ansible-galaxy init jenkins  

We are now going to edit the task definition for this new role by editing the file: jenkins/tasks/main.yml. Open up the file with your favorite text editor.

The goal of our task is to install and start Jenkins. In order to do this, since we are on a Linux-based operating system (AWS Amazon Linux, in our case), we are going to install an RPM package through ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required