Search icon CANCEL
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
Learning DevOps

You're reading from   Learning DevOps The complete guide to accelerate collaboration with Jenkins, Kubernetes, Terraform and Azure DevOps

Arrow left icon
Product type Paperback
Published in Oct 2019
Publisher Packt
ISBN-13 9781838642730
Length 504 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Mikael Krief Mikael Krief
Author Profile Icon Mikael Krief
Mikael Krief
Arrow right icon
View More author details
Toc

Table of Contents (23) Chapters Close

Preface 1. Section 1: DevOps and Infrastructure as Code FREE CHAPTER
2. DevOps Culture and Practices 3. Provisioning Cloud Infrastructure with Terraform 4. Using Ansible for Configuring IaaS Infrastructure 5. Optimizing Infrastructure Deployment with Packer 6. Section 2: DevOps CI/CD Pipeline
7. Managing Your Source Code with Git 8. Continuous Integration and Continuous Delivery 9. Section 3: Containerized Applications with Docker and Kubernetes
10. Containerizing Your Application with Docker 11. Managing Containers Effectively with Kubernetes 12. Section 4: Testing Your Application
13. Testing APIs with Postman 14. Static Code Analysis with SonarQube 15. Security and Performance Tests 16. Section 5: Taking DevOps Further
17. Security in the DevOps Process with DevSecOps 18. Reducing Deployment Downtime 19. DevOps for Open Source Projects 20. DevOps Best Practices 21. Assessments 22. Other Books You May Enjoy

Protecting data with Ansible Vault

We have seen so far how to use Ansible with an inventory file that contains the list of hosts to configure, and with a playbook that contains the code of the host's configuration actions. But in all IaC tools, it will be necessary to extract some data that is specific to a context or environment inside variables.

In this section, we will look at how to use variables in Ansible and how to protect sensitive data with Ansible Vault.

To illustrate this use and protection of variables, we will complete our example with the installation of a MySQL server on the database server.

Let's begin by looking at the use and utility of variables in Ansible.

Using variables in Ansible for better configuration

...
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 AU $24.99/month. Cancel anytime