Ansible

18
ANSIBLE MARTIN ZLÁMAL SIMPLE, AGENTLESS AND POWERFUL OPEN SOURCE IT AUTOMATION.

Transcript of Ansible

ANSIBLEMARTIN ZLÁMAL

SIMPLE, AGENTLESS AND POWERFULOPEN SOURCE IT AUTOMATION.

ZLML.CZTHINGS YOU ALREADY KNOW.

BUT MAYBE YOU DON'T.

MOTIVATION

I.

Do youRemember?dg/ftp-deployment

UPGRADE.SH

II.

I CANNOT EVENDESCRIBE THE

BEAUTY OFUPGRADE.SH

208 LoC of Bash code7264 chars in total

Somehow...

IT JUST WORKS.

LET'S BE HONESTIT'S NOT PERFECT

BUT IT WORKS

ACTUALLY IT WORKS QUITE WELLBUT IS THIS WHAT YOU REALLY WANT?

BACK TO THEANSIBLE

III.

playboy.yml:

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

$$$$$$$$$$j$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$j$$$$$$$$$$

$$$$$$$$$' ̀ $$$$$$$$$

$$$$$$$' .sS$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$Ss. ̀ $$$$$$$

$$$$$' .$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$' $$$$$$$$$$. ̀ $$$$$

$$$$ S$$$$$$$V ̀ S$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$' $$$$$$$$$$$S $$$$

$$$$ $$$$$$$$$$ ̀ !$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$' $$$$$$$$$$$$$ $$$$

$$$$ $$$$$$$$$s ̀ S$$$$$$$$$$$$$$$$$$$$$$$$$$$$$' $$$$$$$$$$$$$ $$$$

$$$$ $$$$$$$$$$. ̀ S$$$$$$$$$$$$$$$$$$$$$$$$' $$$$$$$$$$$$$ $$$$

$$$$ $$$$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$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

Yes, this isvalid YAML

It usesvalid YAML

- name: ...

strategy: free

hosts:

- amazon-webservers

roles:

- common

- webservers

- application

DEPLOY.YML playbook

play #1

tasks

IDEMPOTENCELAST BUZZWORD BEFORE DEMO

"It has to be noted, anyway, that it is perfectly possible to havea poorly written playbook that is not idempotent."

DEMO TIME

IV.

RESOURCES

V.

Compute Engine Management with Puppet, Chef, Salt, and Ansible

Why we use Terraform and not Chef, Puppet, Ansible,SaltStack, or CloudFormation

15 Things You Should Know About Ansible

INTERESTINGLINKS

docs.ansible.com

DOCUMENTATIONOF COURSE

THANKYOU!

FOLLOW ME IF YOU WANT@mrtnzlml