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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
zisk0
May 07, 2016
Technology
1
34
Automatización de sistemas con Ansible - OpenSouthCode 16
Automatización de sistemas con Ansible - OpenSouthCode 16
zisk0
May 07, 2016
Tweet
Share
Other Decks in Technology
See All in Technology
AzureでのIaC - Bicep? Terraform? それ早く言ってよ会議
torumakabe
1
600
20260208_第66回 コンピュータビジョン勉強会
keiichiito1978
0
190
OWASP Top 10:2025 リリースと 少しの日本語化にまつわる裏話
okdt
PRO
3
840
SREチームをどう作り、どう育てるか ― Findy横断SREのマネジメント
rvirus0817
0
350
生成AIと余白 〜開発スピードが向上した今、何に向き合う?〜
kakehashi
PRO
0
140
Agile Leadership Summit Keynote 2026
m_seki
1
670
AIエージェントに必要なのはデータではなく文脈だった/ai-agent-context-graph-mybest
jonnojun
1
240
Cosmos World Foundation Model Platform for Physical AI
takmin
0
970
今日から始めるAmazon Bedrock AgentCore
har1101
4
420
ランサムウェア対策としてのpnpm導入のススメ
ishikawa_satoru
0
220
StrandsとNeptuneを使ってナレッジグラフを構築する
yakumo
1
130
コミュニティが変えるキャリアの地平線:コロナ禍新卒入社のエンジニアがAWSコミュニティで見つけた成長の羅針盤
kentosuzuki
0
130
Featured
See All Featured
Marketing to machines
jonoalderson
1
4.6k
Code Review Best Practice
trishagee
74
20k
Embracing the Ebb and Flow
colly
88
5k
Statistics for Hackers
jakevdp
799
230k
Side Projects
sachag
455
43k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
590
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
50k
4 Signs Your Business is Dying
shpigford
187
22k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
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]