[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

¡Esta es una revisión vieja del documento!


TRADUCIENDO BY : M3RSY

Slackware Automatización utilizando Ansible

¿Justificación y qué es imposible de todos modos?

Como todos los demás, solía escribir scripts de Perl y bash para automatizar cosas, pero decidí aprender la forma moderna de hacer tales cosas. Miré a Puppet inicialmente pero decidí aprender Ansible en su lugar. Escribí una colección simple de scripts de Perl y libros de juego Ansible para ejecutar en una nueva instalación de Slackware, y en Freenode #slackware se me dijo que debía escribir algo para la wiki, lo que nos pone al día.

So what is Ansible? It's a buzzword-compliant IT automation platform, comparable to Chef, Puppet, Saltstack and whatever else the cool kids are using this week. Ansible's advantages over its competitors is that it's lightweight (it runs over SSH) and it's simple to understand and use. If you're new to Ansible, you might want to take a look at the official docs first.

Bootstrap A Fresh Slackware Install

Let's say you have a brand-new Slack 14.2 install… now what? You have to log in and make sure all the software you want is installed, copy over your .bashrc and whatnot, and generally get your shiny new desktop or server ready to be used. You can use my ansible_slackware_bootstrap scripts and playbooks to automate some of that for you.

There are prerequisites, of course… you need git and ansible installed on a Linux machine (perhaps your Ubuntu desktop, maybe), plus you need to set up SSH keys, so that you can log in as root to the Slackware machine you want to set up. Lastly, you need to list your target machine in the /etc/ansible/hosts inventory file on your desktop. Once that's done, you can begin.

The latest code can be found on GitHub. All you have to do is click the green “Clone or download” button and copy the link provided, get root on your Linux box, and type “git clone $URL”, then cd to the directory it creates and you've got the code.

The README file from GitHub will give you more information, but what you want to do is run slackware-bootstrap-perl-and-python.pl, which will install Perl and Python on your target Slackware machine. After that, run the slackware-installsets.yaml and slackware-admin-setup.yaml playbooks, in that order. You can use my runplaybook.pl script for these if you like. Once you're run the scripts and playbooks, log in to your target Slackware machine and verify that slackpkg, sbopkg and your favorite dotfiles are installed.

 es:howtos:slackware_admin:slackware_automation_using_ansible ()
Esta traducción es más antigua que la página original y podría estar obsoleta. Ver lo que ha cambiado.