Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Oracle Linux Cookbook

You're reading from   Oracle Linux Cookbook Embrace Oracle Linux and master Linux Server Management

Arrow left icon
Product type Paperback
Published in Jan 2024
Publisher Packt
ISBN-13 9781803249285
Length 548 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (3):
Arrow left icon
Erik Benner Erik Benner
Author Profile Icon Erik Benner
Erik Benner
Mr. Jonathan Spindel Mr. Jonathan Spindel
Author Profile Icon Mr. Jonathan Spindel
Mr. Jonathan Spindel
Erik B. Thomsen Erik B. Thomsen
Author Profile Icon Erik B. Thomsen
Erik B. Thomsen
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Chapter 1: Oracle Linux 8 – Get It? Got It? Good! 2. Chapter 2: Installing with and without Automation Magic FREE CHAPTER 3. Chapter 3: Exploring the Various Boot Options and Kernels in Oracle Linux 4. Chapter 4: Creating and Managing Single-Instance Filesystems 5. Chapter 5: Software Management with DNF 6. Chapter 6: Eliminating All the SPOFs! An Exercise in Redundancy 7. Chapter 7: Oracle Linux 8 – Patching Doesn’t Have to Mean Rebooting 8. Chapter 8: DevOps Automation Tools – Terraform, Ansible, Packer, and More 9. Chapter 9: Keeping the Data Safe – Securing a System 10. Chapter 10: Revisiting Modules and AppStreams 11. Chapter 11: Lions, Tigers, and Containers – Oh My! Podman and Friends 12. Chapter 12: Navigating Ansible Waters 13. Chapter 13: Let’s All Go to the Cloud 14. Index 15. Other Books You May Enjoy

Creating portable roles for Ansible

Before attempting to follow this recipe, I recommend having some basic knowledge of Ansible and how to write an Ansible playbook. If you’ve never written an Ansible playbook, I recommend following the Creating a playbook guide from the official Ansible documentation. That can be found here: https://docs.ansible.com/ansible/latest/getting_started/get_started_playbook.html.

In this recipe, you will learn how easy it is to move things around when using Ansible roles. When I first started using Ansible, I wrote my playbooks using tasks only. This to me seemed like a logical approach at the time and was more akin to traditional scripting since everything happened in chronological order.

The problem with writing playbooks in this way is there are no clear dependencies, and the tasks are defined along with the hosts, all in the same file. If you wanted to move things to another playbook, you’d have to be careful to grab the correct dependencies...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image