Overview
Configuration Management is one of several well-defined infrastructure automation use cases which is ideally suited for Ansible. And “The Ansible Tower ® Difference with Configuration Management” is a solution demo playlist by Red Hat award-winning partner Level Up.
Ad Hoc Commands
Ansible Tower helps you start seeing the many benefits of infrastructure code… without even having to code anything first.
Example command line:
$ ansible all -m command -a "uptime"
Schedule an Ansible Tower demo with Level Up | Register for an upcoming Ansible Tower workshop presented by Level Up | Download a free 60-day eval of Ansible Automation Platform via redhat.com |
Linux Users and Groups
Ansible Tower helps you do routine things like add a Linux group, add a Linux user, add the user to the group, encrypt the user’s password… and then generally get on with the rest of your day.
Example playbook snippet:
- name: "ensure group {{ group }} exists"
group:
name: '{{ group }}'
state: present
tags:
- "Group task"
- name: "ensure user {{ user }} exists"
user:
name: '{{ user }}'
group: '{{ group }}'
password: "{{ passwd | password_hash('sha512') }}"
tags:
- "User task"
no_log: True
Schedule an Ansible Tower demo with Level Up | Register for an upcoming Ansible Tower workshop presented by Level Up | Download a free 60-day eval of Ansible Automation Platform via redhat.com |
Linux Services
With Ansible Tower, managing Linux services doesn’t have to be hard… and it doesn’t have to be something only superusers can actually do.
Example playbook snippet:
- name: Get httpd status
command: "systemctl status {{ linux_svc }}"
register: result
- debug: var=result.stdout_lines
- name: Ensure httpd is restarted
service:
name: "{{ linux_svc }}"
state: restarted
- name: Get httpd status
command: "systemctl status {{ linux_svc }}"
register: result
- debug: var=result.stdout_lines
Schedule an Ansible Tower demo with Level Up | Register for an upcoming Ansible Tower workshop presented by Level Up | Download a free 60-day eval of Ansible Automation Platform via redhat.com |
Bash Scripts
Ansible Tower doesn’t make you “start over” to start automating. You can use modules like “script” to include your legacy sysadmin scripts, in combination with parameters like “create”, to achieve fairly declarative outcomes in your playbooks beginning Day 1.
Example playbook snippet:
- name: Run hello script
script: files/hello.sh
args:
creates: /tmp/hello-script.txt
Schedule an Ansible Tower demo with Level Up | Register for an upcoming Ansible Tower workshop presented by Level Up | Download a free 60-day eval of Ansible Automation Platform via redhat.com |
Files and Directories
Other automation products often make you overthink really basic tasks like working with regular files and creating directory structures. This is yet another way in which Ansible Tower keeps simple things simple.
Example playbook snippet:
- name: Ensure the newapp directory exists
file:
name: "/tmp/newapp"
state: directory
mode: "0755"
Schedule an Ansible Tower demo with Level Up | Register for an upcoming Ansible Tower workshop presented by Level Up | Download a free 60-day eval of Ansible Automation Platform via redhat.com |
File Templates
If you want to copy a file onto a remote node’s file system as-is, Ansible Tower (like almost every other automation product) is here for you. However, if you want to easily create a brand new file from a template, Ansible Tower (UNLIKE almost every other product) is here for you.
Example index.html.j2 file contents:
<html>
<head>
<title>Web server</title>
</head>
<body>
<h1>Hello World!</h1>
<p>Server: {{ my_hostname }}</p>
<body>
</html>
Example playbook snippet:
- name: Ensure the custom index.html file exists
template:
src: templates/index.html.j2
dest: /var/www/html/index.html
mode: "0755"
Schedule an Ansible Tower demo with Level Up | Register for an upcoming Ansible Tower workshop presented by Level Up | Download a free 60-day eval of Ansible Automation Platform via redhat.com |
Software Packages
Let’s face it, installing software packages is a big part of the sysadmin’s job. This doesn’t mean it always happens consistently though, right? Having different distros, OS versions and images can all add up to making package management pretty challenging to do well at production scale.
Ansible Tower can help you ensure that packages are there when you (and your internal customers) need them. And what a difference a loop can make in NOT forcing you to repeat your infrastructure code blocks!
- name: "Ensure packages are installed"
yum:
name: "{{ item }}"
state: latest
loop:
- "httpd"
- "wget"
- "git"
Schedule an Ansible Tower demo with Level Up | Register for an upcoming Ansible Tower workshop presented by Level Up | Download a free 60-day eval of Ansible Automation Platform via redhat.com |
Ansible Facts
Ansible Tower can discover a system’s OS facts… and it can also deal with any local facts that you may need to place on your managed nodes for your organization’s custom application and business logic.
Example playbook snippet:
vars:
myip: "{{ ansible_facts['default_ipv4']['address'] }}"
mydatacenter: " {{ ansible_facts['ansible_local']['acme']['localfacts']['datacenter'] }}"
tasks:
- name: echo ip address to a file
shell: "echo {{ myip }} > /tmp/myipaddress.txt"
Schedule an Ansible Tower demo with Level Up | Register for an upcoming Ansible Tower workshop presented by Level Up | Download a free 60-day eval of Ansible Automation Platform via redhat.com |
Ansible Galaxy
Ansible Tower can help you quickly benefit from the strengths of the open source community via Ansible Galaxy, in terms of creating roles and discovering roles, and even sharing your own roles.
Example command lines:
$ ansible-galaxy init apache-basic
$ ansible-galaxy search flask
Schedule an Ansible Tower demo with Level Up | Register for an upcoming Ansible Tower workshop presented by Level Up | Download a free 60-day eval of Ansible Automation Platform via redhat.com |
Rolling Updates
By default, Ansible works task by task, host by host. Meaning it wants to complete each task on every host before moving onto the next task. And so on. But how can you control Ansible Tower in your environment, if what it wants to do isn’t what you want it to do by default? Great question! This video covers some go-to strategies from serial to async and a few in between. Believe us when we say that not every automation product makes it as easy as Ansible Tower does to turn its entire update sequence 90 or even 180 degrees– without missing a beat!
Schedule an Ansible Tower demo with Level Up | Register for an upcoming Ansible Tower workshop presented by Level Up | Download a free 60-day eval of Ansible Automation Platform via redhat.com |
Provisioning Systems
With Ansible Tower, provisioning systems is its own entire use case and really deserves its own solution demo series (stay tuned!). However, even a quick look at launching cloud instances and working with dynamic inventories in Ansible Tower should hint at both the power and elegance of the Red Hat Ansible Automation Platform when it comes to bootstrapping singleton EC2 instances… or even entire fleets.
Schedule an Ansible Tower demo with Level Up | Register for an upcoming Ansible Tower workshop presented by Level Up | Download a free 60-day eval of Ansible Automation Platform via redhat.com |
Take Your Next Steps with Ansible Tower Today
Level Up is helping customers become cloud native via Red Hat solutions like Ansible Automation Platform. How can we help you on your automation journey?
We’re a Red Hat Advanced Partner, with recognized expertise in Red Hat Ansible Automation Platform; OpenShift Container Platform; and beyond. We’re also proud to say that we’re a Red Hat North American Partner Award Winner: Customer-centric Partner of the Year for State and Local Government (2021).
How we help customers get started with Ansible:
- Workshops: We’ve led over a dozen public Ansible, OpenShift workshops in the last year (customer workshops are also available).
- Proofs of concept: We can support for these ranging from 2 days to 2 months.
- We also offer customized professional services engagements.