0
This is the first in a series of posts about how Ansible and Ansible Tower enable you to manage your infrastructure simply, securely, and efficiently.
When we talk about Tower, we often talk in terms of Control, Knowledge, and Delegation. But what does that mean? In this series of blog posts, we'll describe some of the ways you can use Ansible and Ansible Tower to manage your infrastructure.
CONTROL - THE BASICS
The first step of controlling your infrastructure is to define what it is actually supposed to be. For example, you may want to apply available updates - here's a basic playbook that does that.
---
- hosts: all
gather_facts: true
become_method: sudo
become_user: root
tasks:
- name: Apply any available updates
yum:
name: "*"
state: latest
update_cache: yes
Or you may have more detailed configuration. Here's an example playbook for basic system configuration.This playbook:
-
Configures some users
-
Installs and configures chrony, sudo, and rsyslog remote logging
-
Sets some SELinux parameters
Normally, we’d organize our configuration into Ansible roles for reusability, but for the purpose of this exercise we're just going to use one long playbook.
We'd want to apply this as part of our standard system configuration.
Continue reading