Ansible Automation Technical Deck
Ansible Automation Technical Deck
Ansible Automation Technical Deck
Brad Hinson
Solution Architect
[email protected]
Automation happens when one person meets
a problem they never want to solve again
ACCELERATE INTEGRATE COLLABORATE
WHAT IS ANSIBLE AUTOMATION?
No special coding skills needed Configuration management Uses OpenSSH & WinRM
Get productive quickly Orchestrate the app lifecycle More efficient & more secure
ANSIBLE AUTOMATION WORKS ACROSS TEAMS
Do this...
On these...
BY THE NUMBERS:
SOURCE: "The Total Economic Impact™ Of Red Hat Ansible Tower, a June 2018 commissioned study conducted by Forrester Consulting on behalf of Red
Hat."
redhat.com/en/engage/total-economic-impact-ansible-tower-20180710
LANGUAGE OF AUTOMATION
CROSS PLATFORM HUMAN READABLE PERFECT DESCRIPTION
OF APPLICATION
Agentless support for all major OS Perfectly describe and document every Every change can be made by
variants, physical, virtual, cloud and aspect of your application Playbooks, ensuring everyone is on
network devices. environment. the same page.
tasks:
- name: httpd package is present
yum:
name: httpd
state: latest
USERS
HOSTS
INVENTORY CLI
MODULES PLUGINS
NETWORK
ANSIBLE DEVICES
PLAYBOOK
PUBLIC / PRIVATE
CLOUD PUBLIC / PRIVATE
CLOUD
CMDB
MODULES PLUGINS
NETWORK
ANSIBLE DEVICES
PLAYBOOK
PUBLIC / PRIVATE
CLOUD PUBLIC / PRIVATE
CLOUD
CMDB
ANSIBLE AUTOMATION
MODULESENGINE
ARE “TOOLS IN THE TOOLKIT”
Python, Powershell, or any language
Extend Ansible simplicity to the entire stack
USERS
HOSTS
INVENTORY CLI
MODULES PLUGINS
NETWORK
ANSIBLE DEVICES
PLAYBOOK
USERS
HOSTS
INVENTORY CLI
MODULES PLUGINS
NETWORK
ANSIBLE DEVICES
PLAYBOOK
PUBLIC / PRIVATE
CLOUD PUBLIC / PRIVATE
CLOUD
CMDB
INVENTORY
[web]
ANSIBLE AUTOMATIONwebserver1.example.com
ENGINE
webserver2.example.com
USERS
[db]
dbserver1.example.com
HOSTS
INVENTORY CLI
[switches]
leaf01.internal.com
leaf02.internal.com
MODULES PLUGINS
[firewalls] NETWORK
ANSIBLE DEVICES
checkpoint01.internal.com
PLAYBOOK
[lb]
f5-01.internal.com
PUBLIC / PRIVATE
CLOUD PUBLIC / PRIVATE
CLOUD
CMDB
USERS
HOSTS
INVENTORY CLI
USERS CMDB
ServiceNow, Cobbler, BMC, Custom cmdb
HOSTS
INVENTORY CLI
MODULES PLUGINS
NETWORK
ANSIBLE DEVICES
PLAYBOOK
PUBLIC / PRIVATE
CLOUD PUBLIC / PRIVATE
CLOUD
CMDB
USERS
HOSTS
INVENTORY CLI
MODULES PLUGINS
AUTOMATE EVERYTHING NETWORK
ANSIBLE DEVICES
Red Hat Enterprise Linux, Ubuntu, Debian,
PLAYBOOK
Cisco routers, Arista switches, Juniper routers,
Windows hosts, Checkpoint firewalls and more
GITHUB
github.com/ansible/ansible-examples
SECURITY COMPLIANCE
github.com/ansible/ansible-lockdown
NETWORK AUTOMATION
ansible.com/linklight
github.com/network-automation
AUTOMATION ACROSS
THE ENTERPRISE
WHAT IS ANSIBLE TOWER?
Ansible Tower is a UI and RESTful API allowing
you to scale IT automation, manage complex
deployments and speed productivity.
USERS
TRANSPORT
USE
CASES
PROVISIONING CONFIGURATION APP CONTINUOUS SECURITY & ORCHESTRATIO
MANAGEMENT DEPLOYMENT DELIVERY COMPLIANCE N
FEATURE OVERVIEW:
CONTROL
ANSIBLE TOWER FEATURES: YOUR ANSIBLE DASHBOARD
ANSIBLE TOWER FEATURES: JOB STATUS UPDATE
ANSIBLE TOWER FEATURES: ACTIVITY STREAM
ANSIBLE TOWER FEATURES: MANAGE AND TRACK YOUR INVENTORY
ANSIBLE TOWER FEATURES: SCHEDULE JOBS
ANSIBLE TOWER FEATURES: EXTERNAL LOGGING
ANSIBLE TOWER FEATURES: INTEGRATED NOTIFICATIONS
FEATURE OVERVIEW:
DELEGATION
ANSIBLE TOWER FEATURES: ROLE BASED ACCESS CONTROL
USERS TEAMS
ANSIBLE TOWER FEATURES: ROLE BASED ACCESS CONTROL
36
ANSIBLE TOWER FEATURES: SELF-SERVICE I.T.
ANSIBLE TOWER FEATURES: REMOTE COMMAND EXECUTION
FEATURE OVERVIEW:
SCALE
ANSIBLE TOWER FEATURES: CREATE AUTOMATION
WORKFLOWS
ANSIBLE TOWER FEATURES: SCALE OUT CLUSTERING
USE CASE:
LINUX AUTOMATION
LINUX AUTOMATION
AUTOMATE EVERYTHING
150+ LINUX
Red Hat Enterprise Linux, BSD,
Debian, Ubuntu and many more!
Linux Modules
ONLY REQUIREMENTS:
Python 2 (2.6 or later)
or Python 3 (3.5 or later)
ansible.com/get-started
AUTOMATION FOR EVERYONE: SYSTEM ADMINISTRATORS
---
- name: upgrade rhel packages
hosts: rhel
tasks:
- name: upgrade all packages
yum:
name: '*'
state: latest
AUTOMATION FOR EVERYONE: SYSTEM ADMINISTRATORS
---
- name: reboot rhel hosts
hosts: rhel
tasks:
- name: reboot the machine
reboot:
AUTOMATION FOR EVERYONE: SYSTEM ADMINISTRATORS
---
- name: check services on rhel hosts
hosts: rhel
become: yes
tasks:
- name: ensure nginx is started
service:
name: nginx
state: started
USE CASE:
NETWORK AUTOMATION
ANSIBLE NETWORK AUTOMATION
50 700+ 12*
Network Network Galaxy
Platforms Modules Network Roles
ansible.com/for/networks
galaxy.ansible.com/ansible-network
---
- hosts: cisco
gather_facts: false
connection: network_cli
tasks:
- name: show command for cisco
cli_command:
command: show ip int br
register: result
---
- hosts: juniper
gather_facts: false
connection: network_cli
tasks:
- name: show command for juniper
cli_command:
command: show interfaces terse em1
register: result
WINDOWS AUTOMATION
WINDOWS AUTOMATION
90+ 1,300+
Windows Powershell DSC
Modules resources
ansible.com/windows
AUTOMATION FOR EVERYONE: WINDOWS ADMINS
---
- name: windows playbook
hosts: new_servers
tasks:
- name: ensure local admin account exists
win_user:
name: localadmin
password: '{{ local_admin_password }}'
groups: Administrators
AUTOMATION FOR EVERYONE: WINDOWS ADMINS
---
- name: windows playbook
hosts: windows_machines
tasks:
- name: ensure common tools are installed
win_chocolatey:
name: '{{ item }}'
loop: ['sysinternals', 'googlechrome']
AUTOMATION FOR EVERYONE: WINDOWS ADMINS
---
- name: update and reboot
hosts: windows_servers
tasks:
- name: ensure common OS updates are current
win_updates:
register: update_result
CLOUD AUTOMATION
CLOUD AUTOMATION
800+ 30+
Cloud Cloud Platforms
Modules
ansible.com/cloud
PLAYBOOK EXAMPLE: AWS
---
- name: aws playbook
hosts: localhost
connection: local
tasks:
- name: create AWS VPC ansible-vpc
ec2_vpc_net:
name: "ansible-vpc"
cidr_block: "192.168.0.0/24"
tags:
demo: the demo vpc
register: create_vpc
PLAYBOOK EXAMPLE: AZURE
---
- name: azure playbook
hosts: localhost
connection: local
tasks:
- name: create virtual network
azure_rm_virtualnetwork:
resource_group: myResourceGroup
name: myVnet
address_prefixes: "10.0.0.0/16"
PLAYBOOK EXAMPLE: RED HAT OPENSTACK
---
- name: openstack playbook
hosts: localhost
connection: local
tasks:
- name: launch an instance
os_server:
name: vm1
cloud: mordred
region_name: ams01
image: Red Hat Enterprise Linux 7.4
flavor_ram: 4096
USE CASE:
SECURITY AUTOMATION
WHAT IS IT?
● For detection and triage of suspicious activities, for example, Ansible can automatically enable
logging or increase the log verbosity across enterprise firewalls and IDS to enrich the alerts received
by a SIEM for an easier triage.
● For threat hunting, for example, Ansible can automatically create new IDS rules to investigate the
origin of a firewall rule violation, and whitelist those IP addresses recognized as non threats.
● For incident response, for example, Ansible can automatically validate a threat by verifying an IDS
rule, trigger a remediation from the SIEM solution, and create new enterprise firewall rules to blacklist
the source of an attack.
At launch, Red Hat's Ansible security automation platform provides support for:
tasks:
- name: create access rule
checkpoint_access_rule:
layer: Network
name: "Drop attacker"
position: top
source: attacker
destination: Any
action: Drop
AUTOMATION FOR EVERYONE: SECURITY OPERATIONS
---
- name: checkpoint playbook
hosts: checkpoint
connection: httpapi
tasks:
- name: delete access rule
checkpoint_access_rule:
layer: Network
name: "Drop attacker"
state: absent
NEXT STEPS
ansible.com/tower-trial