GithubHelp home page GithubHelp logo

foobatman / ansible-playbook-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iaugur/ansible-playbook-template

0.0 3.0 0.0 172 KB

A template folder structure for Ansible Playbook projects

License: GNU General Public License v2.0

ansible-playbook-template's Introduction

README

This is a template Ansible playbook structure. It is designed to be the base for new Ansible Playbook projects setting out a folder structure along the lines of Ansible best practices guidelines. Any suggestions for improvements to this use the issue queue or tweet me @ibluebag

Usage

Download this (as opposed to cloning it) to form the base of a new project. Edit as required and update the readme specific to your project. A sample base role is provided that you can use. To create new roles use the following command in terminal within the roles directory.

ansible-galaxy init 'newrolename'

and that will create a role folder structure for you to use.

Ansible best practices can be read about here: http://docs.ansible.com/playbooks_best_practices.html

I strongly recommend purchasing a copy of the Ansible for Devops book by Jeff Geerling https://leanpub.com/ansible-for-devops

Running the playbook

Place details about running your playbook here

ansible-playbook playbook.yml -i hosts -u username -k -v

Notes:

Using the {{ inventory_hostname variable }} vs the {{ ansible_hostname }}

 ________________________________________
/ inventory_hostname variable - This is  \
| the host name we use to connect to the |
\ server.                                /
 ----------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
                
 ____________________________________
/ ansible_hostname - refers to the   \
\ hostname set on the server itself. /
 ------------------------------------
  \
   \
       __
      UooU\.'@@@@@@`.
      \__/(@@@@@@@@@@)
           (@@@@@@@@)
           `YY~~~~YY'
            ||    ||

ansible-playbook-template's People

Contributors

iaugur avatar

Watchers

James Cloos avatar Dhanesh Arole avatar  avatar

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.