From the course: Red Hat Certified Engineer (EX294) Cert Prep: 2 Using Ansible Playbooks

Unlock the full course today

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

Deploying files from templates

Deploying files from templates

From the course: Red Hat Certified Engineer (EX294) Cert Prep: 2 Using Ansible Playbooks

Start my 1-month free trial

Deploying files from templates

- Let's put the lessons of this course in action change to the base role directory by typing in cd space tilde slash Ansible dash files slash roles, slash base, slash tasks, and hit enter. Now load the main dot yml file into an editor, type in vim space main dot yml and hit enter, expand all fold by pressing z, uppercase R, we're going to provision the e-p-e-l repository file and its related GPG key. By managing the yum repo file ourselves. We could mirror the repository on the local server and provision a repository file that would point to our local repository mirror. Go into insert mode by pressing the I key and then add near the top a couple of lines. Now add dash base include underscore tasks, colon, the name of the file of the tasks that we're going to include is going to be centos dash repos dot yml. New Line tab. Now we'll use a when conditional type in when colon space, left parentheses and we'll use some…

Contents