Code Monkey home page Code Monkey logo

ansible_demo's Introduction

About

This repo is meant to be used as part of a presentation to introduction people to Ansible. Each branch represent a lesson, and the presenter should iterate through each branch describing each Ansible concept. A minimum of 2 Linux systems is required for demonstrating concepts. Talking points and links to documentation are provided in for each branch.

Branch Names:

00/cleanStart

Clean install directory layout.

01/basicPlaybook

Populate the inventory file and simple playbook.

02/shellAndDebugTasks

Use shell module, how to register(store) output from the shell command into a variable, and use debug module to print the values to the screen.

  • Run a shell command to gather disk usage and store results in a variable. Read:
  • Use the debug module to print out the variable contents in two different ways.

03/shellTaskNoChange

Shell commands will always report a change even if you are just doing a directory listing. Behavior can be overwritten with changed_when property.

04/copyFile

Playbook to copy a file demonstrating rename from src to dest and backup options.

05/copyFileWithItems

Copy more than one file in a task, demonstrating the with_items feature of Ansible

06/copyFileWithItemsAdv

A continuation of standard loops (with_items) using list of hashes.

07/templatesAndVars

Concept of group and host variables in reference to the inventory, and how to use the template module to render templates as files on destination system.

08/groupAndHostVarsLayout

Group/Host variables organizational layouts options.

09/hostVarsOverwirte

Variable overwrite concept and Variable precedence

10/roles

Ansible roles and structure, demonstrating a role with 3 tasks

11/rolesTemplatesVSCopy

Choosing template over copy and how comment filter in templates makes it a better choice over copy

12/rolesTemplatesJinja2Syntax

JINJA2 syntax in combination with group_vars, demonstrating for loop and if conditional

13/tags

Run specific parts of a playbook with tags.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.