Presentation on how to chat with PDF using ChatGPT code interpreter
Introduction to Ansible. Meetup Infracoders
1. Keep InfraCode simple
with Ansible
Introduction and best practices
jmolero@know-center.at José Manuel Molero
@jmlero Infracoders Meetup
Graz, 11.04.2017
1
3. >whoami
oSystems Engineer with 8 years of experience
• Linux environments. Compute clusters. Cloud. Big Data.
Open source software
oFrom Almería (Spain)
o2014 - Wien
• CeMM - Research Center for Molecular Medicine
o2016 - Graz
• Know-Center
• www.know-center.at
@jmlero linkedin.com/in/jmolero github.com/jmlero 3
6. Disclaimer
o Ansible is a great tool
• But is not perfect
• With pros and cons
o And is not the only tool
• Also learning chef and puppet
o (Unfortunately) Ansible Inc doesn’t pay me
• Focus only on the open source side of the project
6
7. >vim Ansible/Readme.md
oAnsible is an open source automation tool for (cloud) provisioning,
application deployment, and configuration management
oAcquired by RedHat in 2015
• https://www.redhat.com/en/about/blog/why-red-hat-acquired-ansible
oThe name "Ansible" references a fictional instantaneous
hyperspace communication system (as featured in Orson Scott
Card's Ender's Game)
7
8. But why Ansible
Simple Powerful Agentless
Radically simple
Easy to read
Easy to start
Designed for multi-tier
developments
Cloud provisioning
Deploy everywhere
from everywhere
Minimal requirements
Agentless architecture
Reliable and secure
8
12. Hello world (v0.1)
>yum install ansible
>ansible localhost -a “yum install httpd –y; systemctl start httpd”
12
13. >help modules
oAnsible comes with hundred of modules
• http://docs.ansible.com/ansible/list_of_all_modules.html
oAvoid using commands
• Modules command and shell as last resort
oModules return reports as JSON
• State, changes, info
• Easier to manage and debug
13
14. Hello world (v0.2)
>yum install ansible
>ansible localhost –m yum -a “state=present name=httpd”
>ansible localhost –m service -a “state=started name=httpd”
14
15. >ansible-playbook -h
o Playbooks express configurations,
deployment and orchestration
o The Playbook format is YAML
o Each Playbook maps a group of hosts to a
set of roles
• Each role is represented by calls to Ansible tasks
15
17. Playbooks_roles
o Playbooks composed by tasks and handlers
o How to organize your playbooks?
• Use roles
o Roles are ways of automatically load certain vars_files, tasks, and
handlers based on a known file structure
17
19. >git commit –a
o If you can make it simple, make it simple
o If something feels complicated, it probably is (back to number 1)
o Use simple, small and focused roles
o Make it readable (for you after 1 year)
o YAML files. Not much documentation required
o Auto-descriptive playbooks, files, variables and tasks
o Always define state (latest, present, absent)
o Native YAML style (but is not mandatory)
o Editor (syntax highlight) (atom, sublime, vscode)
o Version control
19
22. Vielen Dank für Ihre Aufmerksamkeit
Insert: any_question.jpg
jmolero@know-center.at José Manuel Molero
@jmlero Infracoders Meetup
Graz, 11.04.2017
22