+ All Categories
Home > Technology > Ansible Introduction

Ansible Introduction

Date post: 13-Apr-2017
Category:
Upload: jonathan-frappier
View: 127 times
Download: 1 times
Share this document with a friend
23
Ansible Configuration Management Made Easy
Transcript
Page 1: Ansible Introduction

AnsibleConfiguration Management Made Easy

Page 2: Ansible Introduction

What is Ansible

“App deployment, configuration management and orchestration - all from one system.”

Page 3: Ansible Introduction

Who is the competition?

Page 4: Ansible Introduction

Which one do I chose?

…It depends…

• What are you trying to do?

• What Operating Systems are you managing?

• What other systems do you work with?

• What languages is your team familiar with?

Page 5: Ansible Introduction

Nail…Meet Hammer

Page 6: Ansible Introduction

Using Puppet…

Example – Install the Sysdig Monitoring Agent

Page 7: Ansible Introduction

Using Puppet…(Con’t)

Example – Install the Sysdig Monitoring Agent

(Anyone remember what this file was called?

Page 8: Ansible Introduction

Using Puppet…(Again…)

Example – Install the Sysdig Monitoring Agent

Using Puppet (Continued…)

Page 9: Ansible Introduction

Using Puppet…(FFS…)

Example – Install the Sysdig Monitoring Agent

Did you remember to install these guys?

Page 10: Ansible Introduction

Simple

Using Ansible!

Example – Install the Sysdig Monitoring Agent

Page 11: Ansible Introduction

Agentless

Ansible connects to hosts using SSH

SSH Key – List of all hosts for Ansible to manage

Password – append --ask-pass and --ask-become-pass

Page 12: Ansible Introduction

Files

Ansible can be useful using just two files (though we can do a lot more as well)

Inventory (hosts file) – List of all hosts for Ansible to manage

Playbook – List of commands processed in order (no guessing) for the specified hosts

Page 13: Ansible Introduction

Availability

All you need is love… no wait wrong presentation

All you need is GitHub (or a backup of your playbooks and hosts file)

Page 14: Ansible Introduction

Inventory

Located in /etc/ansible/hosts - can be as simple as you want/need it to be

Page 15: Ansible Introduction

Hosts fileAwesome as you wanna be…

Page 16: Ansible Introduction

Handy options

--ask-pass – prompts for a password to connect to the specified host(s), used when not using SSH keys

--ask-become-pass – Use when sudo is required to run the playbook/command

--check – Checks the playbook to see if it will work, but doesn’t execute on the remote host (or –C)

--module-name – specific the module you want to run for ad-hoc commands (or –m)

--module-path – path to the module if required (or –M)

--tree – path to log output (or –t)

Page 17: Ansible Introduction

A few hosts pre-reqs

Python – at least 2.5, no issue with modern distributions

SSH – SSH/Port 22 must be open from the control machine to the host (agentless and all)

SSH Keys – Ensure user account used by Ansible has SSH keys added from control-machine to all hosts

User account – Account used by Ansible has correct permissions on hosts (e.g. sudo for installs)

Page 18: Ansible Introduction

Demo Time!

Page 19: Ansible Introduction

MOAR EXAMPLES

Page 20: Ansible Introduction

MOAR EXAMPLES

Page 21: Ansible Introduction

Advanced Stuff and more resource

Roles – Separates vars, files, handlers

• Allows you to assign vars via inventory

Ansible Galaxy – Repository of community contributed roles

Ansible Tower – Commercial version, free for up to 10 nodes

• Scheduling

• RBAC

Page 22: Ansible Introduction

Q&A

Q: How do I do this crazy silly thing you likely do not know about?

A: https://docs.ansible.com

Q: What about this random version of linux that some guy wrote out of his basement?

A: https://docs.ansible.com

Q: What is better, Star Wars or Star Strek

A:

Thank you

Page 23: Ansible Introduction

Ansible

Don't think you can. Know you can!


Recommended