Cargando…

Ansible playbook essentials : design automation blueprints using Ansible's playbooks to orchestrate and manage your multitier infrastructure /

If you are a systems or automation engineer who intends to automate common infrastructure tasks, deploy applications, and use orchestration to configure systems in a coordinated manner, then this book is for you. Some understanding of the Linux/Unix command-line interface is expected.

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Shah, Gourav (Autor)
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham, UK : Packt Publishing, 2015.
Colección:Community experience distilled.
Temas:
Acceso en línea:Texto completo (Requiere registro previo con correo institucional)
Tabla de Contenidos:
  • Cover; Copyright; Credits; About the Author; Acknowledgments; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Setting Up the Learning Environment; Chapter 1: Blueprinting Your Infrastructure; Getting introduced to Ansible; Plays; YAML
  • the playbook language; Our first playbook; Creating a host inventory; Patterns; Tasks; Modules; Running the playbook; Review questions; Summary; Chapter 2: Going Modular with Ansible Roles; Understanding roles; Naming roles; The directory layout for roles; Creating a site-wide playbook, nesting, and using include statements
  • Creating the www playbookThe default and custom role paths; Parameterizing the roles; Creating a base role; Refactoring our code
  • creating a base role; Creating an Nginx role; Adding role dependencies; Managing files for Nginx; Automating events and actions with handlers; Adding pre-tasks and post-tasks to playbooks; Running playbooks with roles; Review questions; Summary; Chapter 3: Separating Code and Data
  • Variables, Facts, and Templates; Static content explosion; Separating code and data; Jinja2 templates; The template formation; Facts and variables; Automatic variables
  • facts
  • User-defined variablesWhere to define a variable; How to define a variable; Templating the Nginx configurations; Adding another layer
  • the MySQL role; Creating the scaffolding for the roles with Ansible-Galaxy; Adding metadata to the role; Using variables in tasks and handlers; Creating variables; Creating tasks; Using variables in playbooks; Applying a MySQL role to the DB servers; Variable precedence; The best practices for variable usage; Review questions; Summary; Chapter 4: Bringing In Your Code
  • Custom Commands and Scripts; The command modules; Using the raw module
  • Using the command moduleUsing the shell module; Using the script module; Deploying a WordPress application
  • a hands-on approach; Installing WordPress; Controlling the idempotence of command modules; The registered variables; Extracting WordPress with a shell module; Configuring WordPress; Review questions; Summary; Chapter 5: Controlling Execution Flow
  • Conditionals; The conditional control structure; The when statements; Fact-based selection; Refactoring the MySQL role; Multilevel variable dictionaries; Merging hashes; Configuring the MySQL server selectively
  • Conditional control structure in Jinja2 templatesUpdating the MySQL template; Running a task only once; Executing roles conditionally; Review questions; Summary; Chapter 6: Iterative Control Structures
  • Loops; The omnipotent with statement; Configuring WordPress requisites; The PHP5-FPM role; Defining an array; Looping an array; Creating MySQL databases and user accounts; Creating a hash; Nested hashes; Iterating a hash; Creating Nginx virtual hosts; Defining the PHP site information; Review questions; Summary; Chapter 7: Node Discovery and Clustering; Node discovery with magic variables