Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Automatización de sistemas con Ansible - OpenSo...
Search
zisk0
May 07, 2016
Technology
38
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Automatización de sistemas con Ansible - OpenSouthCode 16
Automatización de sistemas con Ansible - OpenSouthCode 16
zisk0
May 07, 2016
Other Decks in Technology
See All in Technology
20260807_第6回_関東kaggler会LT_claw系bot xangiと始める、"寂しくない" kaggle
sugupoko
0
300
Sets in Go
ramalho
1
850
強化学習「理論」入門
enakai00
3
3.6k
え?フロントエンドエンジニアの ワイがインフラも!?
puku0x
1
640
Data Hubグループ 紹介資料
sansan33
PRO
0
3.2k
MIRU 2026 チュートリアル
keisuke198619
0
950
2026-08-15 JAWS-UG 茨城 #16 Secrets ManagerにおけるSecret値の管理(Terraformの場合) / Secrets Manager Secrets
masasuzu
0
120
メルカリのグローバルアプリで挑んだ AlloyDB 運用と課題解決の実践記
hatappi
0
250
変化の早いClaude Codeを 書籍に落とし込む
oikon48
7
1.4k
Bits AI を制するものは Datadog を制す / The player that controls Bits AI, controls Datadog
kaminashi
0
110
制約理論(ToC)入門 2026版
recruitengineers
PRO
8
2.4k
Flutterをカメラで動かしたかった話
sony
1
140
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
500
The untapped power of vector embeddings
frankvandijk
2
1.8k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
470
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
64
56k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
470
The World Runs on Bad Software
bkeepers
PRO
72
12k
So, you think you're a good person
axbom
PRO
2
2.1k
Ethics towards AI in product and experience design
skipperchong
2
340
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
2
3.8k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
We Are The Robots
honzajavorek
0
300
Transcript
Automatización de sistemas con
Whois Francisco López Sysadmin
Sysadmin: the hard way
The hard way ▪ Máquinas con configuración similar ▪ Servidores
“artesanos”
Simple IT Automation
Ansible ▪ Aprovisionamiento ▪ Gestión de la configuración ▪ Orquestación
▪ Despliegue de aplicaciones
Caracteristicas ▪ Simple pero potente Configuración en YAML. Plantillas en
jinja2. ▪ Sin agentes Usa SSH. ▪ Segura ...eehm, bueno, todo lo seguro que sea SSH.
Caracteristicas ▪ Muy bien documentada ▪ Respaldada por Red Hat
¡Es software libre! ▪ Core licenciado como GPLv3 ▪ Modulos
libres ▪ Roles libres
Ansible 101 Conceptos básicos
Inventory 192.168.1.10 opensouthcode.org [webservers] web1.osc.org web2.osc.org [databases:children] databases-masters databases-slaves [databases-masters]
master[1:3].osc.org [databases-slaves] slaves[1:3].osc.org Listado de máquinas
- name: Instalar vim apt: pkg=vim state=present update_cache=yes Task Acción
a realizar Compuesta de módulo y parámetros apt update && apt install vim
Módulos Amazon EC2 Amazon ECS Amazon S3 Command MongoDB Redis
MySQL Postgres IIS Windows Nagios Zabbix RabbitMQ Azure Digital Ocean Docker Google Cloud VMWare Rackspace Linux Apache2 Django JBOSS Jira Git Github Subversion F5 Cisco HAProxy
Play Inventario + tareas - name: Play simple de ejemplo
hosts: webservers tasks: - name: Instalar vim apt: pkg=vim state=present update_cache=yes - name: Instalar tcpdump apt: pkg=tcpdump state=present
Playbook Sucesión de plays Base de ejecución de Ansible
Config management
Variables app_path: “/home/app” monitoring: server-name: nagios server: 11.22.33.44 Se pueden
definir “en cualquier sitio”
inventario host_vars group_vars main.yml web.osc.org.yml --- app_path: “/home/app” servername: “web.osc.org”
monitoring: server-name: “nagios” server: 11.22.33.44
Variables - name: Clonar repositorio git:repo="
[email protected]
:app.git" clone=yes dest={{ app_path }}
Se referencian usando jinja2
Templates Aplicar variables a ficheros de configuración <VirtualHost _default_:{{ http_port
}}> ServerName {{ servername }} ...
Templates Aplicar variables a ficheros de configuración - name: Subir
config apache template: src=00-app.conf.j2 dest=/path/00-app.conf owner=root group=root mode=0644
inventario host_vars group_vars main.yml templates 00-app.conf.j2
Inclusión y roles
Inclusión En un playbook se pueden incluir otros ficheros con
tasks --- - hosts: webservers tasks: - include: dependencies.yml - include: deployment.yml - include: apache.yml
Roles Encapsulación de configuraciones --- - hosts: webservers roles: -
base - django - apache2
inventario host_vars group_vars main.yml templates roles
apache2 files meta roles handlers tasks vars templates
¿Resultados?
None
¡Gracias! ¿Preguntas? @zisk0
[email protected]