From 12fd193450a4363ccd46fd242bc2392290a3df04 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 8 Mar 2012 13:36:47 -0500 Subject: [PATCH 01/11] Docs updates --- ansible | 2 +- build-site.py | 8 +- html/YAMLScripts.html | 32 ++-- html/_sources/YAMLScripts.txt | 7 +- html/_sources/api.txt | 78 ++++------ html/_sources/communicate.txt | 58 +------- html/_sources/examples.txt | 110 +++++++------- html/_sources/gettingstarted.txt | 139 ++++++++++------- html/_sources/index.txt | 114 ++++---------- html/_sources/man.txt | 11 +- html/_sources/modules.txt | 246 ++++++++++++++++++++++++------- html/_sources/patterns.txt | 110 ++++++++------ html/_sources/playbooks.txt | 159 ++++++++++++++------ html/_static/basic.css | 9 +- html/_static/searchtools.js | 13 +- html/api.html | 90 +++++------ html/communicate.html | 68 ++------- html/examples.html | 116 +++++++-------- html/genindex.html | 6 +- html/gettingstarted.html | 159 ++++++++++++-------- html/index.html | 185 ++++++++++------------- html/man.html | 30 +--- html/man/ansible-modules.5.html | 2 +- html/man/ansible-playbook.5.html | 2 +- html/man/ansible.1.html | 2 +- html/modules.html | 222 ++++++++++++++++++++-------- html/patterns.html | 142 ++++++++++-------- html/playbooks.html | 194 +++++++++++++++++------- html/search.html | 4 +- html/searchindex.js | 2 +- rst/YAMLScripts.rst | 7 +- rst/api.rst | 78 ++++------ rst/communicate.rst | 58 +------- rst/examples.rst | 110 +++++++------- rst/gettingstarted.rst | 139 ++++++++++------- rst/index.rst | 114 ++++---------- rst/man.rst | 11 +- rst/modules.rst | 246 ++++++++++++++++++++++++------- rst/patterns.rst | 110 ++++++++------ rst/playbooks.rst | 159 ++++++++++++++------ 40 files changed, 1857 insertions(+), 1495 deletions(-) diff --git a/ansible b/ansible index 8e20ed3714..96d39a0dff 160000 --- a/ansible +++ b/ansible @@ -1 +1 @@ -Subproject commit 8e20ed3714b7a43279ecfd38a7812b28e1533f03 +Subproject commit 96d39a0dff9ccba4074479ca42eac0068733b803 diff --git a/build-site.py b/build-site.py index 37ae50a983..5570818ccf 100755 --- a/build-site.py +++ b/build-site.py @@ -20,6 +20,7 @@ __docformat__ = 'restructuredtext' import os import sys +import traceback from sphinx.application import Sphinx from os import path @@ -68,12 +69,7 @@ class SphinxBuilder(object): # print "Run 'make htmlman' to recreate the problem." #print "Your docs are now in %s" % outdir except ImportError, ie: - print >> sys.stderr, "You don't seem to have the following which" - print >> sys.stderr, "are required to make documentation:" - print >> sys.stderr, "\tsphinx.application.Sphinx" - print >> sys.stderr, "This is usually available from the python-sphinx package" - print >> sys.stderr, "=== Error message received while attempting to build===" - print >> sys.stderr, ie + traceback.print_exc() except Exception, ex: print >> sys.stderr, "FAIL! exiting ... (%s)" % ex diff --git a/html/YAMLScripts.html b/html/YAMLScripts.html index 1d0df43280..f252982648 100644 --- a/html/YAMLScripts.html +++ b/html/YAMLScripts.html @@ -23,8 +23,8 @@ - - + + \ No newline at end of file diff --git a/html/communicate.html b/html/communicate.html index c626002521..7ad2a0c23a 100644 --- a/html/communicate.html +++ b/html/communicate.html @@ -7,7 +7,7 @@ - Communicate — Ansible v0.0.1 documentation + Communicate and Get Involved — Ansible v0.0.1 documentation - + @@ -34,7 +34,7 @@ index
  • - next |
  • Getting Started

    -

    How to ansible

    +

    How to download ansible and get started using it

    See also

    +
    Examples
    +
    Examples of basic commands
    YAML Scripts
    -
    Complete documentation of the YAML syntax ansible understands.
    +
    Complete documentation of the YAML syntax ansible understands for playbooks.
    +
    Playbooks
    +
    Learning ansible’s configuration management language
    +
    Ansible Modules
    +
    Learn about modules that ship with ansible
    -
    -

    What you need

    -

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim -placerat nibh, non feugiat risus varius vitae. Donec eu libero -lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in -magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum, -dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus -mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae -luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis -ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa, -rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies -tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis -egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna -sem. Donec arcu felis, faucibus et malesuada non, blandit vitae -metus. Fusce nec sapien dolor.

    -

    Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at, -pretium quis sapien. Duis felis metus, sodales sit amet gravida in, -pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin -eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at, -suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada -molestie, nisi nunc placerat libero, vel vulputate elit tellus et -augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat -egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan -lorem eget leo dictum viverra.

    -

    Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean -ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar -quam. Suspendisse nec massa vel augue laoreet ultricies in convallis -dolor. Mauris sodales porta enim, non ultricies dolor luctus -in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate, -erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra -arcu sem a ante. Praesent nec metus vestibulum augue eleifend -suscipit. In feugiat, sem nec dignissim consequat, velit tortor -scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh -turpis. Proin ac nisi ligula, a pretium augue.

    -

    In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed -ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl, -eget lobortis mi magna sed metus. Cras justo est, tempus quis -adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et -luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae -nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc -sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet -lacus. Maecenas interdum viverra laoreet. Quisque elementum -sollicitudin ullamcorper.

    -

    Pellentesque mauris sem, malesuada at lobortis in, porta eget -urna. Duis aliquet quam eget risus elementum quis auctor ligula -gravida. Phasellus et ullamcorper libero. Nam elementum ultricies -tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat -tristique lobortis. Suspendisse est enim, tristique eu convallis id, -rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin -hendrerit mi tincidunt dui fermentum placerat.

    +
    +

    Requirements

    +

    Requirements are extremely minimal.

    +

    If you are running python 2.6 on the overlord machine, you will +need:

    +
      +
    • paramiko
    • +
    • PyYAML
    • +
    • python-jinja2 (for playbooks)
    • +
    +

    If you are running less than Python 2.6, you will also need:

    + +

    On the managed nodes, to use templating, you will need:

    +
      +
    • python-jinja2 (you can install this with ansible)
    • +
    +
    +
    +

    Developer Requirements

    +

    For developers, you may wish to have:

    +
      +
    • asciidoc (for building manpage documentation)
    • +
    • python-sphinx (for building content for ansible.github.com)
    • +
    +
    +
    +

    Getting Ansible

    +

    Tagged releases are available as tar.gz files from the Ansible github +project page:

    + +

    You can also clone the git repository yourself and install Ansible in +one of two ways:

    +
    +

    Python Distutils

    +

    You can also install Ansible using Python Distutils:

    +
    $ git clone git://github.com/ansible/ansible.git
    +$ cd ./ansible
    +$ sudo make install
    +
    +
    +
    +

    Via RPM

    +

    In the near future, pre-built RPMs will be available through your distribution. Until that time you +can use the make rpm command:

    +
    $ git clone git://github.com/ansible/ansible.git
    +$ cd ./ansible
    +$ make rpm
    +$ sudo rpm -Uvh ~/rpmbuild/RPMS/noarch/ansible-1.0-1.noarch.rpm
    +
    +
    +
    +
    +

    Your first commands

    +

    Edit /etc/ansible/hosts and put one or more remote systems in it, for which you have your SSH +key in authorized_keys:

    +
    192.168.1.50
    +aserver.example.org
    +bserver.example.org
    +
    +

    Now try this:

    +
    +
    ssh-agent bash +ssh-add ~/.ssh/id_rsa +ansible all -m ping
    +

    Congratulations. You’ve just contacted your nodes with Ansible. It’s now time to read some +of the more real-world examples.

    @@ -120,7 +150,14 @@ hendrerit mi tincidunt dui fermentum placerat.

    Table Of Contents

    @@ -129,8 +166,8 @@ hendrerit mi tincidunt dui fermentum placerat.

    Ansible

    Next topic

    -

    YAML Scripts

    +

    Patterns

    This Page

    @@ -46,25 +46,13 @@

    Man Pages

    -

    Ansile ships with a handfull of manpages to help you on your journey.

    +

    Ansible’s manpage lists available command line options.

    ansible(1)

    -
    -

    ansible-modules(5)

    - -
    -
    -

    ansible-playbook(5)

    - -
    @@ -77,15 +65,13 @@

    Previous topic

    Communicate

    + title="previous chapter">Communicate and Get Involved

    This Page

    \ No newline at end of file diff --git a/html/man/ansible-modules.5.html b/html/man/ansible-modules.5.html index 1a16ddec0e..e9f992b290 100644 --- a/html/man/ansible-modules.5.html +++ b/html/man/ansible-modules.5.html @@ -1,6 +1,6 @@ -ansible-modules

    Name

    ansible-modules — stock modules shipped with ansible

    DESCRIPTION

    Ansible ships with a number of modules that can be executed directly on remote hosts or through +ansible-modules

    Name

    ansible-modules — stock modules shipped with ansible

    DESCRIPTION

    Ansible ships with a number of modules that can be executed directly on remote hosts or through ansible playbooks.

    IDEMPOTENCE

    Most modules other than command are idempotent, meaning they will seek to avoid changes unless a change needs to be made. When using ansible playbooks, these modules can trigger change events, as described in ansible-playbooks(5).

    Unless otherwise noted, all modules support change hooks.

    command

    The command module takes the command name followed by a list of arguments, space delimited. diff --git a/html/man/ansible-playbook.5.html b/html/man/ansible-playbook.5.html index 8c4b8c1d35..ad1d534af3 100644 --- a/html/man/ansible-playbook.5.html +++ b/html/man/ansible-playbook.5.html @@ -1,6 +1,6 @@ -ansible-modules

    Name

    ansible-playbook — format and function of an ansible playbook file

    DESCRIPTION

    Ansible ships with ansible-playbook, a tool for running playbooks. +ansible-modules

    Name

    ansible-playbook — format and function of an ansible playbook file

    DESCRIPTION

    Ansible ships with ansible-playbook, a tool for running playbooks. Playbooks can represent frequent tasks, desired system configurations, or deployment processes.

    FORMAT

    Playbooks are written in YAML.

    EXAMPLE

    See:

    • https://github.com/mpdehaan/ansible/blob/master/examples/playbook.yml diff --git a/html/man/ansible.1.html b/html/man/ansible.1.html index c2c76bfacc..ba76d1444f 100644 --- a/html/man/ansible.1.html +++ b/html/man/ansible.1.html @@ -1,6 +1,6 @@ -ansible

      Name

      ansible — run a command somewhere else

      Synopsis

      ansible <host-pattern> [-f forks] [-m module_name] [-a args]

      DESCRIPTION

      Ansible is an extra-simple tool/framework/API for doing 'remote things' over +ansible

      Name

      ansible — run a command somewhere else

      Synopsis

      ansible <host-pattern> [-f forks] [-m module_name] [-a args]

      DESCRIPTION

      Ansible is an extra-simple tool/framework/API for doing 'remote things' over SSH.

      ARGUMENTS

      host-pattern
      diff --git a/html/modules.html b/html/modules.html index 88a446519e..7c2a156901 100644 --- a/html/modules.html +++ b/html/modules.html @@ -7,7 +7,7 @@ - Modules — Ansible v0.0.1 documentation + Ansible Modules — Ansible v0.0.1 documentation - + @@ -34,7 +34,7 @@ index
    • - next |
    • -
      -

      Modules

      -

      Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim -placerat nibh, non feugiat risus varius vitae. Donec eu libero -lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in -magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum, -dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus -mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae -luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis -ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa, -rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies -tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis -egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna -sem. Donec arcu felis, faucibus et malesuada non, blandit vitae -metus. Fusce nec sapien dolor.

      -

      Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at, -pretium quis sapien. Duis felis metus, sodales sit amet gravida in, -pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin -eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at, -suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada -molestie, nisi nunc placerat libero, vel vulputate elit tellus et -augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat -egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan -lorem eget leo dictum viverra.

      -

      Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean -ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar -quam. Suspendisse nec massa vel augue laoreet ultricies in convallis -dolor. Mauris sodales porta enim, non ultricies dolor luctus -in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate, -erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra -arcu sem a ante. Praesent nec metus vestibulum augue eleifend -suscipit. In feugiat, sem nec dignissim consequat, velit tortor -scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh -turpis. Proin ac nisi ligula, a pretium augue.

      -

      In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed -ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl, -eget lobortis mi magna sed metus. Cras justo est, tempus quis -adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et -luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae -nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc -sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet -lacus. Maecenas interdum viverra laoreet. Quisque elementum -sollicitudin ullamcorper.

      -

      Pellentesque mauris sem, malesuada at lobortis in, porta eget -urna. Duis aliquet quam eget risus elementum quis auctor ligula -gravida. Phasellus et ullamcorper libero. Nam elementum ultricies -tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat -tristique lobortis. Suspendisse est enim, tristique eu convallis id, -rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin -hendrerit mi tincidunt dui fermentum placerat.

      +
      +

      Ansible Modules

      +
      +

      See also

      +
      +
      Examples
      +
      Examples of using modules in /usr/bin/ansible
      +
      Playbooks
      +
      Examples of using modules with /usr/bin/ansible-playbook
      +
      API
      +
      Examples of using modules with the Python API
      +
      +
      +
      +

      About Modules

      +

      Ansible ships with a number of modules that can be executed directly on remote hosts or through +ansible playbooks.

      +
      +
      +

      Idempotence

      +

      Most modules other than command are idempotent, meaning they will seek to avoid changes +unless a change needs to be made. When using ansible playbooks, these modules can +trigger change events. Unless otherwise noted, all modules support change hooks.

      +
      +
      +

      command

      +

      The command module takes the command name followed by a list of arguments, space delimited. +This is the only module that does not use key=value style parameters.

      +

      Example usage:

      +
      /sbin/shutdown -t now
      +
      +

      This module does not support change hooks and returns the return code from the program as well as timing information about how long the command was running for.

      +
      +
      +

      copy

      +

      The copy module moves a file on the local box to remote locations.

      +

      src:

      +

      Local absolute path to a file to copy to the remote server

      +

      dest:

      +

      Remote absolute path where the file should end up

      +

      This module also returns md5sum information about the resultant file.

      +
      +
      +

      facter

      +

      Runs the discovery program ‘facter’ on the remote system, returning +JSON data that can be useful for inventory purposes.

      +

      Requires that ‘facter’ and ‘ruby-json’ be installed on the remote end.

      +

      This module is informative only - it takes no parameters & does not support change hooks, +nor does it make any changes on the system.

      +
      +
      +

      git

      +

      Deploys software from git checkouts.

      +

      repo:

      +

      git or http protocol address of the repo to checkout

      +

      dest:

      +

      where to check it out, an absolute directory path

      +

      version:

      +

      what version to check out – either the git SHA, the literal string ‘HEAD’, or a tag name

      +
      +
      +

      ohai

      +

      Similar to the facter module, this returns JSON inventory data. Ohai +data is a bit more verbose and nested than facter.

      +

      Requires that ‘ohai’ be installed on the remote end.

      +

      This module is information only - it takes no parameters & does not +support change hooks, nor does it make any changes on the system.

      +
      +
      +

      ping

      +

      A trivial test module, this module always returns the integer ‘1’ on +successful contact.

      +

      This module does not support change hooks.

      +

      This module is informative only - it takes no parameters & does not +support change hooks, nor does it make any changes on the system.

      +
      +
      +

      service

      +

      Controls services on remote machines.

      +

      state

      +

      Values are ‘started’, ‘stopped’, or ‘restarted’. Started/stopped +are idempotent actions that will not run commands unless neccessary. +‘restarted’ will always bounce the service

      +

      name

      +

      The name of the service

      +
      +
      +

      setup

      +

      Writes a JSON file containing key/value data, for use in templating. +Call this once before using the template modules. Playbooks will +execute this module automatically as the first step in each play.

      +

      If facter or ohai are installed, variables from these programs will also +be snapshotted into the JSON file for usage in templating. These variables +are prefixed with ‘facter‘ and ‘ohai” so it’s easy to tell their source.

      +

      metadata

      +

      Optionally overrides the default JSON file location of /etc/ansible/setup or ~/ansible/setup +depending on what remote user has been specified.

      +

      If used, also supply the metadata parameter to the template module.

      +

      anything

      +

      any other parameters can be named basically anything, and set a key=value +pair in the JSON file for use in templating.

      +
      +
      +

      template

      +

      Templates a file out to a remote server. Call the setup module prior to usage.

      +

      src

      +

      path of a Jinja2 formatted template on the local server

      +

      dest

      +

      location to render the template on the remote server

      +

      metadata

      +

      location of a JSON file to use to supply template data. Default is /etc/ansible/setup +which is the same as the default for the setup module. Change if running as a non-root +remote user who does not have permissions on /etc/ansible.

      +

      This module also returns md5sum information about the resultant file.

      +
      +
      +

      user

      +

      This module is in plan.

      +
      +
      +

      yum

      +

      This module is in plan.

      +
      +
      +

      WRITING YOUR OWN MODULES

      +

      To write your own modules, simply follow the convention of those already available in +/usr/share/ansible. Modules must return JSON but can be written in any language. +Modules should return hashes, but hashes can be nested. +To support change hooks, modules should return hashes with a changed: True/False +element at the top level. Modules can also choose to indicate a failure scenario +by returning a top level ‘failure’ element with a True value, and a ‘msg’ element +describing the nature of the failure. Other values are up to the module.

      +
      @@ -106,12 +189,33 @@ hendrerit mi tincidunt dui fermentum placerat.

      \ No newline at end of file diff --git a/html/patterns.html b/html/patterns.html index 2a4d00a68a..b421d63923 100644 --- a/html/patterns.html +++ b/html/patterns.html @@ -23,8 +23,8 @@ - - + +
    • - next |
    • - previous |
    • Ansible v0.0.1 documentation »
    @@ -50,54 +50,64 @@

    Patterns

    -

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim -placerat nibh, non feugiat risus varius vitae. Donec eu libero -lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in -magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum, -dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus -mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae -luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis -ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa, -rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies -tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis -egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna -sem. Donec arcu felis, faucibus et malesuada non, blandit vitae -metus. Fusce nec sapien dolor.

    -

    Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at, -pretium quis sapien. Duis felis metus, sodales sit amet gravida in, -pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin -eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at, -suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada -molestie, nisi nunc placerat libero, vel vulputate elit tellus et -augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat -egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan -lorem eget leo dictum viverra.

    -

    Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean -ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar -quam. Suspendisse nec massa vel augue laoreet ultricies in convallis -dolor. Mauris sodales porta enim, non ultricies dolor luctus -in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate, -erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra -arcu sem a ante. Praesent nec metus vestibulum augue eleifend -suscipit. In feugiat, sem nec dignissim consequat, velit tortor -scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh -turpis. Proin ac nisi ligula, a pretium augue.

    -

    In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed -ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl, -eget lobortis mi magna sed metus. Cras justo est, tempus quis -adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et -luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae -nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc -sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet -lacus. Maecenas interdum viverra laoreet. Quisque elementum -sollicitudin ullamcorper.

    -

    Pellentesque mauris sem, malesuada at lobortis in, porta eget -urna. Duis aliquet quam eget risus elementum quis auctor ligula -gravida. Phasellus et ullamcorper libero. Nam elementum ultricies -tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat -tristique lobortis. Suspendisse est enim, tristique eu convallis id, -rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin -hendrerit mi tincidunt dui fermentum placerat.

    +

    How to select hosts you wish to manage

    +
    +

    See also

    +
    +
    Examples
    +
    Examples of basic commands
    +
    Playbooks
    +
    Learning ansible’s configuration management language
    +
    +
    +

    Ansible works against multiple systems in your infrastructure at the +same time. It does this by selecting portions of systems listed in Ansible’s inventory file, +which defaults to /etc/ansible/hosts, and looks like this:

    +
    mail.example.com
    +
    +[webservers]
    +foo.example.com
    +bar.example.com
    +
    +[dbservers]
    +one.example.com
    +two.example.com
    +three.example.com
    +
    +
    +
    +

    Targetting All Systems

    +

    The pattern ‘all’ or ‘*’ targets all systems in the inventory file.

    +
    +
    +

    Specific Hosts

    +

    It is possible to address specific hosts:

    +
    +
    one.example.com +one.example.com:two.example.com
    +
    +
    +

    Groups

    +

    The following patterns address one or more groups:

    +
    +
    webservers +webservers:dbservers
    +

    There is also a magic group ‘ungrouped’ which selects systems not in a group.

    +
    +
    +

    Wildcards

    +

    Individual hosts, but not groups, can also be referenced using wildcards:

    +
    +
    *.example.com +*.com
    +
    +
    +

    Mixing Things Up

    +

    Specific hosts, wildcards, and groups can all be mixed in the same pattern

    +
    +
    one*.com:dbservers
    +

    It is not possible to target a host not in the inventory file.

    +
    @@ -106,12 +116,24 @@ hendrerit mi tincidunt dui fermentum placerat.

    \ No newline at end of file diff --git a/html/playbooks.html b/html/playbooks.html index be57c48134..5723115666 100644 --- a/html/playbooks.html +++ b/html/playbooks.html @@ -24,7 +24,7 @@ - +
  • - previous |
  • Ansible v0.0.1 documentation »
  • @@ -50,54 +50,118 @@

    Playbooks

    -

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim -placerat nibh, non feugiat risus varius vitae. Donec eu libero -lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in -magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum, -dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus -mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae -luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis -ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa, -rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies -tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis -egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna -sem. Donec arcu felis, faucibus et malesuada non, blandit vitae -metus. Fusce nec sapien dolor.

    -

    Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at, -pretium quis sapien. Duis felis metus, sodales sit amet gravida in, -pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin -eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at, -suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada -molestie, nisi nunc placerat libero, vel vulputate elit tellus et -augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat -egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan -lorem eget leo dictum viverra.

    -

    Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean -ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar -quam. Suspendisse nec massa vel augue laoreet ultricies in convallis -dolor. Mauris sodales porta enim, non ultricies dolor luctus -in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate, -erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra -arcu sem a ante. Praesent nec metus vestibulum augue eleifend -suscipit. In feugiat, sem nec dignissim consequat, velit tortor -scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh -turpis. Proin ac nisi ligula, a pretium augue.

    -

    In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed -ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl, -eget lobortis mi magna sed metus. Cras justo est, tempus quis -adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et -luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae -nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc -sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet -lacus. Maecenas interdum viverra laoreet. Quisque elementum -sollicitudin ullamcorper.

    -

    Pellentesque mauris sem, malesuada at lobortis in, porta eget -urna. Duis aliquet quam eget risus elementum quis auctor ligula -gravida. Phasellus et ullamcorper libero. Nam elementum ultricies -tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat -tristique lobortis. Suspendisse est enim, tristique eu convallis id, -rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin -hendrerit mi tincidunt dui fermentum placerat.

    +
    +

    See also

    +
    +
    YAML Scripts
    +
    Learn about YAML syntax
    +
    Ansible Modules
    +
    Learn about available modules and writing your own
    +
    Patterns
    +
    Learn about how to select hosts
    +
    +
    +

    Playbooks are a completely different way to use ansible and are particularly awesome.

    +

    They are the basis for a really simple configuration management and deployment system, unlike any that already exist, and one that is very well suited to deploying complex multi-machine applications. While you might run the main ansible program for ad-hoc tasks, playbooks are more likely to be kept in source control and used to push out your configuration or assure the configurations of your remote systems are in spec.

    +
    +

    Playbook Example

    +

    Playbooks are expressed in YAML format and have a minimum of syntax. Each playbook is composed +of one or more patterns in a list. By composing a playbook of multiple patterns, it is possible +to orchestrate multi-machine deployments, running certain steps on all machines in +the webservers group, then certain steps on the database server group, then more commands +back on the webservers group, etc:

    +
    ---
    +- hosts: all
    +
    +
    +
    +
    vars:
    +
    http_port: 80 +max_clients: 200
    +
    +

    user: root +tasks: +- include: base.yml somevar=3 othervar=4 +- name: write the apache config file

    +
    +
    action: template src=/srv/httpd.j2 dest=/etc/httpd.conf +notify: +- restart apache
    +
      +
    • name: ensure apache is running +action: service name=httpd state=started
    • +
    +
    +
    handlers:
    +
      +
    • include: handlers.yml
    • +
    +
    +
    +
    +
    +
    +

    Hosts line

    +

    The hosts line is alist of one or more groups or host patterns, seperated by colons.

    +
    +
    webservers:dbservers:*.foo.example.com
    +
    +
    +

    Vars section

    +

    A list of variables that can be used in the ‘action’ lines of the template, or in +included templates. Variables are deferenced like this:

    +
    {{ varname }}
    +
    +

    These variables will be pushed down to the managed systems for use in templating operations.

    +

    Further, if there are discovered variables about the system (say, if facter or ohai were +installed) these variables bubble up back into the playbook, and can be used on each +system just like explicitly set variables. Facter variables are prefixed with ‘facter’ +and Ohai variables are prefixed with ‘ohai’.

    +
    +
    +

    Tasks list

    +

    Tasks are executed in order, one at a time, against all machines matched by the host +pattern, before moving on to the next task. Failed tasks are taken out of the rotation.

    +
    +
    +

    Task name and comment

    +

    Each task has a name (required) and optional comment. This is for informational purposes only

    +
    +
    +

    Task action

    +

    The action line is the name of an ansible module followed by parameters. Usually these +are expressed in key=value form, except for the command module, which looks just like a Linux/Unix +command line. See the module documentation for more info.

    +
    +
    +

    Notify statements

    +

    Nearly all modules are written to be ‘idempotent’ and can signal when they have affected a change +on the remote system. If a notify statement is used, the named handler will be run against +each system where a change was effected, but NOT on systems where no change occurred.

    +
    +
    +

    Handlers

    +

    Handlers are lists of tasks, not really any different from regular tasks, that are referenced +by name.

    +
    +
    +

    Includes

    +

    Not all tasks have to be listed directly in the main file. An include file can contain +a list of tasks (in YAML) as well, optionally passing extra variables into the file. +Variables passed in can be deferenced like this:

    +
    +
    {{ variable }}
    +
    +
    +

    Asynchronous Actions and Polling

    +

    (Information on this feature is pending)

    +
    +
    +

    Executing A Playbook

    +

    To run a playbook:

    +
    ansible-playbook playbook.yml
    +
    +
    @@ -106,9 +170,27 @@ hendrerit mi tincidunt dui fermentum placerat.

    +

    Table Of Contents

    + +

    Previous topic

    -

    Modules

    +

    YAML Scripts

    Next topic

    Examples

    @@ -120,7 +202,7 @@ hendrerit mi tincidunt dui fermentum placerat.

    \ No newline at end of file diff --git a/html/search.html b/html/search.html index 66351de19b..e870053d70 100644 --- a/html/search.html +++ b/html/search.html @@ -90,8 +90,8 @@
    \ No newline at end of file diff --git a/html/searchindex.js b/html/searchindex.js index a0bf1f8f12..418bbdb16d 100644 --- a/html/searchindex.js +++ b/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({objects:{},terms:{all:5,rhoncu:[0,2,3,4,6,7,8],donec:[0,2,3,4,6,7,8],mcollect:1,code:1,lacu:[0,2,3,4,6,7,8],nunc:[0,2,3,4,6,7,8],vel:[0,2,3,4,6,7,8],blindingli:1,sourc:1,everi:5,fals:5,consequat:[0,2,3,4,6,7,8],veri:1,risu:[0,2,3,4,6,7,8],luctu:[0,2,3,4,6,7,8],level:5,list:[5,1],vivamu:[0,2,3,4,6,7,8],item:5,dotnet:5,saltstack:1,phasellu:[0,2,3,4,6,7,8],ornar:[0,2,3,4,6,7,8],second:5,design:1,eleifend:[0,2,3,4,6,7,8],further:1,what:[0,1],diam:[0,2,3,4,6,7,8],abl:1,nec:[0,2,3,4,6,7,8],abbrevi:5,ever:1,elimin:1,eckersberg:5,leo:[0,2,3,4,6,7,8],valu:5,aliquam:[0,2,3,4,6,7,8],box:1,larger:1,adipisc:[0,2,3,4,6,7,8],venenati:[0,2,3,4,6,7,8],permit:5,nulla:[0,2,3,4,6,7,8],iaculi:[0,2,3,4,6,7,8],via:1,regardless:[5,1],tempu:[0,2,3,4,6,7,8],extra:1,modul:[1,2,9],prefer:1,qui:[0,2,3,4,6,7,8],api:[1,7],instal:1,should:5,from:1,tar:1,commun:[1,3],visit:1,two:[5,1],noarch:1,sagitti:[0,2,3,4,6,7,8],until:1,more:1,nequ:[0,2,3,4,6,7,8],sshd:1,easiest:1,must:5,join:1,habitass:[0,2,3,4,6,7,8],setup:1,can:[5,1],ero:[0,2,3,4,6,7,8],root:[5,1],employe:5,yamllint:5,ultric:[0,2,3,4,6,7,8],sudo:1,templat:1,knows_oop:5,tag:1,want:1,nullam:[0,2,3,4,6,7,8],alwai:1,newlin:5,puru:[0,2,3,4,6,7,8],lame:5,capistrano:1,write:5,how:0,etiam:[0,2,3,4,6,7,8],config:1,arcu:[0,2,3,4,6,7,8],clone:1,usabl:1,tristiqu:[0,2,3,4,6,7,8],mai:1,associ:5,grow:1,man:[1,9],github:1,sit:[0,2,3,4,6,7,8],favorit:1,turpi:[0,2,3,4,6,7,8],element:5,issu:1,mango:5,combin:5,talk:1,help:9,over:1,orang:5,becaus:1,elit:[0,2,3,4,5,6,7,8],rpmbuild:1,comma:5,vita:[0,2,3,4,6,7,8],still:1,overlord:1,group:1,fit:1,yaml:[5,0,1],infrastructur:1,mail:1,sapien:[0,2,3,4,6,7,8],non:[0,1,2,3,4,6,7,8],thei:1,food:5,nibh:[0,2,3,4,6,7,8],egesta:[0,2,3,4,6,7,8],jinja2:1,choic:1,multiprocess:1,name:5,simpl:[5,1],viverra:[0,2,3,4,6,7,8],porta:[0,2,3,4,6,7,8],separ:5,each:5,metu:[0,2,3,4,6,7,8],auctor:[0,2,3,4,6,7,8],realli:5,backport:1,connect:1,out:5,network:1,content:1,correct:[5,1],hendrerit:[0,2,3,4,6,7,8],base:1,dictionari:5,morbi:[0,2,3,4,6,7,8],molli:[0,2,3,4,6,7,8],bash:1,care:1,vestibulum:[0,2,3,4,6,7,8],pyyaml:1,indent:5,maecena:[0,2,3,4,6,7,8],thing:1,principl:1,fusc:[0,2,3,4,6,7,8],softwar:1,obviou:1,yourself:1,instruct:1,"long":1,enim:[0,2,3,4,6,7,8],differ:1,script:[5,0,1],data:5,system:1,parallel:1,molesti:[0,2,3,4,6,7,8],john:5,banana:5,option:5,tool:1,specifi:5,quam:[0,2,3,4,6,7,8],accumsan:[0,2,3,4,6,7,8],serv:1,provid:5,sollicitudin:[0,2,3,4,6,7,8],structur:5,charact:5,faucibu:[0,2,3,4,6,7,8],uses_cv:5,pre:1,ani:1,ant:[0,2,3,4,6,7,8],download:1,have:1,need:[5,0,1],tellu:[0,2,3,4,6,7,8],paramiko:1,built:1,also:[5,0,1],client:1,massa:[0,2,3,4,6,7,8],take:1,which:1,pulvinar:[0,2,3,4,6,7,8],begin:5,distribut:1,deploy:1,most:5,why:1,augu:[0,2,3,4,6,7,8],doc:1,lectu:[0,2,3,4,6,7,8],sodal:[0,2,3,4,6,7,8],likes_emac:5,clojur:1,dolor:[0,2,3,4,6,7,8],modularli:1,awesom:1,laoreet:[0,2,3,4,6,7,8],blandit:[0,2,3,4,6,7,8],syntax:[5,0],playbook:[1,4,9],hack:1,involv:1,onli:1,configur:1,releas:1,than:1,consectetur:[0,2,3,4,6,7,8],variu:[0,2,3,4,6,7,8],variou:1,get:[5,0,1],bibendum:[0,2,3,4,6,7,8],ssh:1,malesuada:[0,2,3,4,6,7,8],requir:1,uvh:1,nisi:[0,2,3,4,6,7,8],nisl:[0,2,3,4,6,7,8],remot:1,cra:[0,2,3,4,6,7,8],orci:[0,2,3,4,6,7,8],wrote:1,view:[1,9],suscipit:[0,2,3,4,6,7,8],see:[5,0,1],sed:[0,2,3,4,6,7,8],sem:[0,2,3,4,6,7,8],project:1,manpag:9,pattern:[1,6],someth:1,written:1,ligula:[0,2,3,4,6,7,8],between:5,irc:1,elementum:[0,2,3,4,6,7,8],kei:5,handful:9,aspir:1,job:5,magna:[0,2,3,4,6,7,8],amet:[0,2,3,4,6,7,8],addit:[5,1],plugin:1,tempor:[0,2,3,4,6,7,8],etc:1,placerat:[0,2,3,4,6,7,8],com:1,proin:[0,2,3,4,6,7,8],overview:5,rpm:1,matti:[0,2,3,4,6,7,8],quit:1,pretium:[0,2,3,4,6,7,8],suspendiss:[0,2,3,4,6,7,8],basic:[5,1],feugiat:[0,2,3,4,6,7,8],scelerisqu:[0,2,3,4,6,7,8],rubi:5,vulput:[0,2,3,4,6,7,8],understand:0,pellentesqu:[0,2,3,4,6,7,8],func:1,emploi:5,tortor:[0,2,3,4,6,7,8],"while":1,dictum:[0,2,3,4,6,7,8],erat:[0,2,3,4,6,7,8],sever:5,develop:5,minim:1,make:1,platea:[0,2,3,4,6,7,8],same:5,member:5,python:[5,1],document:[0,1],ansibl:[5,0,9,1],complet:0,pick:1,fruit:5,user:1,extrem:1,distutil:1,squar:5,whole:1,exampl:[1,8],command:1,thi:[5,1],execut:1,less:1,skill:5,languag:[5,1],versu:1,hac:[0,2,3,4,6,7,8],simplejson:1,els:1,build:1,ipsum:[0,2,3,4,6,7,8],tincidunt:[0,2,3,4,6,7,8],know:5,daemon:1,like:5,integ:[0,2,3,4,6,7,8],server:1,"boolean":5,velit:[0,2,3,4,6,7,8],page:[5,1,9],dead:1,est:[0,2,3,4,6,7,8],avoid:1,ultrici:[0,2,3,4,6,7,8],tracker:1,machin:1,run:1,power:1,dui:[0,2,3,4,6,7,8],step:1,repositori:1,"super":1,aenean:[0,2,3,4,6,7,8],about:5,justo:[0,2,3,4,6,7,8],libero:[0,2,3,4,6,7,8],surround:5,manag:1,quisqu:[0,2,3,4,6,7,8],own:1,"final":5,your:[5,1,9],praesent:[0,2,3,4,6,7,8],git:1,fabric:1,wai:[5,1],interdum:[0,2,3,4,6,7,8],fast:1,avail:1,start:[5,0,1],appl:5,porttitor:[0,2,3,4,6,7,8],lot:1,form:5,eget:[0,2,3,4,6,7,8],lint:5,loborti:[0,2,3,4,6,7,8],ullamcorp:[0,2,3,4,6,7,8],line:5,"true":5,freenod:1,strawberri:5,whether:1,wish:1,record:5,problem:1,tasti:5,creat:1,doesn:1,repres:5,ansil:9,exist:1,file:[5,1],mauri:[0,2,3,4,6,7,8],ship:9,urna:[0,2,3,4,6,7,8],conval:[0,2,3,4,6,7,8],googl:1,nam:[0,2,3,4,6,7,8],"default":1,bracket:5,futur:1,dignissim:[0,2,3,4,6,7,8],test:1,you:[5,0,9,1],node:1,dapibu:[0,2,3,4,6,7,8],journei:9,gravida:[0,2,3,4,6,7,8],asciidoc:1,feli:[0,2,3,4,6,7,8],aliquet:[0,2,3,4,6,7,8],lorem:[0,2,3,4,6,7,8],dictumst:[0,2,3,4,6,7,8],rutrum:[0,2,3,4,6,7,8],time:1,far:1,fermentum:[0,2,3,4,6,7,8]},objtypes:{},titles:["Getting Started","Ansible","Modules","Communicate","Playbooks","YAML Scripts","Patterns","API","Examples","Man Pages"],objnames:{},filenames:["gettingstarted","index","modules","communicate","playbooks","YAMLScripts","patterns","api","examples","man"]}) \ No newline at end of file +Search.setIndex({objects:{},terms:{all:[0,1,2,4,5,6,8],code:[1,2,8],donec:[],mcollect:1,prefix:[2,4,8],rhoncu:[],lacu:[],follow:[6,2,4],scp:8,nunc:[],bubbl:4,depend:2,fusc:[],program:[1,2,4],certain:4,vel:[],blindingli:1,spec:4,sourc:[1,2,4,8],everi:5,string:2,fals:[5,2],consequat:[],failur:[7,2],veri:[1,7,4],affect:4,risu:[],luctu:[],magic:6,level:[5,2],id_rsa:[0,8],list:[1,2,3,4,5,6,8,9],vivamu:[],item:5,ansible_librari:[],form:[5,4],dotnet:5,saltstack:1,mpdehaan:[],phasellu:[],ornar:[],natur:2,seper:4,chef:1,second:5,design:1,pass:4,eleifend:[],further:4,even:8,what:2,diam:[],favcolor:8,section:[1,4],abl:[],nec:[],abbrevi:5,version:[2,8],directori:2,ever:1,method:7,metadata:2,tar:0,suscipit:[],hash:2,eckersberg:5,here:[],leo:[],address:[6,2],path:2,sinc:8,valu:[5,2,4],aliquam:[],scelerisqu:[],great:1,purpos:[2,4],larger:[],host:[0,1,2,4,6,7,8],adipisc:[],prior:2,venenati:[],permit:5,action:[1,2,4],nulla:[],implement:7,iaculi:[],via:[0,1],regardless:[5,1],dictionari:5,accumsan:[],extra:4,apach:[4,8],modul:[0,1,2,4,7,8],prefer:[],put:[0,8],unix:4,api:[1,7,2],instal:[8,0,2,4,1],select:[6,4],httpd:4,from:[0,1,2,4,5,8],describ:2,would:8,commun:[1,3],visit:3,two:[5,0,6],noarch:0,dehaan:1,call:2,usr:[2,8],taken:4,sagitti:[],basi:4,checkout:2,until:0,more:[0,6,2,4,1],desir:[],idempot:[1,2,4],dbserver:[6,4],sbin:[2,8],agent:[0,8],particular:1,easiest:1,must:[5,2],none:[],join:3,ibm:[],module_arg:7,habitass:[],setup:[1,2,8],work:[6,8],critic:1,remain:1,tag:[0,2],can:[0,1,2,4,5,6,7,8],learn:[0,6,4,1],ero:[],root:[5,1,2,4],pick:5,employe:5,myapp:8,yamllint:5,ultric:[],process:[1,8],rpath:[],sudo:0,share:2,templat:[8,0,2,4,1],othervar:4,knows_oop:5,minimum:4,want:7,occur:4,nullam:[],alwai:2,multipl:[6,4,8],newlin:5,puru:[],sit:[],capistrano:1,ping:[0,7,2,1],write:[5,1,2,4,8],how:[0,1,2,4,5,6,7],etiam:[],yum:[1,2],simpl:[5,1,7,4,8],updat:8,arcu:[],express:[5,1,7,4],referenc:[6,4],clone:0,usabl:1,tristiqu:[],mai:[5,0],end:2,data:[5,7,2,8],parallel:[1,8],man:[1,9],repo:[2,8],github:[0,3],orchestr:[1,4],read:[5,0],bootstrap:1,favorit:1,turpi:[],element:[5,2],issu:3,inform:[2,4],mango:5,combin:5,asynchron:[1,4],order:4,talk:[],oper:[1,4,8],help:1,over:1,move:[2,4],orang:5,becaus:[],elit:5,rpmbuild:0,comma:5,vita:[],still:[],paramet:[2,4],jid:8,overlord:0,group:[1,7,3,4,6],cli:7,fit:[],yaml:[5,0,4,1],pend:[4,8],rapidli:7,infrastructur:[1,6],mail:[6,3],sapien:[],main:4,might:4,easier:[],non:[1,2],"return":[1,7,2],thei:[7,2,4,8],food:5,alist:4,nibh:[],egesta:[],"break":[],framework:[1,7],jinja2:[0,2,8],now:[0,2],nor:2,choic:1,multiprocess:0,name:[5,1,2,4],anyth:2,neccessari:[2,8],config:[1,4],viverra:[],datastructur:7,porta:[],separ:5,each:[5,2,4,8],stock:[],nearli:4,mean:2,metu:[],michael:1,auctor:[],realli:[5,4],contributor:[],backport:0,connect:[],our:5,todo:[],event:2,out:[5,1,2,4],variabl:[2,4,8],"try":0,shown:[],network:3,space:[1,2],reboot:8,content:[0,1],stuff:8,sshd:1,internet:1,correct:[5,1],red:8,state:[2,4,8],hendrerit:[],ntp:8,contain:[2,4],differ:[1,4,8],pub:8,control:[1,2,4,8],base:[1,4],lab:[],tempu:[],qui:[],org:0,molli:[],bash:[0,8],care:[],vestibulum:[],pyyaml:0,indent:5,maecena:[],could:7,fqdn:8,thing:[1,6],place:1,isn:1,principl:[],licens:1,first:[0,2,8,1],origin:[],softwar:[1,2],rang:1,notifi:[1,4,8],obviou:1,onc:2,number:2,yourself:0,hook:2,instruct:0,alreadi:[2,4],puppet:1,fast:1,enim:[],massiv:1,open:1,straight:8,given:8,convent:2,script:[0,1,4,5,7,8],associ:5,top:2,system:[0,1,2,4,6,8],messag:7,grow:[],too:1,statement:[1,4],molesti:[],john:5,banana:5,includ:[1,4],shell:[1,8],option:[5,9,2,4,8],tool:1,copi:[1,2,8],specifi:[5,2,8],quam:[],next:4,"short":1,kept:4,than:[0,2,8],serv:[],liter:2,target:[1,6],provid:5,sollicitudin:[],heavyweight:[],structur:5,charact:5,project:[0,3,8,1],architect:1,were:4,minut:[],uses_cv:5,pre:0,sai:4,runner:7,ani:[1,7,2,4,8],ant:[],download:0,have:[0,2,4,1],need:[5,0,2,8],tellu:[],seek:2,paramiko:0,engin:8,built:0,contact:[0,7,2],note:[2,8],also:[0,1,2,4,5,6,8],client:1,massa:[],build:[0,7],indic:2,environ:[],divers:1,pulvinar:[],begin:5,sure:[],unless:2,distribut:[0,1],deploy:[1,4],track:8,who:2,discov:4,most:[5,2],plai:2,regular:4,plan:2,deploi:[1,2,4,8],pair:2,why:1,porttitor:[],simplic:[],doc:1,later:8,cover:8,doe:[1,2,6],sodal:[],bracket:5,snapshot:2,clojur:[],wildcard:[1,6],dolor:[],someth:[1,8],awesom:[1,4],laoreet:[],blandit:[],verbos:2,syntax:[5,0,4],bring:[],directli:[2,4,8],raleigh:1,particularli:4,playbook:[0,1,2,4,5,6,7,8],permiss:2,hack:1,radic:1,pki:[],trivial:2,varnam:4,involv:[1,3],absolut:2,onli:[2,4],explicitli:4,locat:2,just:[8,0,4,1],pretti:7,configur:[5,0,6,4,1],releas:0,written:[1,2,4,8],should:[5,2],consectetur:[],somevar:4,congratul:0,variu:[],local:2,yml:4,long_running_oper:8,contribut:1,variou:[],get:[5,0,3,8,1],financ:1,stop:2,mission:1,bibendum:[],ssl:[],ssh:[0,8],malesuada:[],requir:[0,2,4,1],uvh:0,nisi:[],bar:6,lame:5,nisl:[],remot:[0,2,4,8],cra:[],orci:[],through:[0,2,1],where:[1,2,4],wrote:[],view:[3,9],set:[2,4],creator:[],elimin:[],see:[0,1,2,4,5,6,8],sed:[],result:[7,2],fail:4,sem:[],extend:1,ntp_server:8,faucibu:[],statu:8,kei:[5,0,2,4],databas:4,modularli:[],discoveri:2,restart:[2,4,8],behind:[],won:8,languag:[5,0,6,2,1],between:5,"import":7,irc:3,altern:8,elementum:[],manpag:[0,9],handful:[],aspir:[],style:2,job:[5,8],aserv:0,magna:[],webapp:8,amet:[],addit:[5,1],delimit:2,plugin:[],goal:1,against:[1,4,6],tempor:[],etc:[0,1,2,4,6,8],befor:[2,4],mani:8,placerat:[],com:[0,7,4,6],proin:[],sha:2,assur:4,simpli:2,author:1,overview:5,format:[2,4,8],inspir:[],colon:4,shutdown:2,linux:[1,4],poll:[1,4,8],rpm:[0,1],matti:[],dui:[],pretium:[],multiplay:1,morbi:[],three:6,been:[1,2],json:[1,7,2],much:1,basic:[5,0,6,2,1],ungroup:6,feugiat:[],quickli:[5,1],box:[1,2],fire:1,rubi:[5,2,8],vulput:[],argument:2,understand:0,pellentesqu:[],func:1,atlanta:8,job_statu:8,those:[5,2],emploi:5,authorized_kei:0,multi:[1,4],tortor:[],look:[6,4,8],nequ:[],hoc:[1,4],servic:[1,2,4],md5sum:2,batch:[],"while":4,overrid:2,ipsum:[],cobbler:1,real:0,motd:8,max_client:4,them:8,erat:[],conf:[4,8],module_nam:7,ship:[0,2],sever:5,http_port:4,develop:[5,0,1],inventori:[6,2],minim:0,make:[0,2,8],platea:[],same:[5,6,2,8],member:5,python:[0,1,2,5,7,8],complex:[1,4],success:2,fedora:[],document:[0,7,4],ansibl:[0,1,2,3,4,5,6,7,8,9],complet:[0,4],finish:[],http:2,webserv:[6,4,8],nest:2,painless:1,effect:4,dai:[],fruit:5,user:[1,2,4],ownership:[],extrem:0,php:8,distutil:[0,1],chang:[2,4,8],squar:5,exceedingli:[],task:[1,4,8],off:1,scenario:2,whole:[],well:[2,4],spent:[],exampl:[0,1,2,4,5,6,7,8],command:[0,1,2,4,6,8,9],thi:[0,1,2,4,5,6,8],choos:2,usual:4,comment:[1,4],protocol:2,execut:[1,2,4],less:[0,1],when:[2,4,8],skill:5,simultan:8,ligula:[],previous:[],web:[7,8],versu:1,easi:2,mix:[1,6],trigger:2,hac:[],except:4,littl:1,add:[0,8],other:[1,2,8],els:1,unlik:4,hat:[],match:4,take:2,bin:[2,8],applic:[7,4],which:[0,1,2,4,5,6],ohai:[1,2,4,8],dest:[2,4,8],tincidunt:[],dark:7,game:1,know:5,background:[1,8],world:0,bit:2,daemon:1,like:[5,6,4,8],specif:[1,7,8,6],signal:4,manual:[],integ:2,server:[1,2,4,8],edit:0,"boolean":5,either:2,velit:[],popular:1,async:[],page:[5,0,9,3,1],deal:[],suppli:2,some:0,back:4,dead:1,tumblr:[],home:[],librari:[],tmp:8,render:2,avoid:2,though:1,ultrici:[],per:7,tracker:3,unit:[],pattern:[1,7,4,6],foo:[6,4,8],complic:1,machin:[0,2,4,8],core:1,run:[0,7,2,4,8],power:[1,7],quit:[],lose:8,usag:[2,8],asciidoc:0,web2:7,step:[2,4],web1:7,repositori:0,"super":1,aenean:[],simpler:8,comparison:1,about:[5,0,2,4,1],gplv3:1,justo:[],libero:[],surround:5,manag:[5,0,6,4,1],srv:[4,8],quisqu:[],industri:1,own:[1,2,4],"final":5,bounc:2,automat:2,compos:4,down:4,ensur:4,perl:8,bserver:0,your:[0,1,2,4,5,6,8],praesent:[],git:[0,2,8,1],type:7,fabric:1,wai:[5,0,4,8],interdum:[],transfer:[1,8],dictum:[],support:[2,8],rotat:4,"long":[1,2,8],avail:[0,9,2,4,8],start:[5,0,2,4,1],appl:5,augu:[],lot:[1,8],suit:4,"var":[1,4],individu:6,fork:7,head:[2,8],doctyp:[],simplejson:0,eget:[],handler:[1,4,8],lint:5,msg:2,loborti:[],ullamcorp:[],line:[5,1,9,4,8],"true":[5,2],freenod:3,info:4,strawberri:5,made:[2,8],possibl:[6,4,8],whether:7,wish:[5,0,6],tell:[2,8],planet:1,record:5,below:8,limit:[1,8],suspendiss:[],otherwis:2,problem:[],similar:2,chip:1,facter:[1,2,4,8],curv:1,featur:[1,4],tasti:5,creat:1,lectu:[],doesn:1,repres:5,ansil:[],deferenc:4,file:[0,1,2,4,5,6,8],mauri:[],exist:[1,4],check:[2,8],urna:[],conval:[],googl:3,excel:1,nam:[],"default":[1,2,6],likes_emac:5,futur:0,dignissim:[],test:[0,2],you:[0,1,4,5,6,8],node:[0,1],dapibu:[],journei:[],gravida:[],sequenc:1,devop:1,push:4,est:[],feli:[],aliquet:[],src:[2,4,8],lorem:[],"60k":1,dictumst:[],sphinx:0,rutrum:[],anywher:[],descript:[],portion:6,time:[0,1,2,4,6,8],far:1,serious:[],fermentum:[]},objtypes:{},titles:["Getting Started","Ansible","Ansible Modules","Communicate and Get Involved","Playbooks","YAML Scripts","Patterns","API","Examples","Man Pages"],objnames:{},filenames:["gettingstarted","index","modules","communicate","playbooks","YAMLScripts","patterns","api","examples","man"]}) \ No newline at end of file diff --git a/rst/YAMLScripts.rst b/rst/YAMLScripts.rst index de59528b78..32d76aff14 100644 --- a/rst/YAMLScripts.rst +++ b/rst/YAMLScripts.rst @@ -1,8 +1,9 @@ YAML Scripts ============ -This page provides a basic overview of correct YAML syntax. - +This page provides a basic overview of correct YAML syntax, which is how Ansible +playbooks (our configuration management language) are expressed. +You may also wish to read playbook examples and will quickly pick this up from those. YAML Basics ----------- @@ -74,7 +75,7 @@ Finally, you can combine these data structures:: dotnet: Lame That's all you really need to know about YAML to get started writing -`Ansible` scripts. +`Ansible` playbooks. .. seealso:: diff --git a/rst/api.rst b/rst/api.rst index 1cc8454a67..a3ddea4595 100644 --- a/rst/api.rst +++ b/rst/api.rst @@ -1,55 +1,35 @@ API -=== +``` -Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim -placerat nibh, non feugiat risus varius vitae. Donec eu libero -lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in -magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum, -dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus -mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae -luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis -ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa, -rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies -tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis -egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna -sem. Donec arcu felis, faucibus et malesuada non, blandit vitae -metus. Fusce nec sapien dolor. +The Python API is very powerful, and is how the ansible CLI and ansible-playbook +are implemented. -Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at, -pretium quis sapien. Duis felis metus, sodales sit amet gravida in, -pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin -eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at, -suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada -molestie, nisi nunc placerat libero, vel vulputate elit tellus et -augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat -egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan -lorem eget leo dictum viverra. +It's pretty simple:: -Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean -ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar -quam. Suspendisse nec massa vel augue laoreet ultricies in convallis -dolor. Mauris sodales porta enim, non ultricies dolor luctus -in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate, -erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra -arcu sem a ante. Praesent nec metus vestibulum augue eleifend -suscipit. In feugiat, sem nec dignissim consequat, velit tortor -scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh -turpis. Proin ac nisi ligula, a pretium augue. + import ansible.runner + + runner = ansible.runner.Runner( + module_name='ping', + module_args='', + pattern='web*', + forks=10 + ) + datastructure = runner.run() + +The run method returns results per host, grouped by whether they +could be contacted or not. Return types are module specific, as +expressed in the 'ansible-modules' documentation.:: + + { + "dark" : { + "web1.example.com" : "failure message" + } + "contacted" : { + "web2.example.com" : 1 + } + } + +A module can return any type of JSON data it wants, so Ansible can +be used as a framework to rapidly build powerful applications and scripts. -In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed -ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl, -eget lobortis mi magna sed metus. Cras justo est, tempus quis -adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et -luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae -nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc -sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet -lacus. Maecenas interdum viverra laoreet. Quisque elementum -sollicitudin ullamcorper. -Pellentesque mauris sem, malesuada at lobortis in, porta eget -urna. Duis aliquet quam eget risus elementum quis auctor ligula -gravida. Phasellus et ullamcorper libero. Nam elementum ultricies -tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat -tristique lobortis. Suspendisse est enim, tristique eu convallis id, -rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin -hendrerit mi tincidunt dui fermentum placerat. diff --git a/rst/communicate.rst b/rst/communicate.rst index 8e4d12a3b0..cd718ddcbf 100644 --- a/rst/communicate.rst +++ b/rst/communicate.rst @@ -1,55 +1,9 @@ -Communicate -=========== +Communicate and Get Involved +=========================== -Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim -placerat nibh, non feugiat risus varius vitae. Donec eu libero -lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in -magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum, -dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus -mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae -luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis -ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa, -rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies -tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis -egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna -sem. Donec arcu felis, faucibus et malesuada non, blandit vitae -metus. Fusce nec sapien dolor. +* Join the `ansible-project mailing list `_ on Google Groups +* Join `#ansible `_ on the `freenode IRC network `_ +* Visit the `project page `_ on Github -Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at, -pretium quis sapien. Duis felis metus, sodales sit amet gravida in, -pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin -eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at, -suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada -molestie, nisi nunc placerat libero, vel vulputate elit tellus et -augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat -egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan -lorem eget leo dictum viverra. + - View the `issue tracker `_ -Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean -ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar -quam. Suspendisse nec massa vel augue laoreet ultricies in convallis -dolor. Mauris sodales porta enim, non ultricies dolor luctus -in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate, -erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra -arcu sem a ante. Praesent nec metus vestibulum augue eleifend -suscipit. In feugiat, sem nec dignissim consequat, velit tortor -scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh -turpis. Proin ac nisi ligula, a pretium augue. - -In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed -ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl, -eget lobortis mi magna sed metus. Cras justo est, tempus quis -adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et -luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae -nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc -sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet -lacus. Maecenas interdum viverra laoreet. Quisque elementum -sollicitudin ullamcorper. - -Pellentesque mauris sem, malesuada at lobortis in, porta eget -urna. Duis aliquet quam eget risus elementum quis auctor ligula -gravida. Phasellus et ullamcorper libero. Nam elementum ultricies -tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat -tristique lobortis. Suspendisse est enim, tristique eu convallis id, -rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin -hendrerit mi tincidunt dui fermentum placerat. diff --git a/rst/examples.rst b/rst/examples.rst index 44194c9ff0..0a5df0d90d 100644 --- a/rst/examples.rst +++ b/rst/examples.rst @@ -1,71 +1,65 @@ Examples ======== -Examples 1 -`````````` +.. seealso:: -Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim -placerat nibh, non feugiat risus varius vitae. Donec eu libero -lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in -magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum, -dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus -mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae -luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis -ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa, -rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies -tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis -egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna -sem. Donec arcu felis, faucibus et malesuada non, blandit vitae -metus. Fusce nec sapien dolor. + :doc:`modules` + A list of available modules + :doc:`playbooks` + Alternative ways to use ansible -Examples 2 -`````````` +Parallelism and Shell Commands +`````````````````````````````` -Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at, -pretium quis sapien. Duis felis metus, sodales sit amet gravida in, -pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin -eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at, -suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada -molestie, nisi nunc placerat libero, vel vulputate elit tellus et -augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat -egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan -lorem eget leo dictum viverra. +Reboot all web servers in Atlanta, 10 at a time:: -Examples 3 -`````````` + ssh-agent bash + ssh-add ~/.ssh/id_rsa.pub -Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean -ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar -quam. Suspendisse nec massa vel augue laoreet ultricies in convallis -dolor. Mauris sodales porta enim, non ultricies dolor luctus -in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate, -erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra -arcu sem a ante. Praesent nec metus vestibulum augue eleifend -suscipit. In feugiat, sem nec dignissim consequat, velit tortor -scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh -turpis. Proin ac nisi ligula, a pretium augue. + ansible atlanta -a "/sbin/reboot" -f 10 -Examples 3 -`````````` +The -f 10 specifies the usage of 10 simultaneous processes. -In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed -ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl, -eget lobortis mi magna sed metus. Cras justo est, tempus quis -adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et -luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae -nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc -sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet -lacus. Maecenas interdum viverra laoreet. Quisque elementum -sollicitudin ullamcorper. +Note that other than the command module, ansible modules do not work like simple scripts. They make the remote system look like you state, and run the commands neccessary to get it there. + + +Example 2: Time Limited Background Operations +````````````````````````````````````````````` + + +Long running operations can be backgrounded, and their status can be checked on later. The same job ID is given to the same task on all hosts, so you won't lose track. Polling support is pending in the command line.:: + + ansible all -B 3600 -a "/usr/bin/long_running_operation --do-stuff" + ansible all -n job_status -a jid=123456789 + +Any module other than 'copy' or 'template' can be backgrounded. + + +Examples 3: File Transfer & Templating +`````````````````````````````````````` + +Ansible can SCP lots of files to multiple machines in parallel, and optionally use them as template sources. + +To just transfer a file directly to many different servers:: + + ansible atlanta copy -a "/etc/hosts /tmp/hosts" + +To use templating, first run the setup module to put the template variables you would like to use on the remote host. Then use the template module to write the files using the templates. Templates are written in Jinja2 format. Playbooks (covered below) will run the setup module for you, making this even simpler.:: + + ansible webservers -m setup -a "favcolor=red ntp_server=192.168.1.1" + ansible webservers -m template -a "src=/srv/motd.j2 dest=/etc/motd" + ansible webservers -m template -a "src=/srv/ntp.j2 dest=/etc/ntp.conf" + +Need something like the fqdn in a template? If facter or ohai are installed, data from these projects will also be made available to the template engine, using 'facter' and 'ohai' prefixes for each. + +Examples 3: Deploying From Source Control +````````````````````````````````````````` + +Deploy your webapp straight from git:: + + ansible webservers -m git -a "repo=git://foo dest=/srv/myapp version=HEAD" + +Since ansible modules can notify change handlers (see 'Playbooks') it is possible to tell ansible to run specific tasks when the code is updated, such as deploying Perl/Python/PHP/Ruby directly from git and then restarting apache. -Examples 4 -`````````` -Pellentesque mauris sem, malesuada at lobortis in, porta eget -urna. Duis aliquet quam eget risus elementum quis auctor ligula -gravida. Phasellus et ullamcorper libero. Nam elementum ultricies -tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat -tristique lobortis. Suspendisse est enim, tristique eu convallis id, -rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin -hendrerit mi tincidunt dui fermentum placerat. diff --git a/rst/gettingstarted.rst b/rst/gettingstarted.rst index 247faf96c0..638039c4a9 100644 --- a/rst/gettingstarted.rst +++ b/rst/gettingstarted.rst @@ -1,67 +1,100 @@ Getting Started =============== -How to ansible - +How to download ansible and get started using it .. seealso:: + :doc:`examples` + Examples of basic commands :doc:`YAMLScripts` - Complete documentation of the YAML syntax `ansible` understands. + Complete documentation of the YAML syntax `ansible` understands for playbooks. + :doc:`playbooks` + Learning ansible's configuration management language + :doc:`modules` + Learn about modules that ship with ansible + +Requirements +```````````` + +Requirements are extremely minimal. + +If you are running python 2.6 on the **overlord** machine, you will +need: + +* ``paramiko`` +* ``PyYAML`` +* ``python-jinja2`` (for playbooks) + +If you are running less than Python 2.6, you will also need: + +* The Python 2.4 or 2.5 backport of the ``multiprocessing`` module + + - `Installation and Testing Instructions `_ + +* ``simplejson`` + +On the managed nodes, to use templating, you will need: + +* ``python-jinja2`` (you can install this with ansible) + +Developer Requirements +`````````````````````` + +For developers, you may wish to have: + +* ``asciidoc`` (for building manpage documentation) +* ``python-sphinx`` (for building content for ansible.github.com) -What you need -------------- +Getting Ansible +``````````````` -Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim -placerat nibh, non feugiat risus varius vitae. Donec eu libero -lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in -magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum, -dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus -mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae -luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis -ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa, -rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies -tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis -egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna -sem. Donec arcu felis, faucibus et malesuada non, blandit vitae -metus. Fusce nec sapien dolor. +Tagged releases are available as tar.gz files from the Ansible github +project page: -Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at, -pretium quis sapien. Duis felis metus, sodales sit amet gravida in, -pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin -eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at, -suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada -molestie, nisi nunc placerat libero, vel vulputate elit tellus et -augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat -egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan -lorem eget leo dictum viverra. +* `Ansible/downloads `_ -Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean -ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar -quam. Suspendisse nec massa vel augue laoreet ultricies in convallis -dolor. Mauris sodales porta enim, non ultricies dolor luctus -in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate, -erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra -arcu sem a ante. Praesent nec metus vestibulum augue eleifend -suscipit. In feugiat, sem nec dignissim consequat, velit tortor -scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh -turpis. Proin ac nisi ligula, a pretium augue. +You can also clone the git repository yourself and install Ansible in +one of two ways: -In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed -ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl, -eget lobortis mi magna sed metus. Cras justo est, tempus quis -adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et -luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae -nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc -sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet -lacus. Maecenas interdum viverra laoreet. Quisque elementum -sollicitudin ullamcorper. -Pellentesque mauris sem, malesuada at lobortis in, porta eget -urna. Duis aliquet quam eget risus elementum quis auctor ligula -gravida. Phasellus et ullamcorper libero. Nam elementum ultricies -tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat -tristique lobortis. Suspendisse est enim, tristique eu convallis id, -rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin -hendrerit mi tincidunt dui fermentum placerat. +Python Distutils +++++++++++++++++ + +You can also install Ansible using Python Distutils:: + + $ git clone git://github.com/ansible/ansible.git + $ cd ./ansible + $ sudo make install + +Via RPM ++++++++ + +In the near future, pre-built RPMs will be available through your distribution. Until that time you +can use the ``make rpm`` command:: + + $ git clone git://github.com/ansible/ansible.git + $ cd ./ansible + $ make rpm + $ sudo rpm -Uvh ~/rpmbuild/RPMS/noarch/ansible-1.0-1.noarch.rpm + +Your first commands +``````````````````` + +Edit /etc/ansible/hosts and put one or more remote systems in it, for which you have your SSH +key in ``authorized_keys``:: + + 192.168.1.50 + aserver.example.org + bserver.example.org + +Now try this: + + ssh-agent bash + ssh-add ~/.ssh/id_rsa + ansible all -m ping + +Congratulations. You've just contacted your nodes with Ansible. It's now time to read some +of the more real-world examples. + diff --git a/rst/index.rst b/rst/index.rst index c26aabef7b..4ab721e4e2 100644 --- a/rst/index.rst +++ b/rst/index.rst @@ -5,102 +5,48 @@ Ansible ======= -Ansible is a extra-simple tool/API for doing 'parallel remote things' -over SSH -- whether executing commands, running "modules", or -executing larger 'playbooks' that can serve as a configuration -management or deployment system. +Ansible is a radically simple deployment, configuration, and command execution framework. +Other tools in this space have been too complicated for too long, require too much bootstrapping, +and have too much learning curve. Ansible is dead simple and painless to extend. For comparison, Puppet and Chef have about 60k lines of code. Ansible's core is a little over 1000 lines. -While `Func installation `_ which I -co-wrote, aspired to avoid using SSH and have it's own daemon -infrastructure, Ansible aspires to be quite different and more -minimal, but still able to grow more modularly over time. This is -based on talking to a lot of users of various tools and wishing to -eliminate problems with connectivity and long running daemons, or not -picking tool `X` because they preferred to code in `Y`. Further, -playbooks take things a whole step further, building the config and -deployment system I always wanted to build. +Ansible isn't just for configuration -- it's also great for Ad-Hoc tasks, +quickly firing off commands against nodes. Where Ansible excels though, is expressing complex multi-node deployment processes, executing complex sequences of commands on different hosts through the "playbooks" feature. -Why use Ansible versus something else? (Fabric, Capistrano, +Ansible does not require programming in any particular language -- you can write modules +as scripts or programs that return simple JSON. + +Why use Ansible versus something else? (Puppet, Chef, Fabric, Capistrano, mCollective, Func, SaltStack, etc?) It will have far less code, it will be more correct, and it will be the easiest thing to hack on and use you'll ever see -- regardless of your favorite language of choice. -Want to only code plugins in bash or clojure? Ansible doesn't care. -The docs will fit on one page and the source will be blindingly -obvious. +Systems management doesn't have to be complicated. Ansible's docs will remain +short & simple, and the source will be blindingly obvious. -Design Principles -````````````````` +Design Goals +```````````` * Dead simple setup * Super fast & parallel by default -* No server or client daemons; use existing SSHd +* No server or client daemons; use existing SSHd out of the box * No additional software required on client boxes * Modules can be written in ANY language * Awesome API for creating very powerful distributed scripts * Be usable as non-root * Create the easiest config management system to use, ever. +About the Author +```````````````` -Requirements -```````````` +Michael DeHaan is a Raleigh, NC based software developer and architect. He created other +DevOps programs such as Cobbler, the popular Linux install server. +Cobbler is used to deploy mission critical systems all over the planet, in industries +ranging from massively multiplayer gaming, core internet infrastructure, finance, +chip design, and more. Michael also helped co-author of Func, which is used +to orchestrate systems in lots of diverse places. -Requirements are extremely minimal. - -If you are running python 2.6 on the **overlord** machine, you will -need: - -* ``paramiko`` -* ``PyYAML`` -* ``python-jinja2`` (for playbooks) -* ``Asciidoc`` (for building documentation) - -If you are running less than Python 2.6, you will also need: - -* The Python 2.4 or 2.5 backport of the ``multiprocessing`` module - - - `Installation and Testing Instructions `_ - -* ``simplejson`` - -On the managed nodes, to use templating, you will need: - -* ``python-jinja2`` (you can install this with ansible) - - -Getting Ansible -``````````````` - -Tagged releases are available as tar.gz files from the Ansible github -project page: - -* `Ansible/downloads `_ - -You can also clone the git repository yourself and install Ansible in -one of two ways: - - -Python Distutils -++++++++++++++++ - -You can install Ansible using Python Distutils:: - - $ git clone git://github.com/ansible/ansible.git - $ cd ./ansible - $ sudo make install - - -Via RPM -+++++++ - -In the future, pre-built RPMs may be available. Until that time you -can use the ``make rpm`` command:: - - $ git clone git://github.com/ansible/ansible.git - $ cd ./ansible - $ make rpm - $ sudo rpm -Uvh ~/rpmbuild/RPMS/noarch/ansible-1.0-1.noarch.rpm - +Ansible is an GPLv3 licensed open source project, so see the contributions section for how to +get involved. Contents ======== @@ -109,21 +55,11 @@ Contents :maxdepth: 3 gettingstarted - YAMLScripts patterns modules + YAMLScripts playbooks examples api communicate man - - -Communicate or Get Involved -=========================== - -* Join the `ansible-project mailing list `_ on Google Groups -* Join `#ansible `_ on the `freenode IRC network `_ -* Visit the `project page `_ on Github - - - View the `issue tracker `_ diff --git a/rst/man.rst b/rst/man.rst index d25477bf11..41dd4e650e 100644 --- a/rst/man.rst +++ b/rst/man.rst @@ -3,19 +3,10 @@ Man Pages ========= -Ansile ships with a handfull of manpages to help you on your journey. +Ansible's manpage lists available command line options. ansible(1) ---------- * `View ansible.1 `_ -ansible-modules(5) ------------------- - -* `View ansible-modules.5 `_ - -ansible-playbook(5) -------------------- - -* `View ansible-playbook.5 `_ diff --git a/rst/modules.rst b/rst/modules.rst index b303ee6ccb..540aad2bf7 100644 --- a/rst/modules.rst +++ b/rst/modules.rst @@ -1,55 +1,201 @@ -Modules -======= +Ansible Modules +=============== -Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim -placerat nibh, non feugiat risus varius vitae. Donec eu libero -lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in -magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum, -dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus -mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae -luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis -ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa, -rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies -tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis -egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna -sem. Donec arcu felis, faucibus et malesuada non, blandit vitae -metus. Fusce nec sapien dolor. +.. seealso:: -Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at, -pretium quis sapien. Duis felis metus, sodales sit amet gravida in, -pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin -eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at, -suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada -molestie, nisi nunc placerat libero, vel vulputate elit tellus et -augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat -egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan -lorem eget leo dictum viverra. + :doc:`examples` + Examples of using modules in /usr/bin/ansible + :doc:`playbooks` + Examples of using modules with /usr/bin/ansible-playbook + :doc:`api` + Examples of using modules with the Python API -Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean -ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar -quam. Suspendisse nec massa vel augue laoreet ultricies in convallis -dolor. Mauris sodales porta enim, non ultricies dolor luctus -in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate, -erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra -arcu sem a ante. Praesent nec metus vestibulum augue eleifend -suscipit. In feugiat, sem nec dignissim consequat, velit tortor -scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh -turpis. Proin ac nisi ligula, a pretium augue. -In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed -ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl, -eget lobortis mi magna sed metus. Cras justo est, tempus quis -adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et -luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae -nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc -sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet -lacus. Maecenas interdum viverra laoreet. Quisque elementum -sollicitudin ullamcorper. +About Modules +````````````` -Pellentesque mauris sem, malesuada at lobortis in, porta eget -urna. Duis aliquet quam eget risus elementum quis auctor ligula -gravida. Phasellus et ullamcorper libero. Nam elementum ultricies -tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat -tristique lobortis. Suspendisse est enim, tristique eu convallis id, -rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin -hendrerit mi tincidunt dui fermentum placerat. +Ansible ships with a number of modules that can be executed directly on remote hosts or through +ansible playbooks. + + +Idempotence +``````````` + +Most modules other than command are idempotent, meaning they will seek to avoid changes +unless a change needs to be made. When using ansible playbooks, these modules can +trigger change events. Unless otherwise noted, all modules support change hooks. + + +command +``````` + +The command module takes the command name followed by a list of arguments, space delimited. +This is the only module that does not use key=value style parameters. + +Example usage:: + + /sbin/shutdown -t now + +This module does not support change hooks and returns the return code from the program as well as timing information about how long the command was running for. + + +copy +```` + +The copy module moves a file on the local box to remote locations. + +*src*:: + +Local absolute path to a file to copy to the remote server + + +*dest*:: + +Remote absolute path where the file should end up + + +This module also returns md5sum information about the resultant file. + + +facter +`````` + +Runs the discovery program 'facter' on the remote system, returning +JSON data that can be useful for inventory purposes. + +Requires that 'facter' and 'ruby-json' be installed on the remote end. + +This module is informative only - it takes no parameters & does not support change hooks, +nor does it make any changes on the system. + + +git +``` + +Deploys software from git checkouts. + +*repo*:: + +git or http protocol address of the repo to checkout + +*dest*:: + +where to check it out, an absolute directory path + +*version*:: + +what version to check out -- either the git SHA, the literal string 'HEAD', or a tag name + + +ohai +```` + +Similar to the facter module, this returns JSON inventory data. Ohai +data is a bit more verbose and nested than facter. + +Requires that 'ohai' be installed on the remote end. + +This module is information only - it takes no parameters & does not +support change hooks, nor does it make any changes on the system. + + +ping +```` + +A trivial test module, this module always returns the integer '1' on +successful contact. + +This module does not support change hooks. + +This module is informative only - it takes no parameters & does not +support change hooks, nor does it make any changes on the system. + + +service +``````` + +Controls services on remote machines. + +*state* + +Values are 'started', 'stopped', or 'restarted'. Started/stopped +are idempotent actions that will not run commands unless neccessary. +'restarted' will always bounce the service + + +*name* + +The name of the service + + +setup +````` + +Writes a JSON file containing key/value data, for use in templating. +Call this once before using the template modules. Playbooks will +execute this module automatically as the first step in each play. + +If facter or ohai are installed, variables from these programs will also +be snapshotted into the JSON file for usage in templating. These variables +are prefixed with 'facter_' and 'ohai_" so it's easy to tell their source. + +*metadata* + +Optionally overrides the default JSON file location of /etc/ansible/setup or ~/ansible/setup +depending on what remote user has been specified. + +If used, also supply the metadata parameter to the template module. + +*anything* + +any other parameters can be named basically anything, and set a key=value +pair in the JSON file for use in templating. + + +template +```````` + +Templates a file out to a remote server. Call the setup module prior to usage. + +*src* + +path of a Jinja2 formatted template on the local server + + +*dest* + +location to render the template on the remote server + + +*metadata* + +location of a JSON file to use to supply template data. Default is /etc/ansible/setup +which is the same as the default for the setup module. Change if running as a non-root +remote user who does not have permissions on /etc/ansible. + + +This module also returns md5sum information about the resultant file. + + +user +```` + +This module is in plan. + + +yum +``` + +This module is in plan. + + +WRITING YOUR OWN MODULES +```````````````````````` + +To write your own modules, simply follow the convention of those already available in +/usr/share/ansible. Modules must return JSON but can be written in any language. +Modules should return hashes, but hashes can be nested. +To support change hooks, modules should return hashes with a changed: True/False +element at the top level. Modules can also choose to indicate a failure scenario +by returning a top level 'failure' element with a True value, and a 'msg' element +describing the nature of the failure. Other values are up to the module. diff --git a/rst/patterns.rst b/rst/patterns.rst index d0ae6b5d37..6b73114199 100644 --- a/rst/patterns.rst +++ b/rst/patterns.rst @@ -1,55 +1,69 @@ Patterns ======== -Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim -placerat nibh, non feugiat risus varius vitae. Donec eu libero -lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in -magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum, -dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus -mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae -luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis -ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa, -rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies -tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis -egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna -sem. Donec arcu felis, faucibus et malesuada non, blandit vitae -metus. Fusce nec sapien dolor. +How to select hosts you wish to manage -Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at, -pretium quis sapien. Duis felis metus, sodales sit amet gravida in, -pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin -eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at, -suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada -molestie, nisi nunc placerat libero, vel vulputate elit tellus et -augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat -egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan -lorem eget leo dictum viverra. +.. seealso:: + + :doc:`examples` + Examples of basic commands + :doc:`playbooks` + Learning ansible's configuration management language + +Ansible works against multiple systems in your infrastructure at the +same time. It does this by selecting portions of systems listed in Ansible's inventory file, +which defaults to /etc/ansible/hosts, and looks like this:: + + mail.example.com + + [webservers] + foo.example.com + bar.example.com + + [dbservers] + one.example.com + two.example.com + three.example.com + +Targetting All Systems +`````````````````````` + +The pattern 'all' or '*' targets all systems in the inventory file. + +Specific Hosts +`````````````` + +It is possible to address specific hosts: + + one.example.com + one.example.com:two.example.com + +Groups +`````` + +The following patterns address one or more groups: + + webservers + webservers:dbservers + +There is also a magic group 'ungrouped' which selects systems not in a group. + +Wildcards +````````` + +Individual hosts, but not groups, can also be referenced using wildcards: + + *.example.com + *.com + +Mixing Things Up +```````````````` + +Specific hosts, wildcards, and groups can all be mixed in the same pattern + + one*.com:dbservers + +It is not possible to target a host not in the inventory file. -Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean -ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar -quam. Suspendisse nec massa vel augue laoreet ultricies in convallis -dolor. Mauris sodales porta enim, non ultricies dolor luctus -in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate, -erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra -arcu sem a ante. Praesent nec metus vestibulum augue eleifend -suscipit. In feugiat, sem nec dignissim consequat, velit tortor -scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh -turpis. Proin ac nisi ligula, a pretium augue. -In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed -ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl, -eget lobortis mi magna sed metus. Cras justo est, tempus quis -adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et -luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae -nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc -sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet -lacus. Maecenas interdum viverra laoreet. Quisque elementum -sollicitudin ullamcorper. -Pellentesque mauris sem, malesuada at lobortis in, porta eget -urna. Duis aliquet quam eget risus elementum quis auctor ligula -gravida. Phasellus et ullamcorper libero. Nam elementum ultricies -tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat -tristique lobortis. Suspendisse est enim, tristique eu convallis id, -rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin -hendrerit mi tincidunt dui fermentum placerat. diff --git a/rst/playbooks.rst b/rst/playbooks.rst index 677403b5bc..75da6a6625 100644 --- a/rst/playbooks.rst +++ b/rst/playbooks.rst @@ -1,55 +1,118 @@ Playbooks ========= -Lorem ipsum dolor sit amet, consectetur adipiscing elit. In dignissim -placerat nibh, non feugiat risus varius vitae. Donec eu libero -lectus. Ut non orci felis, eget mattis mauris. Etiam ut tellus in -magna porta venenatis. Quisque scelerisque, sem non ultrices bibendum, -dolor diam rutrum lectus, sed luctus neque neque vitae eros. Vivamus -mattis, ipsum ut bibendum gravida, lectus arcu venenatis elit, vitae -luctus diam leo sit amet ligula. Nunc egestas justo in nulla sagittis -ut suscipit sapien gravida. Morbi id dui nibh. Nullam diam massa, -rhoncus a dignissim non, adipiscing vel arcu. Quisque ultricies -tincidunt purus ut sodales. Quisque scelerisque dapibus purus quis -egestas. Maecenas sagittis porttitor adipiscing. Duis eu magna -sem. Donec arcu felis, faucibus et malesuada non, blandit vitae -metus. Fusce nec sapien dolor. +.. seealso:: -Aenean ac fermentum nisl. Integer leo sem, rutrum nec dictum at, -pretium quis sapien. Duis felis metus, sodales sit amet gravida in, -pretium ut arcu. Nulla ligula quam, aliquam sit amet sollicitudin -eget, molestie tincidunt ipsum. Nulla leo nunc, mattis sed auctor at, -suscipit ut metus. Suspendisse hendrerit, justo sagittis malesuada -molestie, nisi nunc placerat libero, vel vulputate elit tellus et -augue. Phasellus tempor lectus ac nisi aliquam faucibus. Donec feugiat -egestas nibh id mattis. In hac habitasse platea dictumst. Ut accumsan -lorem eget leo dictum viverra. + :doc:`YAMLScripts` + Learn about YAML syntax + :doc:`modules` + Learn about available modules and writing your own + :doc:`patterns` + Learn about how to select hosts -Quisque egestas lorem sit amet felis tincidunt adipiscing. Aenean -ornare fermentum accumsan. Aenean eu mauris arcu, id pulvinar -quam. Suspendisse nec massa vel augue laoreet ultricies in convallis -dolor. Mauris sodales porta enim, non ultricies dolor luctus -in. Phasellus eu tortor lectus, vel porttitor nulla. Mauris vulputate, -erat id scelerisque lobortis, nibh ipsum tristique elit, ac viverra -arcu sem a ante. Praesent nec metus vestibulum augue eleifend -suscipit. In feugiat, sem nec dignissim consequat, velit tortor -scelerisque metus, sit amet mollis nisl sem eu nibh. Quisque in nibh -turpis. Proin ac nisi ligula, a pretium augue. -In nibh eros, laoreet id interdum vel, sodales sed tortor. Sed -ullamcorper, sem vel mattis consectetur, nibh turpis molestie nisl, -eget lobortis mi magna sed metus. Cras justo est, tempus quis -adipiscing ut, hendrerit convallis sem. Mauris ullamcorper, sapien et -luctus iaculis, urna elit egestas ipsum, et tristique enim risus vitae -nunc. Vivamus aliquet lorem eu urna pulvinar hendrerit malesuada nunc -sollicitudin. Cras in mi rhoncus quam egestas dignissim vel sit amet -lacus. Maecenas interdum viverra laoreet. Quisque elementum -sollicitudin ullamcorper. +Playbooks are a completely different way to use ansible and are particularly awesome. + +They are the basis for a really simple configuration management and deployment system, unlike any that already exist, and one that is very well suited to deploying complex multi-machine applications. While you might run the main ansible program for ad-hoc tasks, playbooks are more likely to be kept in source control and used to push out your configuration or assure the configurations of your remote systems are in spec. + + +Playbook Example +```````````````` + +Playbooks are expressed in YAML format and have a minimum of syntax. Each playbook is composed +of one or more patterns in a list. By composing a playbook of multiple patterns, it is possible +to orchestrate multi-machine deployments, running certain steps on all machines in +the webservers group, then certain steps on the database server group, then more commands +back on the webservers group, etc:: + + --- + - hosts: all + vars: + http_port: 80 + max_clients: 200 + user: root + tasks: + - include: base.yml somevar=3 othervar=4 + - name: write the apache config file + action: template src=/srv/httpd.j2 dest=/etc/httpd.conf + notify: + - restart apache + - name: ensure apache is running + action: service name=httpd state=started + handlers: + - include: handlers.yml + +Hosts line +`````````` + +The hosts line is alist of one or more groups or host patterns, seperated by colons.:: + + webservers:dbservers:*.foo.example.com + +Vars section +```````````` + +A list of variables that can be used in the 'action' lines of the template, or in +included templates. Variables are deferenced like this:: + + {{ varname }} + +These variables will be pushed down to the managed systems for use in templating operations. + +Further, if there are discovered variables about the system (say, if facter or ohai were +installed) these variables bubble up back into the playbook, and can be used on each +system just like explicitly set variables. Facter variables are prefixed with 'facter' +and Ohai variables are prefixed with 'ohai'. + +Tasks list +`````````` + +Tasks are executed in order, one at a time, against all machines matched by the host +pattern, before moving on to the next task. Failed tasks are taken out of the rotation. + +Task name and comment +````````` + +Each task has a name (required) and optional comment. This is for informational purposes only + +Task action +``````````` + +The action line is the name of an ansible module followed by parameters. Usually these +are expressed in key=value form, except for the command module, which looks just like a Linux/Unix +command line. See the module documentation for more info. + +Notify statements +````````````````` + +Nearly all modules are written to be 'idempotent' and can signal when they have affected a change +on the remote system. If a notify statement is used, the named handler will be run against +each system where a change was effected, but NOT on systems where no change occurred. + +Handlers +```````` + +Handlers are lists of tasks, not really any different from regular tasks, that are referenced +by name. + +Includes +```````` + +Not all tasks have to be listed directly in the main file. An include file can contain +a list of tasks (in YAML) as well, optionally passing extra variables into the file. +Variables passed in can be deferenced like this: + + {{ variable }} + +Asynchronous Actions and Polling +```````````````````````````````` + +(Information on this feature is pending) + +Executing A Playbook +```````````````````` + +To run a playbook:: + + ansible-playbook playbook.yml -Pellentesque mauris sem, malesuada at lobortis in, porta eget -urna. Duis aliquet quam eget risus elementum quis auctor ligula -gravida. Phasellus et ullamcorper libero. Nam elementum ultricies -tellus, in sagittis magna aliquet quis. Ut sit amet tellus id erat -tristique lobortis. Suspendisse est enim, tristique eu convallis id, -rutrum nec lacus. Fusce iaculis diam non felis rutrum lobortis. Proin -hendrerit mi tincidunt dui fermentum placerat. From 2cafb8d221c2d855f76e567c5bf57923cfdf2166 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 8 Mar 2012 13:53:48 -0500 Subject: [PATCH 02/11] Minor docs restructuring --- html/YAMLScripts.html | 8 +-- html/_sources/index.txt | 11 +++- html/_sources/modules.txt | 17 +++--- html/_sources/patterns.txt | 40 ++++++-------- html/_sources/playbooks.txt | 75 +++++++++++++------------- html/api.html | 10 ++-- html/examples.html | 10 ++-- html/gettingstarted.html | 10 ++-- html/index.html | 32 ++++++----- html/man.html | 10 ++-- html/man/ansible-modules.5.html | 2 +- html/man/ansible-playbook.5.html | 2 +- html/man/ansible.1.html | 2 +- html/modules.html | 28 +++++----- html/patterns.html | 59 +++++++++----------- html/playbooks.html | 93 ++++++++++++++------------------ html/searchindex.js | 2 +- rst/communicate.rst | 9 ---- rst/index.rst | 32 +++++++---- rst/modules.rst | 17 +++--- rst/patterns.rst | 40 ++++++-------- rst/playbooks.rst | 45 ++++++++-------- 22 files changed, 260 insertions(+), 294 deletions(-) delete mode 100644 rst/communicate.rst diff --git a/html/YAMLScripts.html b/html/YAMLScripts.html index f252982648..b1a23d87da 100644 --- a/html/YAMLScripts.html +++ b/html/YAMLScripts.html @@ -23,7 +23,7 @@ - + @@ -34,7 +34,7 @@ index
  • - next |
  • Ansible Modules

    Next topic

    Playbooks

    + title="next chapter">Playbooks: Ansible for Deployment, Configuration Management, and Orchestration

    This Page

  • @@ -119,7 +119,7 @@ ansible webservers -m template -a "src=/srv/ntp.j2 dest=/etc/ntp.conf"

    Previous topic

    Playbooks

    + title="previous chapter">Playbooks: Ansible for Deployment, Configuration Management, and Orchestration

    Next topic

    API

    @@ -155,7 +155,7 @@ ansible webservers -m template -a "src=/srv/ntp.j2 dest=/etc/ntp.conf" next |
  • - previous |
  • Ansible v0.0.1 documentation »
  • diff --git a/html/gettingstarted.html b/html/gettingstarted.html index 6b2e0498a0..a2b3d6a130 100644 --- a/html/gettingstarted.html +++ b/html/gettingstarted.html @@ -23,7 +23,7 @@ - + @@ -34,7 +34,7 @@ index
  • - next |
  • Examples of basic commands
    YAML Scripts
    Complete documentation of the YAML syntax ansible understands for playbooks.
    -
    Playbooks
    +
    Playbooks: Ansible for Deployment, Configuration Management, and Orchestration
    Learning ansible’s configuration management language
    Ansible Modules
    Learn about modules that ship with ansible
    @@ -167,7 +167,7 @@ of the more real-world examples.

    title="previous chapter">Ansible

    Next topic

    Patterns

    + title="next chapter">The Inventory File, Patterns, and Groups

    This Page

  • -
  • Patterns diff --git a/html/patterns.html b/html/patterns.html index b421d63923..9ea3280552 100644 --- a/html/patterns.html +++ b/html/patterns.html @@ -7,7 +7,7 @@ - Patterns — Ansible v0.0.1 documentation + The Inventory File, Patterns, and Groups — Ansible v0.0.1 documentation - +
  • - previous |
  • Ansible v0.0.1 documentation »
  • @@ -87,8 +87,8 @@ be used as a framework to rapidly build powerful applications and scripts.

    Previous topic

    -

    Examples

    +

    Playbooks: Ansible for Deployment, Configuration Management, and Orchestration

    Next topic

    Man Pages

    @@ -124,7 +124,7 @@ be used as a framework to rapidly build powerful applications and scripts.

    next |
  • - previous |
  • Ansible v0.0.1 documentation »
  • diff --git a/html/examples.html b/html/examples.html index b16e78e7a9..d39b37a4b7 100644 --- a/html/examples.html +++ b/html/examples.html @@ -23,8 +23,8 @@ - - + +

    Parallelism and Shell Commands

    -

    Reboot all web servers in Atlanta, 10 at a time:

    +

    Let’s use ansible’s command line tool to reboot all web servers in Atlanta, 10 at a time:

    ssh-agent bash
     ssh-add ~/.ssh/id_rsa.pub
     
     ansible atlanta -a "/sbin/reboot" -f 10

    The -f 10 specifies the usage of 10 simultaneous processes.

    -

    Note that other than the command module, ansible modules do not work like simple scripts. They make the remote system look like you state, and run the commands neccessary to get it there.

    +

    Note that other than the command module, ansible modules do not work like simple scripts. They make the remote system look like you state, and run the commands neccessary to get it there. This is commonly refered to +as ‘idempotency’.

    -
    -

    Example 2: Time Limited Background Operations

    +
    +

    Time Limited Background Operations

    Long running operations can be backgrounded, and their status can be checked on later. The same job ID is given to the same task on all hosts, so you won’t lose track. Polling support is pending in the command line.:

    ansible all -B 3600 -a "/usr/bin/long_running_operation --do-stuff"
     ansible all -n job_status -a jid=123456789
    -

    Any module other than ‘copy’ or ‘template’ can be backgrounded.

    +

    Any module other than ‘copy’ or ‘template’ can be backgrounded. Typically you’ll be backgrounding shell +commands or software upgrades only.

    +

    After the time limit (in seconds) runs out (-B), the process on the remote nodes will be killed.

    -
    -

    Examples 3: File Transfer & Templating

    +
    +

    File Transfer & Templating

    Ansible can SCP lots of files to multiple machines in parallel, and optionally use them as template sources.

    To just transfer a file directly to many different servers:

    ansible atlanta copy -a "/etc/hosts /tmp/hosts"
    -

    To use templating, first run the setup module to put the template variables you would like to use on the remote host. Then use the template module to write the files using the templates. Templates are written in Jinja2 format. Playbooks (covered below) will run the setup module for you, making this even simpler.:

    +

    To use templating, first run the setup module to put the template variables you would like to use on the remote host. Then use the template module to write the files using the templates. Templates are written in Jinja2 format. Playbooks (covered elsewhere in the documentation) will run the setup module for you, making this even simpler.:

    ansible webservers -m setup    -a "favcolor=red ntp_server=192.168.1.1"
     ansible webservers -m template -a "src=/srv/motd.j2 dest=/etc/motd"
     ansible webservers -m template -a "src=/srv/ntp.j2 dest=/etc/ntp.conf"

    Need something like the fqdn in a template? If facter or ohai are installed, data from these projects will also be made available to the template engine, using ‘facter’ and ‘ohai’ prefixes for each.

    -
    -

    Examples 3: Deploying From Source Control

    +
    +

    Deploying From Source Control

    Deploy your webapp straight from git:

    ansible webservers -m git -a "repo=git://foo dest=/srv/myapp version=HEAD"

    Since ansible modules can notify change handlers (see ‘Playbooks’) it is possible to tell ansible to run specific tasks when the code is updated, such as deploying Perl/Python/PHP/Ruby directly from git and then restarting apache.

    +
    +

    Managing Services

    +

    Ensure a service is started on all webservers:

    +
    ansible webservers -m service name=httpd state=started
    +
    +

    Alternatively, restart a service on all webservers:

    +
    ansible webservers -m service name=httpd state=restarted
    +
    +
    @@ -110,19 +122,20 @@ ansible webservers -m template -a "src=/srv/ntp.j2 dest=/etc/ntp.conf"

    Previous topic

    -

    Playbooks: Ansible for Deployment, Configuration Management, and Orchestration

    +

    The Inventory File, Patterns, and Groups

    Next topic

    -

    API

    +

    Ansible Modules

    This Page

    diff --git a/html/gettingstarted.html b/html/gettingstarted.html index a2b3d6a130..e0e01f7e24 100644 --- a/html/gettingstarted.html +++ b/html/gettingstarted.html @@ -56,19 +56,14 @@
    Examples
    Examples of basic commands
    -
    YAML Scripts
    -
    Complete documentation of the YAML syntax ansible understands for playbooks.
    Playbooks: Ansible for Deployment, Configuration Management, and Orchestration
    Learning ansible’s configuration management language
    -
    Ansible Modules
    -
    Learn about modules that ship with ansible

    Requirements

    -

    Requirements are extremely minimal.

    -

    If you are running python 2.6 on the overlord machine, you will -need:

    +

    Requirements for Ansible are extremely minimal.

    +

    If you are running python 2.6 on the overlord machine (the machine that you’ll be talking to the other machines from), you will need:

    • paramiko
    • PyYAML
    • @@ -92,7 +87,7 @@ need:

      For developers, you may wish to have:

      • asciidoc (for building manpage documentation)
      • -
      • python-sphinx (for building content for ansible.github.com)
      • +
      • python-sphinx (for building content for the ansible.github.com project only)
    @@ -137,7 +132,8 @@ bserver.example.org ssh-add ~/.ssh/id_rsa ansible all -m ping

    Congratulations. You’ve just contacted your nodes with Ansible. It’s now time to read some -of the more real-world examples.

    +of the more real-world examples, and explore what you can do with different modules, as well +as the Ansible playbooks language.

    diff --git a/html/index.html b/html/index.html index 377b263063..0bc60bfb23 100644 --- a/html/index.html +++ b/html/index.html @@ -50,14 +50,15 @@ Other tools in this space have been too complicated for too long, require too much bootstrapping, and have too much learning curve. Ansible is dead simple and painless to extend. For comparison, Puppet and Chef have about 60k lines of code. Ansible’s core is a little over 1000 lines.

    Ansible isn’t just for configuration – it’s also great for Ad-Hoc tasks, -quickly firing off commands against nodes. Where Ansible excels though, is expressing complex multi-node deployment processes, executing complex sequences of commands on different hosts through the “playbooks” feature.

    -

    Ansible does not require programming in any particular language – you can write modules -as scripts or programs that return simple JSON.

    +quickly firing off commands against nodes. Where Ansible excels though, is expressing complex multi-node deployment processes, executing complex sequences of commands on different hosts through “playbooks”.

    +

    Extending ansible does not require programming in any particular language – you can write modules +as scripts or programs that return simple JSON. It’s also trivially easy to just execute +useful shell commands.

    Why use Ansible versus something else? (Puppet, Chef, Fabric, Capistrano, -mCollective, Func, SaltStack, etc?) It will have far less code, it -will be more correct, and it will be the easiest thing to hack on and -use you’ll ever see – regardless of your favorite language of choice. -Systems management doesn’t have to be complicated. Ansible’s docs will remain +mCollective, Func, SaltStack, etc?) Ansible will have far less code, it +will be (by extension) more correct, and it will be the easiest thing to hack on and +use you’ll ever see – regardless of your favorite language of choice.

    +

    Systems management doesn’t have to be complicated. Ansible’s docs will remain short & simple, and the source will be blindingly obvious.

    Design Goals

    @@ -68,7 +69,7 @@ short & simple, and the source will be blindingly obvious.

  • No additional software required on client boxes
  • Modules can be written in ANY language
  • Awesome API for creating very powerful distributed scripts
  • -
  • Be usable as non-root
  • +
  • Be very usable as non-root
  • Create the easiest config management system to use, ever.
  • @@ -105,8 +106,15 @@ short & simple, and the source will be blindingly obvious.

  • Selecting Targets
  • +
  • Examples +
  • Ansible Modules
  • YAML Scripts
      @@ -138,13 +144,6 @@ short & simple, and the source will be blindingly obvious.

    • Executing A Playbook
  • -
  • Examples -
  • API
  • Man Pages
    • ansible(1)
    • @@ -158,9 +157,9 @@ short & simple, and the source will be blindingly obvious.

      He created other popular DevOps programs such as Cobbler, the popular Linux install server. Cobbler is used to deploy mission critical systems all over the planet, in industries ranging from massively multiplayer gaming, core internet infrastructure, finance, -chip design, and more. Michael also helped co-author of Func, which is used +chip design, and more. Michael also helped co-author of Func, a precursor to Ansible, which is used to orchestrate systems in lots of diverse places. He’s worked on systems software for -IBM, Motorola, Red Hat’s Emerging Technologies Group, and rPath.

      +IBM, Motorola, Red Hat’s Emerging Technologies Group, Puppet Labs, and rPath.

  • diff --git a/html/man/ansible-modules.5.html b/html/man/ansible-modules.5.html index cc59938322..0a2d3aef42 100644 --- a/html/man/ansible-modules.5.html +++ b/html/man/ansible-modules.5.html @@ -1,6 +1,6 @@ -ansible-modules

    Name

    ansible-modules — stock modules shipped with ansible

    DESCRIPTION

    Ansible ships with a number of modules that can be executed directly on remote hosts or through +ansible-modules

    Name

    ansible-modules — stock modules shipped with ansible

    DESCRIPTION

    Ansible ships with a number of modules that can be executed directly on remote hosts or through ansible playbooks.

    IDEMPOTENCE

    Most modules other than command are idempotent, meaning they will seek to avoid changes unless a change needs to be made. When using ansible playbooks, these modules can trigger change events, as described in ansible-playbooks(5).

    Unless otherwise noted, all modules support change hooks.

    command

    The command module takes the command name followed by a list of arguments, space delimited. diff --git a/html/man/ansible-playbook.5.html b/html/man/ansible-playbook.5.html index 0843349564..e495756d92 100644 --- a/html/man/ansible-playbook.5.html +++ b/html/man/ansible-playbook.5.html @@ -1,6 +1,6 @@ -ansible-modules

    Name

    ansible-playbook — format and function of an ansible playbook file

    DESCRIPTION

    Ansible ships with ansible-playbook, a tool for running playbooks. +ansible-modules

    Name

    ansible-playbook — format and function of an ansible playbook file

    DESCRIPTION

    Ansible ships with ansible-playbook, a tool for running playbooks. Playbooks can represent frequent tasks, desired system configurations, or deployment processes.

    FORMAT

    Playbooks are written in YAML.

    EXAMPLE

    See:

    • https://github.com/mpdehaan/ansible/blob/master/examples/playbook.yml diff --git a/html/man/ansible.1.html b/html/man/ansible.1.html index 3e3a035d46..eecdce5def 100644 --- a/html/man/ansible.1.html +++ b/html/man/ansible.1.html @@ -1,6 +1,6 @@ -ansible

      Name

      ansible — run a command somewhere else

      Synopsis

      ansible <host-pattern> [-f forks] [-m module_name] [-a args]

      DESCRIPTION

      Ansible is an extra-simple tool/framework/API for doing 'remote things' over +ansible

      Name

      ansible — run a command somewhere else

      Synopsis

      ansible <host-pattern> [-f forks] [-m module_name] [-a args]

      DESCRIPTION

      Ansible is an extra-simple tool/framework/API for doing 'remote things' over SSH.

      ARGUMENTS

      host-pattern
      diff --git a/html/modules.html b/html/modules.html index 9744dfea54..dd0d3c284f 100644 --- a/html/modules.html +++ b/html/modules.html @@ -24,7 +24,7 @@ - +
    • - previous |
    • Ansible v0.0.1 documentation »
    @@ -63,12 +63,14 @@ ansible playbooks.

    Examples of using modules with the Python API
    -
    -

    Module Idempotence

    +

    Nearly all modules take key=value parameters. Some modules take no parameters, and the command +module just takes arguments for the command you want to run.

    +

    All modules return JSON format data, thoug if you are using the command line or playbooks, you +don’t really need to know much about that.

    Most modules other than command are idempotent, meaning they will seek to avoid changes unless a change needs to be made. When using ansible playbooks, these modules can trigger change events. Unless otherwise noted, all modules support change hooks.

    -
    +

    Stock modules:

    command

    The command module takes the command name followed by a list of arguments, space delimited. @@ -76,15 +78,16 @@ This is the only module that does not use key=value style parameters.

    Example usage:

    /sbin/shutdown -t now
    +

    The given shell command will be executed on all selected nodes.

    This module does not support change hooks and returns the return code from the program as well as timing information about how long the command was running for.

    copy

    The copy module moves a file on the local box to remote locations.

    src:

    -

    Local absolute path to a file to copy to the remote server

    +

    Local path to a file to copy to the remote server. This can be an absolute or relative path.

    dest:

    -

    Remote absolute path where the file should end up

    +

    Remote absolute path where the file should end up.

    This module also returns md5sum information about the resultant file.

    @@ -93,11 +96,12 @@ This is the only module that does not use key=value style parameters.

    JSON data that can be useful for inventory purposes.

    Requires that ‘facter’ and ‘ruby-json’ be installed on the remote end.

    This module is informative only - it takes no parameters & does not support change hooks, -nor does it make any changes on the system.

    +nor does it make any changes on the system. Playbooks do not actually use +this module, they use the ‘setup’ module behind the scenes.

    git

    -

    Deploys software from git checkouts.

    +

    Deploys software (or files) from git checkouts.

    repo:

    git or http protocol address of the repo to checkout

    dest:

    @@ -112,13 +116,14 @@ data is a bit more verbose and nested than facter.

    Requires that ‘ohai’ be installed on the remote end.

    This module is information only - it takes no parameters & does not support change hooks, nor does it make any changes on the system.

    +

    Playbooks should not call the ohai module, playbooks call the ‘setup’ +module behind the scenes instead.

    ping

    A trivial test module, this module always returns the integer ‘1’ on successful contact.

    -

    This module does not support change hooks.

    -

    This module is informative only - it takes no parameters & does not +

    This module does not support change hooks and is informative only - it takes no parameters & does not support change hooks, nor does it make any changes on the system.

    @@ -135,14 +140,13 @@ are idempotent actions that will not run commands unless neccessary.

    setup

    Writes a JSON file containing key/value data, for use in templating. Call this once before using the template modules. Playbooks will -execute this module automatically as the first step in each play.

    +execute this module automatically as the first step in each play using +the variables section, so it is unneccessary to make explicit calls to +setup within a playbook.

    If facter or ohai are installed, variables from these programs will also be snapshotted into the JSON file for usage in templating. These variables -are prefixed with ‘facter‘ and ‘ohai” so it’s easy to tell their source.

    -

    metadata

    -

    Optionally overrides the default JSON file location of /etc/ansible/setup or ~/ansible/setup -depending on what remote user has been specified.

    -

    If used, also supply the metadata parameter to the template module.

    +are prefixed with ‘facter‘ and ‘ohai” so it’s easy to tell their source. +All variables are then bubbled up to the caller.

    anything

    any other parameters can be named basically anything, and set a key=value pair in the JSON file for use in templating.

    @@ -151,32 +155,39 @@ pair in the JSON file for use in templating.

    template

    Templates a file out to a remote server. Call the setup module prior to usage.

    src

    -

    path of a Jinja2 formatted template on the local server

    +

    path of a Jinja2 formatted template on the local server. This can be a relative +or absolute path.

    dest

    location to render the template on the remote server

    -

    metadata

    -

    location of a JSON file to use to supply template data. Default is /etc/ansible/setup -which is the same as the default for the setup module. Change if running as a non-root -remote user who does not have permissions on /etc/ansible.

    This module also returns md5sum information about the resultant file.

    -
    -

    user

    -

    This module is in plan.

    -
    -
    -

    yum

    -

    This module is in plan.

    -
    -

    writing your own modules

    +

    Writing your own modules

    To write your own modules, simply follow the convention of those already available in /usr/share/ansible. Modules must return JSON but can be written in any language. -Modules should return hashes, but hashes can be nested. -To support change hooks, modules should return hashes with a changed: True/False -element at the top level. Modules can also choose to indicate a failure scenario -by returning a top level ‘failure’ element with a True value, and a ‘msg’ element -describing the nature of the failure. Other values are up to the module.

    +Modules should return hashes, but hashes can be nested.

    +

    To support change hooks, modules should return hashes with a changed: True/False +element at the top level:

    +
    {
    +    'changed'   : True,
    +    'something' : 42
    +}
    +
    +
    +

    Modules can also choose to indicate a failure scenario by returning a top level ‘failure’ +element with a True value, and a ‘msg’ element describing the nature of the failure. +Other return values are up to the module.

    +
    +
    +
    {
    +
    ‘failure’ : True, +‘msg’ : “here is what happened...”
    +
    +

    }

    +
    +

    When shipping modules, drop them in /usr/share/ansible, or specify the module path to the +command line tool or API. It is easy to test modules by running them directly on +the command line, passing them arguments just like they would be passed with ansible.

    @@ -189,7 +200,6 @@ describing the nature of the failure. Other values are up to the module.

    Table Of Contents

    Previous topic

    -

    The Inventory File, Patterns, and Groups

    +

    Examples

    Next topic

    YAML Scripts

    @@ -244,7 +252,7 @@ describing the nature of the failure. Other values are up to the module.

    next |
  • - previous |
  • Ansible v0.0.1 documentation »
  • diff --git a/html/patterns.html b/html/patterns.html index 9ea3280552..321977cee6 100644 --- a/html/patterns.html +++ b/html/patterns.html @@ -23,7 +23,7 @@ - + @@ -34,7 +34,7 @@ index
  • - next |
  • Getting Started

    Next topic

    -

    Ansible Modules

    +

    Examples

    This Page

  • -

    Playbooks are a completely different way to use ansible and are particularly awesome. They are the basis for a really simple configuration management and deployment system, unlike any that already exist, and one that is very well suited to deploying complex multi-machine applications. While you might run the main ansible program for ad-hoc tasks, playbooks are more likely to be kept in source control and used to push out your configuration or assure the configurations of your remote systems are in spec.

    +

    Playbooks are a completely different way to use ansible and are particularly awesome.

    +

    They are the basis for a really simple configuration management and multi-machine deployment system, unlike any that already exist, and one that is very well suited to deploying complex applications.

    +

    While you might run the main /usr/bin/ansible program for ad-hoc tasks, playbooks are more likely to be kept in source control and used to push out your configuration or assure the configurations of your remote systems are in spec.

    Playbook Example

    Playbooks are expressed in YAML format and have a minimum of syntax. Each playbook is composed @@ -89,30 +91,39 @@ back on the webservers group, etc:

    Hosts line

    -

    The hosts line is alist of one or more groups or host patterns, seperated by colons, as -described in the ‘patterns’ documentation.

    +

    The hosts line is a list of one or more groups or host patterns, seperated by colons, as +described in the ‘patterns’ documentation. This is just like the first parameter to /usr/bin/ansible.

    Vars section

    -

    A list of variables that can be used in the templates, action lines, or included files. -Variables are deferenced using jinja2 syntax like this:

    -
    {{ varname }}
    -
    -

    These variables will be pushed down to the managed systems for use in templating operations, where -the way to dereference them in templates is exactly the same.

    +

    A list of variables and values that can be used in the plays. These can be used in templates +or ‘action’ lines and are dereferenced using `jinja2` syntax like this:

    +
    +
    {{ varname }}

    Further, if there are discovered variables about the system (say, if facter or ohai were installed) these variables bubble up back into the playbook, and can be used on each system just like explicitly set variables. Facter variables are prefixed with ‘facter_‘ -and Ohai variables are prefixed with ‘ohai_‘.

    +and Ohai variables are prefixed with ‘ohai_‘. So for instance, if I wanted to write the +hostname into the /etc/motd file, I could say:

    +
    +
      +
    • name: write the motd
    • +
    • action: template src=/srv/templates/motd.j2 dest=/etc/motd
    • +
    +
    +

    And in /srv/templates/motd.j2::

    +
    You are logged into {{ facter_hostname }}
    +
    +

    But we’re getting ahead of ourselves. Let’s talk about tasks.

    Tasks list

    Each play contains a list of tasks. Tasks are executed in order, one at a time, against -all machines matched by the play’s host pattern, before moving on to the next task. -Hosts with failed tasks are taken out of the rotation for the entire playbook. If things fail, -correct the problem and rerun. Modules other than command are idempotent, meaning if you -run them again, they will make the changes they are told to make to bring the system to -the desired state.

    +all machines matched by the play’s host pattern, before moving on to the next task.

    +

    Hosts with failed tasks are taken out of the rotation for the entire playbook. If things fail, +simply correct the playbook file and rerun.

    +

    Modules other than command are idempotent, meaning if you run them again, they will make the +changes they are told to make to bring the system to the desired state.

    Task name and action

    @@ -120,25 +131,58 @@ the desired state.

    The action line is the name of an ansible module followed by parameters. Usually these are expressed in key=value form, except for the command module, which looks just like a Linux/Unix command line. See the module documentation for more info.

    +

    Variables, as mentioned above, can be used in action lines. So if, hypothetically, you wanted +to make a directory on each system named after the hostname ... yeah, that’s I know silly ... you could +do it like so:

    +
    +
      +
    • name: make a directory
    • +
    • action: mkdir /tmp/{{ facter_hostname }}
    • +
    +

    Notify statements

    Nearly all modules are written to be ‘idempotent’ and can signal when they have affected a change on the remote system. If a notify statement is used, the named handler will be run against -each system where a change was effected, but NOT on systems where no change occurred.

    +each system where a change was effected, but NOT on systems where no change occurred. This happens +after all of the tasks are run. For example, if notifying Apache and potentially replacing lots of +configuration files, you could have Apache restart just once, at the end of a run. If you need +Apache restarted in the middle of a run, you could just make a task for it, no harm done. Notifiers +are optional.

    Handlers

    Handlers are lists of tasks, not really any different from regular tasks, that are referenced -by name.

    +by name. Handlers are what notifiers notify. If nothing notifies a handler, it will not run. +Regardless of how many things notify a handler, it will run only once, after all of the tasks +complete in a particular play.

    Includes

    Not all tasks have to be listed directly in the main file. An include file can contain a list of tasks (in YAML) as well, optionally passing extra variables into the file. -Variables passed in can be deferenced like this:

    +Variables passed in can be deferenced like this (assume a variable named ‘user’)

    -
    {{ variable }}
    +
    {{ user }}
    +

    For instance, if deploying multiple wordpress instances, I could contain all of my tasks +in a wordpress.yml file, and use it like so:

    +
    +
      +
    • +
      tasks:
      +
        +
      • include: wordpress.yml user=timmy
      • +
      • include: wordpress.yml user=alice
      • +
      • include: wordpress.yml user=bob
      • +
      +
      +
      +
    • +
    +
    +

    In addition to the explicitly passed in parameters, all variables from the vars section +are also available.

    Asynchronous Actions and Polling

    @@ -179,8 +223,8 @@ Variables passed in can be deferenced like this:

    YAML Scripts

    Next topic

    -

    Examples

    +

    API

    This Page

    diff --git a/html/searchindex.js b/html/searchindex.js index bc24daf1e4..8a94e8983a 100644 --- a/html/searchindex.js +++ b/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({objects:{},terms:{all:[0,1,2,3,4,5,7],rhoncu:[],donec:[],mcollect:1,prefix:[2,3,7],code:[1,2,7],lacu:[],follow:[5,2,3],scp:7,nunc:[],content:[0,1],middl:3,depend:[],fusc:[],elsewher:7,program:[1,2,3],certain:3,vel:[],blindingli:1,spec:3,sourc:[1,2,3,7],everi:[4,3],string:2,fals:[4,2],consequat:[],failur:[6,2],veri:[1,6,3],affect:3,risu:[],luctu:[],magic:[],level:[4,2],id_rsa:[0,7],list:[1,2,3,4,5,7,8],vivamu:[],item:4,ansible_librari:[],form:[4,3],dotnet:4,saltstack:1,mpdehaan:[],phasellu:[],ornar:[],alic:3,natur:2,seper:3,chef:1,second:[4,7],design:1,pass:[2,3],eleifend:[],further:3,even:7,what:[0,2,3],diam:[],favcolor:7,section:[1,2,3],abl:[],nec:[],abbrevi:4,version:[2,7],directori:[2,3],ever:1,method:6,metadata:[],tar:0,suscipit:[],hash:2,facter_hostnam:3,eckersberg:4,here:2,leo:[],let:[3,7],address:[5,2],path:2,sinc:7,valu:[4,2,3],aliquam:[],scelerisqu:[],great:1,purpos:2,plai:[2,3],ahead:3,precursor:1,larger:[],technolog:1,host:[0,1,2,3,5,6,7],adipisc:[],prior:2,venenati:[],web1:6,permit:4,action:[1,2,3],nulla:[],bob:3,commonli:7,ourselv:3,iaculi:[],via:[0,1],regardless:[4,1,3],dictionari:4,accumsan:[],extra:3,modul:[0,1,2,3,6,7],prefer:[],put:[0,7],unix:3,api:[1,6,2],instal:[7,0,2,3,1],select:[1,2,3,5],httpd:[3,7],from:[0,1,2,3,4,7],describ:[2,3],would:[2,7],commun:1,visit:1,two:[4,0,5],noarch:0,suit:3,dehaan:1,call:2,usr:[2,3,7],taken:3,sagitti:[],basi:3,checkout:2,until:0,more:[0,5,2,3,1],desir:3,idempot:[2,3,7],dbserver:5,unneccessari:2,about:[4,1,2,3],agent:[0,7],particular:[1,3],easiest:1,must:[4,2,3],sshd:1,none:[],join:1,ibm:1,module_arg:6,habitass:[],setup:[1,2,7],work:[1,7,5],critic:1,remain:1,tag:[0,2],can:[0,1,2,3,4,5,6,7],learn:[0,5,3,1],ero:[],root:[4,1,3],pick:4,control:[1,2,3,7],myapp:7,yamllint:4,ultric:[],process:[1,7],rpath:1,sudo:0,share:2,templat:[7,0,2,3,1],othervar:3,knows_oop:4,minimum:3,want:[6,2,3],occur:3,nullam:[],alwai:2,multipl:[5,3,7],newlin:4,puru:[],sit:[],capistrano:1,ping:[0,6,2,1],write:[4,1,2,3,7],how:[0,2,3,4,5,6],etiam:[],yum:[],simpl:[4,1,6,3,7],updat:7,arcu:[],express:[4,1,6,3],referenc:[5,3],clone:0,after:[3,7],usabl:1,tristiqu:[],ohai_:3,mai:[4,0],end:[2,3],data:[4,6,2,7],grow:[],man:[1,8],repo:[2,7],"short":1,orchestr:[0,1,2,3,5,7],thoug:2,read:[4,0],bootstrap:1,favorit:1,turpi:[],element:[4,2],issu:1,inform:[2,3],mango:4,combin:4,asynchron:[1,3],order:3,talk:[0,3],origin:1,help:1,over:1,move:[2,3],orang:4,becaus:[],elit:4,rpmbuild:0,comma:4,vita:[],still:[],paramet:[2,3],facter_:3,jid:7,overlord:0,group:[1,6,3,5],cli:6,fit:[],befor:[2,3],yaml:[4,1,3],pend:[3,7],rapidli:6,infrastructur:[1,5],mail:[1,5],sapien:[],main:3,might:3,easier:[],non:1,"return":[1,6,2],thei:[6,2,3,7],food:4,alist:[],nibh:[],egesta:[],"break":[],framework:[1,6],jinja2:[0,2,3,7],instead:2,now:[0,2],nor:2,choic:1,multiprocess:0,name:[4,1,2,3,7],anyth:2,neccessari:[2,7],config:[1,3],viverra:[],drop:2,datastructur:6,porta:[],separ:4,each:[4,2,3,7],puppet:1,stock:2,nearli:[2,3],mean:[2,3],harm:3,metu:[],michael:1,auctor:[],idea:1,realli:[4,2,3],contributor:[],backport:0,connect:[],our:4,happen:[2,3],todo:[],event:2,out:[4,1,2,3,7],variabl:[2,3,7],"try":0,shown:[],network:1,space:[1,2],reboot:7,bubbl:[2,3],stuff:7,rel:2,internet:1,correct:[4,1,3],red:[1,7],rotat:3,state:[2,3,7],hendrerit:[],ntp:7,contain:[2,3],given:[2,7],pub:7,base:[1,3],lab:1,tempu:[],qui:[],org:0,molli:[],bash:[0,7],care:[],vestibulum:[],pyyaml:0,indent:4,maecena:[],could:[6,3],fqdn:7,thing:[1,3],place:1,isn:1,releas:0,principl:[],licens:[],first:[7,0,2,3,1],oper:[1,7],softwar:[1,2,7],rang:1,notifi:[1,3,7],obviou:1,onc:[2,3],number:2,yourself:0,hook:2,instruct:0,alreadi:[2,3],done:3,fast:1,enim:[],massiv:1,open:[],straight:7,differ:[7,0,3,1],convent:2,script:[4,1,6,3,7],associ:4,top:2,mkdir:3,system:[0,1,2,3,5,7],messag:6,parallel:[1,7],too:1,statement:[1,3],molesti:[],john:4,banana:4,includ:[1,3],shell:[1,2,7],option:[4,8,3,7],welcom:1,tool:[1,2,7],copi:[1,2,7],specifi:[4,2,7],quam:[],next:3,github:[0,1],kept:3,exactli:[],than:[0,2,3,7],serv:[],liter:2,silli:3,target:[1,5],provid:4,sollicitudin:[],heavyweight:[],structur:4,charact:4,project:[0,7,1],architect:1,were:3,minut:[],uses_cv:4,pre:0,sai:3,runner:6,explicit:2,ani:[1,6,2,3,7],spent:[],ant:[],download:0,have:[0,3,1],need:[4,0,2,3,7],tellu:[],seek:2,paramiko:0,engin:7,built:0,contact:[0,6,2],note:[5,2,7],also:[0,1,2,3,4,5,7],client:1,massa:[],build:[0,6],indic:2,environ:[],divers:1,pulvinar:[],begin:4,sure:[],unless:2,distribut:[0,1],deploy:[0,1,2,3,5,7],track:7,who:[],discov:3,most:[4,2],employe:4,regular:3,plan:[],deploi:[1,2,3,7],pair:2,why:1,porttitor:[],simplic:[],don:2,doc:1,later:7,lectu:[],doe:[1,2,5],sodal:[],bracket:[4,5],snapshot:2,clojur:[],wildcard:5,dolor:[],someth:[1,2,7],awesom:[1,3],laoreet:[],blandit:[],verbos:2,syntax:[4,3],bring:3,directli:[2,3,7],raleigh:1,particularli:3,playbook:[0,1,2,3,4,5,6,7],permiss:[],hack:1,radic:1,pki:[],trivial:[1,2],varnam:3,involv:1,absolut:2,onli:[0,2,3,7],explicitli:3,locat:2,just:[7,0,2,3,1],pretti:6,configur:[0,1,2,3,4,5,7],apach:[3,7],written:[1,2,3,7],should:[4,2],consectetur:[],somevar:3,congratul:0,variu:[],local:2,yml:3,long_running_oper:7,contribut:1,variou:[],get:[4,0,3,7,1],financ:1,stop:2,mission:1,bibendum:[],ssl:[],ssh:[0,7],malesuada:[],requir:[0,2,1],uvh:0,nisi:[],bar:5,lame:4,nisl:[],remot:[0,2,3,7],cra:[],orci:[],through:[0,2,1],told:3,where:[1,2,3],wrote:[],view:[1,8],set:[2,3],creator:[],elimin:[],see:[0,1,2,3,4,5,7],sed:[],result:[6,2],fail:3,sem:[],extend:1,ntp_server:7,faucibu:[],statu:7,kei:[4,0,2,3],databas:3,modularli:[],discoveri:2,restart:[2,3,7],behind:2,won:7,languag:[4,0,5,2,1],between:4,"import":6,irc:1,altern:7,elementum:[],manpag:[0,8],handful:[],aspir:[],style:2,extens:1,job:[4,7],entir:3,aserv:0,magna:[],webapp:7,amet:[],addit:[4,1,3],delimit:2,plugin:[],goal:1,against:[1,3,5],tempor:[],etc:[7,0,5,3,1],instanc:3,mani:[3,7],placerat:[],com:[0,6,5],proin:[],sha:2,assur:3,simpli:[2,3],author:1,overview:4,format:[7,1,2,3,5],inspir:[],header:5,colon:3,shutdown:2,linux:[1,3],typic:7,poll:[1,3,7],rpm:[0,1],matti:[],dui:[],compos:3,pretium:[],multiplay:1,morbi:[],three:5,been:1,timmi:3,json:[1,6,2],much:[1,2],basic:[4,0,5,2,1],ungroup:[],feugiat:[],quickli:[4,1],box:[1,2],derefer:[],fire:1,rubi:[4,2,7],vulput:[],argument:2,understand:[],pellentesqu:[],func:1,atlanta:7,job_statu:7,those:[4,2],emploi:4,authorized_kei:0,multi:[1,3],tortor:[],look:[5,3,7],nequ:[],hoc:[1,3],servic:[1,2,3,7],md5sum:2,batch:[],"while":3,overrid:[],abov:3,ipsum:[],cobbler:1,scene:2,real:0,motd:[3,7],max_client:3,them:[2,3,7],erat:[],conf:[3,7],module_nam:6,ship:2,sever:4,http_port:3,develop:[4,0,1],inventori:[1,2,3,5],minim:0,make:[0,2,3,7],platea:[],same:[4,5,7],member:4,python:[0,1,2,4,6,7],complex:[1,3],success:2,fedora:[],document:[0,6,3,7],ansibl:[0,1,2,3,4,5,6,7,8],complet:3,finish:[],http:2,hostnam:3,again:3,nest:2,painless:1,effect:3,dai:[],fruit:4,user:3,ownership:[],extrem:0,php:7,distutil:[0,1],implement:6,squar:4,exceedingli:[],task:[1,3,7],off:1,scenario:2,mention:3,whole:[],well:[0,2,3],hypothet:3,exampl:[0,1,2,3,4,5,6,7],command:[0,1,2,3,5,7,8],thi:[0,1,2,3,4,5,7],choos:2,dereferenc:3,usual:3,comment:[],protocol:2,execut:[1,2,3],less:[0,1],when:[2,3,7],kill:7,skill:4,simultan:7,ligula:[],previous:[],web:[6,7],versu:1,easi:[1,2],mix:5,trigger:2,hac:[],except:3,littl:1,add:[0,7],other:[7,0,2,3,1],els:1,unlik:3,hat:1,match:3,take:2,bin:[2,3,7],applic:[6,3],which:[4,0,5,3,1],ohai:[1,2,3,7],dest:[2,3,7],tincidunt:[],dark:6,game:1,know:[4,2,3],background:[1,7],world:0,bit:2,daemon:1,motorola:1,like:[4,5,2,3,7],specif:[5,6,7],signal:3,manual:[],integ:2,noth:3,edit:0,"boolean":4,either:2,velit:[],popular:1,async:[],page:[4,0,8,1],deal:[],webserv:[5,3,7],suppli:[],some:[0,2],back:3,dead:1,tumblr:[],home:[],server:[1,2,3,7],librari:[],tmp:[3,7],render:2,assum:3,avoid:2,though:1,ultrici:[],per:6,tracker:1,unit:[],pattern:[1,6,3,5],foo:[5,7],complic:1,refer:7,machin:[0,2,3,7],core:1,run:[0,6,2,3,7],power:[1,6],quit:[],lose:7,usag:[2,7],asciidoc:0,web2:6,step:[2,3],explor:0,repositori:0,output:3,"super":1,aenean:[],simpler:7,comparison:1,sbin:[2,7],actual:2,gplv3:[],justo:[],libero:[],surround:4,manag:[0,1,2,3,4,5,7],srv:[3,7],quisqu:[],industri:1,own:[1,2,3],"final":4,bounc:2,within:2,automat:2,upgrad:7,down:[],ensur:[3,7],chang:[2,3,7],perl:7,bserver:0,your:[0,1,2,3,4,5,7],praesent:[],git:[0,2,7,1],type:6,fabric:1,wai:[4,0,3,7],interdum:[],transfer:[1,7],dictum:[],support:[2,7],question:1,"long":[1,2,7],happi:1,avail:[0,8,2,3,7],start:[0,1,2,3,4,7],appl:4,wordpress:3,augu:[],lot:[1,3,7],replac:3,"var":[1,3],individu:5,fork:6,head:[2,7],doctyp:[],simplejson:0,eget:[],handler:[1,3,7],lint:4,yeah:3,msg:2,loborti:[],ullamcorp:[],line:[1,2,3,4,7,8],"true":[4,2],freenod:1,info:3,strawberri:4,made:[2,7],possibl:[5,3,7],whether:6,wish:[4,0,5],caller:2,tell:[2,7],planet:1,record:4,below:[],limit:[1,7],suspendiss:[],rerun:3,otherwis:2,problem:[],similar:2,chip:1,facter:[1,2,3,7],curv:1,featur:3,tasti:4,creat:1,cover:7,doesn:1,repres:4,ansil:[],deferenc:3,file:[0,1,2,3,4,5,7],mauri:[],exist:[1,3],check:[2,7],urna:[],conval:[],denot:5,googl:1,excel:1,nam:[],"default":[1,5],likes_emac:4,futur:0,dignissim:[],test:[0,2],you:[0,1,2,3,4,5,7],node:[0,2,7,1],dapibu:[],journei:[],gravida:[],sequenc:1,devop:1,push:3,est:[],log:3,feli:[],aliquet:[],src:[2,3,7],lorem:[],"60k":1,dictumst:[],sphinx:0,rutrum:[],anywher:[],descript:[],portion:5,emerg:1,potenti:3,time:[0,1,2,3,5,7],far:1,serious:[],fermentum:[]},objtypes:{},titles:["Getting Started","Ansible","Ansible Modules","Playbooks: Ansible for Deployment, Configuration Management, and Orchestration","YAML Scripts","The Inventory File, Patterns, and Groups","API","Examples","Man Pages"],objnames:{},filenames:["gettingstarted","index","modules","playbooks","YAMLScripts","patterns","api","examples","man"]}) \ No newline at end of file +Search.setIndex({objects:{},terms:{all:[0,1,2,3,4,5,7],rhoncu:[],func:1,perl:7,mcollect:1,prefix:[2,3,7],code:[1,2,7],lacu:[],follow:[5,2,3],scp:7,nunc:[],content:[0,1],middl:3,depend:[],elsewher:7,specif:[5,6,7],program:[1,2,3],vel:[],blindingli:1,spec:3,sourc:[1,2,3,7],everi:[4,3],string:2,fals:[4,2],consequat:[],failur:[6,2],veri:[1,6,3],affect:3,risu:[],luctu:[],mauri:[],magic:[],max_client:3,level:[4,2],id_rsa:[0,7],list:[1,2,3,4,5,7,8],vivamu:[],item:4,ansible_librari:[],dotnet:4,saltstack:1,phasellu:[],ornar:[],alic:3,natur:2,seper:3,chef:1,second:[4,7],design:1,pass:[2,3],eleifend:[],further:3,even:7,what:[0,2,3],diam:[],favcolor:7,section:[1,2,3],abl:[],nec:[],abbrevi:4,version:[2,7],directori:[2,3],ever:1,method:6,metadata:[],suscipit:[],hash:2,abov:3,eckersberg:4,lectu:[],here:2,leo:[],let:[3,7],address:[5,2],path:2,sinc:7,valu:[4,2,3],aliquam:[],scelerisqu:[],great:1,purpos:2,plai:[2,3],ahead:3,precursor:1,larger:[],technolog:1,step:[2,3],adipisc:[],prior:2,venenati:[],permit:4,action:[1,2,3],nulla:[],implement:6,commonli:7,ourselv:3,iaculi:[],via:[0,1],regardless:[4,1,3],tempu:[],extra:3,modul:[0,1,2,3,6,7],prefer:[],releas:0,unix:3,api:[1,6,2],instal:[7,0,2,3,1],should:[4,2],select:[1,2,3,5],httpd:[3,7],from:[0,1,2,3,4,7],describ:[2,3],would:[2,7],commun:1,visit:1,two:[4,0,5],noarch:0,ohai:[1,2,3,7],dehaan:1,call:2,usr:[2,3,7],taken:3,sagitti:[],care:[],checkout:2,until:0,more:[0,5,2,3,1],desir:3,idempot:[2,3,7],dbserver:5,unneccessari:2,sbin:[2,7],agent:[0,7],particular:[1,3],easiest:1,must:[4,2,3],none:[],join:1,ibm:1,module_arg:6,dest:[2,3,7],habitass:[],setup:[1,2,7],work:[1,7,5],critic:1,remain:1,tag:[0,2],can:[0,1,2,3,4,5,6,7],learn:[0,5,3,1],about:[4,1,2,3],ero:[],root:[4,1,3],control:[1,2,3,7],conf:[3,7],yamllint:4,ultric:[],process:[1,7],rpath:1,sudo:0,share:2,templat:[7,0,2,3,1],libero:[],knows_oop:4,minimum:3,want:[6,2,3],occur:3,nullam:[],alwai:2,multipl:[5,3,7],newlin:4,puru:[],sit:[],capistrano:1,ping:[0,6,2,1],write:[4,1,2,3,7],how:[0,2,3,4,5,6],etiam:[],instead:2,config:[1,3],stock:2,arcu:[],financ:1,referenc:[5,3],clone:0,after:[3,7],lab:1,befor:[2,3],ohai_:3,contribut:1,mai:[4,0],end:[2,3],associ:4,grow:[],man:[1,8],bibendum:[],"short":1,orchestr:[0,1,2,3,5,7],thoug:2,bootstrap:1,favorit:1,turpi:[],element:[4,2],issu:1,inform:[2,3],mango:4,combin:4,order:3,talk:[0,3],origin:1,help:1,over:1,move:[2,3],orang:4,becaus:[],elit:4,rpmbuild:0,comma:4,vita:[],still:[],paramet:[2,3],facter_:3,jid:7,overlord:0,group:[1,6,3,5],cli:6,fit:[],conval:[],yaml:[4,1,3],pend:[3,7],rapidli:6,infrastructur:[1,5],mail:[1,5],sapien:[],main:3,might:3,easier:[],non:1,"return":[1,6,2],thei:[6,2,3,7],food:4,alist:[],nibh:[],egesta:[],"break":[],framework:[1,6],jinja2:[0,2,3,7],now:[0,2],nor:2,choic:1,multiprocess:0,name:[4,1,2,3,7],anyth:2,neccessari:[2,7],simpl:[4,1,6,3,7],viverra:[],drop:2,instruct:0,porta:[],separ:4,exampl:[0,1,2,3,4,5,6,7],each:[4,2,3,7],puppet:1,updat:7,rotat:3,mean:[2,3],harm:3,metu:[],michael:1,auctor:[],idea:1,realli:[4,2,3],ensur:[3,7],backport:0,connect:[],our:4,happen:[2,3],todo:[],event:2,out:[4,1,2,3,7],variabl:[2,3,7],"try":0,shown:[],network:1,space:[1,2],reboot:7,bubbl:[2,3],cra:[],rel:2,internet:1,correct:[4,1,3],red:[1,7],painless:1,hendrerit:[],ntp:7,orci:[],given:[2,7],pub:7,base:[1,3],usabl:1,dictionari:4,qui:[],org:0,molli:[],bash:[0,7],basi:3,vestibulum:[],pyyaml:0,indent:[],maecena:[],could:[6,3],put:[0,7],fqdn:7,thing:[1,3],yum:[],isn:1,principl:[],top:2,first:[7,0,2,3,1],oper:[1,7],softwar:[1,2,7],rang:1,notifi:[1,3,7],obviou:1,onc:[2,3],number:2,yourself:0,hook:2,datastructur:6,alreadi:[2,3],done:3,"long":[1,2,7],enim:[],massiv:1,open:[],differ:[7,0,3,1],praesent:[],convent:2,script:[1,6,7],data:[4,6,2,7],licens:[],mkdir:3,system:[0,1,2,3,5,7],messag:6,parallel:[1,7],inventori:[1,2,3,5],appl:4,too:1,statement:[1,3],molesti:[],john:4,banana:4,shell:[1,2,7],option:[4,8,3,7],behind:2,tool:[1,2,7],copi:[1,2,7],specifi:[4,2,7],quam:[],github:[0,1],off:1,exactli:[],than:[0,2,3,7],serv:[],liter:2,silli:3,target:[1,5],provid:4,sollicitudin:[],heavyweight:[],structur:4,charact:4,project:[0,7,1],architect:1,were:3,tion:4,uses_cv:4,pre:0,sai:3,runner:6,explicit:2,argument:2,hypothet:3,ant:[],download:0,have:[0,3,1],need:[4,0,2,3,7],tellu:[],seek:2,paramiko:0,engin:7,built:0,note:[5,2,7],also:[0,1,2,3,4,5,7],client:1,massa:[],build:[0,6],indic:2,environ:[],divers:1,pulvinar:[],begin:4,sure:[],unless:2,distribut:[0,1],deploy:[0,1,2,3,5,7],track:7,who:[],discov:3,most:[4,2],employe:4,regular:3,plan:[],deploi:[1,2,3,7],pair:2,why:1,porttitor:[],simplic:[],don:2,doc:1,later:7,cover:7,doe:[1,2,5],sodal:[],bracket:[4,5],snapshot:2,place:1,wildcard:5,dolor:[],modularli:[],awesom:[1,3],laoreet:[],blandit:[],verbos:2,syntax:[4,3],bring:3,directli:[2,3,7],raleigh:1,particularli:3,playbook:[0,1,2,3,4,5,6,7],permiss:[],hack:1,radic:1,pki:[],trivial:[1,2],varnam:3,involv:1,absolut:2,onli:[0,2,3,7],explicitli:3,locat:2,execut:[1,2,3],pretti:6,configur:[0,1,2,3,4,5,7],apach:[3,7],written:[1,2,3,7],accumsan:[],consectetur:[],somevar:3,freenod:1,variu:[],local:2,yml:3,long_running_oper:7,nearli:[2,3],variou:[],get:[4,0,3,7,1],express:[4,1,6,3],stop:2,mission:1,repo:[2,7],ssl:[],timmi:3,ssh:[0,7],malesuada:[],requir:[0,2,1],uvh:0,nisi:[],bar:5,lame:4,nisl:[],remot:[0,2,3,7],stuff:7,contain:[2,3],through:[0,2,1],told:3,where:[1,2,3],wrote:[],view:[1,8],user:3,set:[2,3],creator:[],elimin:[],see:[0,1,2,3,4,5,7],sed:[],result:[6,2],fail:3,sem:[],extend:1,servic:[1,2,3,7],faucibu:[],statu:7,manpag:[0,8],databas:3,someth:[1,2,7],discoveri:2,restart:[2,3,7],state:[2,3,7],won:7,ligula:[],between:4,"import":6,irc:1,altern:7,elementum:[],kei:[4,0,2,3],handful:[],aspir:[],style:2,extens:1,job:[4,7],entir:3,aserv:0,magna:[],webapp:7,minut:[],addit:[4,1,3],delimit:2,plugin:[],goal:1,against:[1,3,5],tempor:[],etc:[7,0,5,3,1],instanc:3,mani:[3,7],placerat:[],planet:1,com:[0,6,5],proin:[],sha:2,skill:4,assur:3,simpli:[2,3],overview:4,inspir:[],header:5,colon:3,shutdown:2,linux:[1,3],poll:[1,3,7],rpm:[0,1],matti:[],dui:[],pretium:[],multiplay:1,morbi:[],three:5,been:1,amet:[],json:[1,6,2],much:[1,2],far:1,basic:[4,0,5,2,1],ungroup:[],feugiat:[],quickli:[4,1],indenta:4,box:[1,2],wish:[4,0,5],derefer:[],fire:1,rubi:[4,2,7],vulput:[],ani:[1,6,2,3,7],upgrad:7,likes_emac:4,understand:[],pellentesqu:[],donec:[],minim:0,atlanta:7,job_statu:7,those:[4,2],emploi:4,authorized_kei:0,multi:[1,3],tortor:[],look:[5,3,7],replac:3,hoc:[1,3],straight:7,md5sum:2,batch:[],"while":3,overrid:[],facter_hostnam:3,ipsum:[],cobbler:1,scene:2,bin:[2,3,7],motd:[3,7],tar:0,them:[2,3,7],erat:[],myapp:7,module_nam:6,ship:2,sever:4,http_port:3,develop:[4,0,1],welcom:1,author:1,make:[0,2,3,7],platea:[],same:[4,5,7],member:4,python:[0,1,2,4,6,7],complex:[1,3],fedora:[],document:[0,6,3,7],ansibl:[0,1,2,3,4,5,6,7,8],complet:3,finish:[],http:2,hostnam:3,denot:5,nest:2,pick:4,effect:3,dai:[],fruit:4,fusc:[],ownership:[],extrem:0,php:7,distutil:[0,1],typic:7,squar:4,exceedingli:[],task:[1,3,7],kept:3,scenario:2,mention:3,whole:[],well:[0,2,3],spent:[],contact:[0,6,2],command:[0,1,2,3,5,7,8],thi:[0,1,2,3,4,5,7],choos:2,dereferenc:3,usual:3,explor:0,comment:[],protocol:2,just:[7,0,2,3,1],less:[0,1],excel:1,kill:7,ntp_server:7,simultan:7,languag:[4,0,5,2,1],previous:[],web:[6,7],versu:1,easi:[1,2],mix:5,hac:[],except:3,littl:1,add:[0,7],simplejson:0,els:1,unlik:3,hat:1,match:3,take:2,real:0,applic:[6,3],which:[4,0,5,3,1],format:[1,2,3,4,5,7],read:[4,0],tincidunt:[],dark:6,game:1,know:[4,2,3],background:[1,7],world:0,bit:2,daemon:1,motorola:1,like:[4,5,2,3,7],success:2,signal:3,manual:[],integ:2,noth:3,edit:0,"boolean":4,either:2,velit:[],popular:1,async:[],page:[4,0,8,1],deal:[],webserv:[5,3,7],suppli:[],some:[0,2],back:3,dead:1,tumblr:[],home:[],server:[1,2,3,7],librari:[],tmp:[3,7],render:2,augu:[],assum:3,avoid:2,though:1,ultrici:[],per:6,tracker:1,unit:[],pattern:[1,6,3,5],foo:[5,7],complic:1,refer:7,machin:[0,2,3,7],core:1,run:[0,6,2,3,7],power:[1,6],quit:[],lose:7,usag:[2,7],devop:1,web2:6,host:[0,1,2,3,5,6,7],web1:6,repositori:0,output:3,"super":1,aenean:[],simpler:7,comparison:1,sshd:1,actual:2,gplv3:[],justo:[],othervar:3,surround:4,manag:[0,1,2,3,4,5,7],srv:[3,7],quisqu:[],industri:1,own:[1,2,3],"final":4,bounc:2,within:2,automat:2,compos:3,down:[],contributor:[],chang:[2,3,7],next:3,bserver:0,your:[0,1,2,3,4,5,7],mpdehaan:[],git:[0,2,7,1],fabric:1,wai:[4,0,3,7],interdum:[],transfer:[1,7],dictum:[],support:[2,7],question:1,fast:1,happi:1,avail:[0,8,2,3,7],start:[0,1,2,3,4,7],trigger:2,wordpress:3,includ:[1,3],lot:[1,3,7],suit:3,"var":[1,3],individu:5,fork:6,head:[2,7],doctyp:[],form:[4,3],eget:[],handler:[1,3,7],lint:4,yeah:3,msg:2,loborti:[],ullamcorp:[],line:[1,2,3,4,7,8],"true":[4,2],tristiqu:[],congratul:0,info:3,strawberri:4,made:[2,7],possibl:[5,3,7],whether:6,type:6,caller:2,tell:[2,7],asynchron:[1,3],record:4,below:[],limit:[1,7],suspendiss:[],rerun:3,otherwis:2,problem:[],similar:2,chip:1,facter:[1,2,3,7],curv:1,featur:3,tasti:4,creat:1,certain:3,doesn:1,repres:4,ansil:[],deferenc:3,file:[0,1,2,3,4,5,7],bob:3,exist:[1,3],check:[2,7],urna:[],nequ:[],again:3,googl:1,when:[2,3,7],nam:[],"default":[1,5],other:[7,0,2,3,1],futur:0,dignissim:[],test:[0,2],you:[0,1,2,3,4,5,7],clojur:[],node:[0,2,7,1],dapibu:[],journei:[],gravida:[],sequenc:1,asciidoc:0,est:[],log:3,feli:[],aliquet:[],src:[2,3,7],lorem:[],"60k":1,dictumst:[],sphinx:0,rutrum:[],anywher:[],descript:[],portion:5,emerg:1,potenti:3,time:[0,1,2,3,5,7],push:3,serious:[],fermentum:[]},objtypes:{},titles:["Getting Started","Ansible","Ansible Modules","Playbooks: Ansible for Deployment, Configuration Management, and Orchestration","YAML Format","The Inventory File, Patterns, and Groups","API","Examples","Man Pages"],objnames:{},filenames:["gettingstarted","index","modules","playbooks","YAMLScripts","patterns","api","examples","man"]}) \ No newline at end of file From 7a4df9e2fc4b827e785dc30e649a75c7ce621df7 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 8 Mar 2012 23:05:52 -0500 Subject: [PATCH 08/11] RST reformatting a few things --- rst/gettingstarted.rst | 12 ++++++++++-- rst/playbooks.rst | 12 ++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/rst/gettingstarted.rst b/rst/gettingstarted.rst index 0024abcf71..6bbb317724 100644 --- a/rst/gettingstarted.rst +++ b/rst/gettingstarted.rst @@ -84,13 +84,21 @@ key in ``authorized_keys``:: aserver.example.org bserver.example.org -Now try this: +Set up SSH agent to avoid retyping passwords:: ssh-agent bash ssh-add ~/.ssh/id_rsa + +Now ping all your nodes:: + ansible all -m ping +Now run a live command on all of your nodes:: + + ansible all /bin/echo hello + Congratulations. You've just contacted your nodes with Ansible. It's now time to read some of the more real-world examples, and explore what you can do with different modules, as well -as the Ansible playbooks language. +as the Ansible playbooks language. Ansible is not just about running commands, but you already +have a working infrastructure! diff --git a/rst/playbooks.rst b/rst/playbooks.rst index 7cbdd48e74..71d87d3ee0 100644 --- a/rst/playbooks.rst +++ b/rst/playbooks.rst @@ -54,7 +54,7 @@ Vars section ```````````` A list of variables and values that can be used in the plays. These can be used in templates -or 'action' lines and are dereferenced using ```jinja2``` syntax like this: +or 'action' lines and are dereferenced using ```jinja2``` syntax like this:: {{ varname }} @@ -62,12 +62,12 @@ Further, if there are discovered variables about the system (say, if facter or o installed) these variables bubble up back into the playbook, and can be used on each system just like explicitly set variables. Facter variables are prefixed with 'facter_' and Ohai variables are prefixed with 'ohai_'. So for instance, if I wanted to write the -hostname into the /etc/motd file, I could say: +hostname into the /etc/motd file, I could say:: - name: write the motd - action: template src=/srv/templates/motd.j2 dest=/etc/motd -And in /srv/templates/motd.j2::: +And in /srv/templates/motd.j2:: You are logged into {{ facter_hostname }} @@ -96,7 +96,7 @@ command line. See the module documentation for more info. Variables, as mentioned above, can be used in action lines. So if, hypothetically, you wanted to make a directory on each system named after the hostname ... yeah, that's I know silly ... you could -do it like so: +do it like so:: - name: make a directory - action: mkdir /tmp/{{ facter_hostname }} @@ -125,12 +125,12 @@ Includes Not all tasks have to be listed directly in the main file. An include file can contain a list of tasks (in YAML) as well, optionally passing extra variables into the file. -Variables passed in can be deferenced like this (assume a variable named 'user') +Variables passed in can be deferenced like this (assume a variable named 'user'):: {{ user }} For instance, if deploying multiple wordpress instances, I could contain all of my tasks -in a wordpress.yml file, and use it like so: +in a wordpress.yml file, and use it like so:: - tasks: - include: wordpress.yml user=timmy From fe2d1c7cc962a4d85ed00de2785c226d3db81813 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 8 Mar 2012 23:06:07 -0500 Subject: [PATCH 09/11] Docs rebuild --- html/_sources/gettingstarted.txt | 12 ++++++-- html/_sources/playbooks.txt | 12 ++++---- html/gettingstarted.html | 18 ++++++++---- html/man/ansible-modules.5.html | 2 +- html/man/ansible-playbook.5.html | 2 +- html/man/ansible.1.html | 2 +- html/playbooks.html | 49 +++++++++++--------------------- html/searchindex.js | 2 +- 8 files changed, 49 insertions(+), 50 deletions(-) diff --git a/html/_sources/gettingstarted.txt b/html/_sources/gettingstarted.txt index 0024abcf71..6bbb317724 100644 --- a/html/_sources/gettingstarted.txt +++ b/html/_sources/gettingstarted.txt @@ -84,13 +84,21 @@ key in ``authorized_keys``:: aserver.example.org bserver.example.org -Now try this: +Set up SSH agent to avoid retyping passwords:: ssh-agent bash ssh-add ~/.ssh/id_rsa + +Now ping all your nodes:: + ansible all -m ping +Now run a live command on all of your nodes:: + + ansible all /bin/echo hello + Congratulations. You've just contacted your nodes with Ansible. It's now time to read some of the more real-world examples, and explore what you can do with different modules, as well -as the Ansible playbooks language. +as the Ansible playbooks language. Ansible is not just about running commands, but you already +have a working infrastructure! diff --git a/html/_sources/playbooks.txt b/html/_sources/playbooks.txt index 7cbdd48e74..71d87d3ee0 100644 --- a/html/_sources/playbooks.txt +++ b/html/_sources/playbooks.txt @@ -54,7 +54,7 @@ Vars section ```````````` A list of variables and values that can be used in the plays. These can be used in templates -or 'action' lines and are dereferenced using ```jinja2``` syntax like this: +or 'action' lines and are dereferenced using ```jinja2``` syntax like this:: {{ varname }} @@ -62,12 +62,12 @@ Further, if there are discovered variables about the system (say, if facter or o installed) these variables bubble up back into the playbook, and can be used on each system just like explicitly set variables. Facter variables are prefixed with 'facter_' and Ohai variables are prefixed with 'ohai_'. So for instance, if I wanted to write the -hostname into the /etc/motd file, I could say: +hostname into the /etc/motd file, I could say:: - name: write the motd - action: template src=/srv/templates/motd.j2 dest=/etc/motd -And in /srv/templates/motd.j2::: +And in /srv/templates/motd.j2:: You are logged into {{ facter_hostname }} @@ -96,7 +96,7 @@ command line. See the module documentation for more info. Variables, as mentioned above, can be used in action lines. So if, hypothetically, you wanted to make a directory on each system named after the hostname ... yeah, that's I know silly ... you could -do it like so: +do it like so:: - name: make a directory - action: mkdir /tmp/{{ facter_hostname }} @@ -125,12 +125,12 @@ Includes Not all tasks have to be listed directly in the main file. An include file can contain a list of tasks (in YAML) as well, optionally passing extra variables into the file. -Variables passed in can be deferenced like this (assume a variable named 'user') +Variables passed in can be deferenced like this (assume a variable named 'user'):: {{ user }} For instance, if deploying multiple wordpress instances, I could contain all of my tasks -in a wordpress.yml file, and use it like so: +in a wordpress.yml file, and use it like so:: - tasks: - include: wordpress.yml user=timmy diff --git a/html/gettingstarted.html b/html/gettingstarted.html index e0e01f7e24..c8cec27bb3 100644 --- a/html/gettingstarted.html +++ b/html/gettingstarted.html @@ -126,14 +126,20 @@ key in authorized_keys
    -

    Now try this:

    -
    -
    ssh-agent bash -ssh-add ~/.ssh/id_rsa -ansible all -m ping
    +

    Set up SSH agent to avoid retyping passwords:

    +
    ssh-agent bash
    +ssh-add ~/.ssh/id_rsa
    +
    +

    Now ping all your nodes:

    +
    ansible all -m ping
    +
    +

    Now run a live command on all of your nodes:

    +
    ansible all /bin/echo hello
    +

    Congratulations. You’ve just contacted your nodes with Ansible. It’s now time to read some of the more real-world examples, and explore what you can do with different modules, as well -as the Ansible playbooks language.

    +as the Ansible playbooks language. Ansible is not just about running commands, but you already +have a working infrastructure!

    diff --git a/html/man/ansible-modules.5.html b/html/man/ansible-modules.5.html index ce97908233..d450a830f1 100644 --- a/html/man/ansible-modules.5.html +++ b/html/man/ansible-modules.5.html @@ -1,6 +1,6 @@ -ansible-modules

    Name

    ansible-modules — stock modules shipped with ansible

    DESCRIPTION

    Ansible ships with a number of modules that can be executed directly on remote hosts or through +ansible-modules

    Name

    ansible-modules — stock modules shipped with ansible

    DESCRIPTION

    Ansible ships with a number of modules that can be executed directly on remote hosts or through ansible playbooks.

    IDEMPOTENCE

    Most modules other than command are idempotent, meaning they will seek to avoid changes unless a change needs to be made. When using ansible playbooks, these modules can trigger change events, as described in ansible-playbooks(5).

    Unless otherwise noted, all modules support change hooks.

    command

    The command module takes the command name followed by a list of arguments, space delimited. diff --git a/html/man/ansible-playbook.5.html b/html/man/ansible-playbook.5.html index 2fdd2890af..e2250d7580 100644 --- a/html/man/ansible-playbook.5.html +++ b/html/man/ansible-playbook.5.html @@ -1,6 +1,6 @@ -ansible-modules

    Name

    ansible-playbook — format and function of an ansible playbook file

    DESCRIPTION

    Ansible ships with ansible-playbook, a tool for running playbooks. +ansible-modules

    Name

    ansible-playbook — format and function of an ansible playbook file

    DESCRIPTION

    Ansible ships with ansible-playbook, a tool for running playbooks. Playbooks can represent frequent tasks, desired system configurations, or deployment processes.

    FORMAT

    Playbooks are written in YAML.

    EXAMPLE

    See:

    • https://github.com/mpdehaan/ansible/blob/master/examples/playbook.yml diff --git a/html/man/ansible.1.html b/html/man/ansible.1.html index f0fd9f0277..41f45554ae 100644 --- a/html/man/ansible.1.html +++ b/html/man/ansible.1.html @@ -1,6 +1,6 @@ -ansible

      Name

      ansible — run a command somewhere else

      Synopsis

      ansible <host-pattern> [-f forks] [-m module_name] [-a args]

      DESCRIPTION

      Ansible is an extra-simple tool/framework/API for doing 'remote things' over +ansible

      Name

      ansible — run a command somewhere else

      Synopsis

      ansible <host-pattern> [-f forks] [-m module_name] [-a args]

      DESCRIPTION

      Ansible is an extra-simple tool/framework/API for doing 'remote things' over SSH.

      ARGUMENTS

      host-pattern
      diff --git a/html/playbooks.html b/html/playbooks.html index f62c06cd07..ab3394467e 100644 --- a/html/playbooks.html +++ b/html/playbooks.html @@ -98,20 +98,17 @@ described in the ‘patterns’ documentation. This is just like the fi

      Vars section

      A list of variables and values that can be used in the plays. These can be used in templates or ‘action’ lines and are dereferenced using `jinja2` syntax like this:

      -
      -
      {{ varname }}
      +
      {{ varname }}
      +

      Further, if there are discovered variables about the system (say, if facter or ohai were installed) these variables bubble up back into the playbook, and can be used on each system just like explicitly set variables. Facter variables are prefixed with ‘facter_‘ and Ohai variables are prefixed with ‘ohai_‘. So for instance, if I wanted to write the hostname into the /etc/motd file, I could say:

      -
      -
        -
      • name: write the motd
      • -
      • action: template src=/srv/templates/motd.j2 dest=/etc/motd
      • -
      -
      -

      And in /srv/templates/motd.j2::

      +
      - name: write the motd
      +- action: template src=/srv/templates/motd.j2 dest=/etc/motd
      +
      +

      And in /srv/templates/motd.j2:

      You are logged into {{ facter_hostname }}

      But we’re getting ahead of ourselves. Let’s talk about tasks.

      @@ -134,12 +131,9 @@ command line. See the module documentation for more info.

      Variables, as mentioned above, can be used in action lines. So if, hypothetically, you wanted to make a directory on each system named after the hostname ... yeah, that’s I know silly ... you could do it like so:

      -
      -
        -
      • name: make a directory
      • -
      • action: mkdir /tmp/{{ facter_hostname }}
      • -
      -
      +
      - name: make a directory
      +- action: mkdir /tmp/{{ facter_hostname }}
      +

      Notify statements

      @@ -162,25 +156,16 @@ complete in a particular play.

      Includes

      Not all tasks have to be listed directly in the main file. An include file can contain a list of tasks (in YAML) as well, optionally passing extra variables into the file. -Variables passed in can be deferenced like this (assume a variable named ‘user’)

      -
      -
      {{ user }}
      +Variables passed in can be deferenced like this (assume a variable named ‘user’):

      +
      {{ user }}
      +

      For instance, if deploying multiple wordpress instances, I could contain all of my tasks in a wordpress.yml file, and use it like so:

      -
      -
        -
      • -
        tasks:
        -
          -
        • include: wordpress.yml user=timmy
        • -
        • include: wordpress.yml user=alice
        • -
        • include: wordpress.yml user=bob
        • -
        -
        -
        -
      • -
      -
      +
      - tasks:
      +   - include: wordpress.yml user=timmy
      +   - include: wordpress.yml user=alice
      +   - include: wordpress.yml user=bob
      +

      In addition to the explicitly passed in parameters, all variables from the vars section are also available.

      diff --git a/html/searchindex.js b/html/searchindex.js index 8a94e8983a..af354f31d2 100644 --- a/html/searchindex.js +++ b/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({objects:{},terms:{all:[0,1,2,3,4,5,7],rhoncu:[],func:1,perl:7,mcollect:1,prefix:[2,3,7],code:[1,2,7],lacu:[],follow:[5,2,3],scp:7,nunc:[],content:[0,1],middl:3,depend:[],elsewher:7,specif:[5,6,7],program:[1,2,3],vel:[],blindingli:1,spec:3,sourc:[1,2,3,7],everi:[4,3],string:2,fals:[4,2],consequat:[],failur:[6,2],veri:[1,6,3],affect:3,risu:[],luctu:[],mauri:[],magic:[],max_client:3,level:[4,2],id_rsa:[0,7],list:[1,2,3,4,5,7,8],vivamu:[],item:4,ansible_librari:[],dotnet:4,saltstack:1,phasellu:[],ornar:[],alic:3,natur:2,seper:3,chef:1,second:[4,7],design:1,pass:[2,3],eleifend:[],further:3,even:7,what:[0,2,3],diam:[],favcolor:7,section:[1,2,3],abl:[],nec:[],abbrevi:4,version:[2,7],directori:[2,3],ever:1,method:6,metadata:[],suscipit:[],hash:2,abov:3,eckersberg:4,lectu:[],here:2,leo:[],let:[3,7],address:[5,2],path:2,sinc:7,valu:[4,2,3],aliquam:[],scelerisqu:[],great:1,purpos:2,plai:[2,3],ahead:3,precursor:1,larger:[],technolog:1,step:[2,3],adipisc:[],prior:2,venenati:[],permit:4,action:[1,2,3],nulla:[],implement:6,commonli:7,ourselv:3,iaculi:[],via:[0,1],regardless:[4,1,3],tempu:[],extra:3,modul:[0,1,2,3,6,7],prefer:[],releas:0,unix:3,api:[1,6,2],instal:[7,0,2,3,1],should:[4,2],select:[1,2,3,5],httpd:[3,7],from:[0,1,2,3,4,7],describ:[2,3],would:[2,7],commun:1,visit:1,two:[4,0,5],noarch:0,ohai:[1,2,3,7],dehaan:1,call:2,usr:[2,3,7],taken:3,sagitti:[],care:[],checkout:2,until:0,more:[0,5,2,3,1],desir:3,idempot:[2,3,7],dbserver:5,unneccessari:2,sbin:[2,7],agent:[0,7],particular:[1,3],easiest:1,must:[4,2,3],none:[],join:1,ibm:1,module_arg:6,dest:[2,3,7],habitass:[],setup:[1,2,7],work:[1,7,5],critic:1,remain:1,tag:[0,2],can:[0,1,2,3,4,5,6,7],learn:[0,5,3,1],about:[4,1,2,3],ero:[],root:[4,1,3],control:[1,2,3,7],conf:[3,7],yamllint:4,ultric:[],process:[1,7],rpath:1,sudo:0,share:2,templat:[7,0,2,3,1],libero:[],knows_oop:4,minimum:3,want:[6,2,3],occur:3,nullam:[],alwai:2,multipl:[5,3,7],newlin:4,puru:[],sit:[],capistrano:1,ping:[0,6,2,1],write:[4,1,2,3,7],how:[0,2,3,4,5,6],etiam:[],instead:2,config:[1,3],stock:2,arcu:[],financ:1,referenc:[5,3],clone:0,after:[3,7],lab:1,befor:[2,3],ohai_:3,contribut:1,mai:[4,0],end:[2,3],associ:4,grow:[],man:[1,8],bibendum:[],"short":1,orchestr:[0,1,2,3,5,7],thoug:2,bootstrap:1,favorit:1,turpi:[],element:[4,2],issu:1,inform:[2,3],mango:4,combin:4,order:3,talk:[0,3],origin:1,help:1,over:1,move:[2,3],orang:4,becaus:[],elit:4,rpmbuild:0,comma:4,vita:[],still:[],paramet:[2,3],facter_:3,jid:7,overlord:0,group:[1,6,3,5],cli:6,fit:[],conval:[],yaml:[4,1,3],pend:[3,7],rapidli:6,infrastructur:[1,5],mail:[1,5],sapien:[],main:3,might:3,easier:[],non:1,"return":[1,6,2],thei:[6,2,3,7],food:4,alist:[],nibh:[],egesta:[],"break":[],framework:[1,6],jinja2:[0,2,3,7],now:[0,2],nor:2,choic:1,multiprocess:0,name:[4,1,2,3,7],anyth:2,neccessari:[2,7],simpl:[4,1,6,3,7],viverra:[],drop:2,instruct:0,porta:[],separ:4,exampl:[0,1,2,3,4,5,6,7],each:[4,2,3,7],puppet:1,updat:7,rotat:3,mean:[2,3],harm:3,metu:[],michael:1,auctor:[],idea:1,realli:[4,2,3],ensur:[3,7],backport:0,connect:[],our:4,happen:[2,3],todo:[],event:2,out:[4,1,2,3,7],variabl:[2,3,7],"try":0,shown:[],network:1,space:[1,2],reboot:7,bubbl:[2,3],cra:[],rel:2,internet:1,correct:[4,1,3],red:[1,7],painless:1,hendrerit:[],ntp:7,orci:[],given:[2,7],pub:7,base:[1,3],usabl:1,dictionari:4,qui:[],org:0,molli:[],bash:[0,7],basi:3,vestibulum:[],pyyaml:0,indent:[],maecena:[],could:[6,3],put:[0,7],fqdn:7,thing:[1,3],yum:[],isn:1,principl:[],top:2,first:[7,0,2,3,1],oper:[1,7],softwar:[1,2,7],rang:1,notifi:[1,3,7],obviou:1,onc:[2,3],number:2,yourself:0,hook:2,datastructur:6,alreadi:[2,3],done:3,"long":[1,2,7],enim:[],massiv:1,open:[],differ:[7,0,3,1],praesent:[],convent:2,script:[1,6,7],data:[4,6,2,7],licens:[],mkdir:3,system:[0,1,2,3,5,7],messag:6,parallel:[1,7],inventori:[1,2,3,5],appl:4,too:1,statement:[1,3],molesti:[],john:4,banana:4,shell:[1,2,7],option:[4,8,3,7],behind:2,tool:[1,2,7],copi:[1,2,7],specifi:[4,2,7],quam:[],github:[0,1],off:1,exactli:[],than:[0,2,3,7],serv:[],liter:2,silli:3,target:[1,5],provid:4,sollicitudin:[],heavyweight:[],structur:4,charact:4,project:[0,7,1],architect:1,were:3,tion:4,uses_cv:4,pre:0,sai:3,runner:6,explicit:2,argument:2,hypothet:3,ant:[],download:0,have:[0,3,1],need:[4,0,2,3,7],tellu:[],seek:2,paramiko:0,engin:7,built:0,note:[5,2,7],also:[0,1,2,3,4,5,7],client:1,massa:[],build:[0,6],indic:2,environ:[],divers:1,pulvinar:[],begin:4,sure:[],unless:2,distribut:[0,1],deploy:[0,1,2,3,5,7],track:7,who:[],discov:3,most:[4,2],employe:4,regular:3,plan:[],deploi:[1,2,3,7],pair:2,why:1,porttitor:[],simplic:[],don:2,doc:1,later:7,cover:7,doe:[1,2,5],sodal:[],bracket:[4,5],snapshot:2,place:1,wildcard:5,dolor:[],modularli:[],awesom:[1,3],laoreet:[],blandit:[],verbos:2,syntax:[4,3],bring:3,directli:[2,3,7],raleigh:1,particularli:3,playbook:[0,1,2,3,4,5,6,7],permiss:[],hack:1,radic:1,pki:[],trivial:[1,2],varnam:3,involv:1,absolut:2,onli:[0,2,3,7],explicitli:3,locat:2,execut:[1,2,3],pretti:6,configur:[0,1,2,3,4,5,7],apach:[3,7],written:[1,2,3,7],accumsan:[],consectetur:[],somevar:3,freenod:1,variu:[],local:2,yml:3,long_running_oper:7,nearli:[2,3],variou:[],get:[4,0,3,7,1],express:[4,1,6,3],stop:2,mission:1,repo:[2,7],ssl:[],timmi:3,ssh:[0,7],malesuada:[],requir:[0,2,1],uvh:0,nisi:[],bar:5,lame:4,nisl:[],remot:[0,2,3,7],stuff:7,contain:[2,3],through:[0,2,1],told:3,where:[1,2,3],wrote:[],view:[1,8],user:3,set:[2,3],creator:[],elimin:[],see:[0,1,2,3,4,5,7],sed:[],result:[6,2],fail:3,sem:[],extend:1,servic:[1,2,3,7],faucibu:[],statu:7,manpag:[0,8],databas:3,someth:[1,2,7],discoveri:2,restart:[2,3,7],state:[2,3,7],won:7,ligula:[],between:4,"import":6,irc:1,altern:7,elementum:[],kei:[4,0,2,3],handful:[],aspir:[],style:2,extens:1,job:[4,7],entir:3,aserv:0,magna:[],webapp:7,minut:[],addit:[4,1,3],delimit:2,plugin:[],goal:1,against:[1,3,5],tempor:[],etc:[7,0,5,3,1],instanc:3,mani:[3,7],placerat:[],planet:1,com:[0,6,5],proin:[],sha:2,skill:4,assur:3,simpli:[2,3],overview:4,inspir:[],header:5,colon:3,shutdown:2,linux:[1,3],poll:[1,3,7],rpm:[0,1],matti:[],dui:[],pretium:[],multiplay:1,morbi:[],three:5,been:1,amet:[],json:[1,6,2],much:[1,2],far:1,basic:[4,0,5,2,1],ungroup:[],feugiat:[],quickli:[4,1],indenta:4,box:[1,2],wish:[4,0,5],derefer:[],fire:1,rubi:[4,2,7],vulput:[],ani:[1,6,2,3,7],upgrad:7,likes_emac:4,understand:[],pellentesqu:[],donec:[],minim:0,atlanta:7,job_statu:7,those:[4,2],emploi:4,authorized_kei:0,multi:[1,3],tortor:[],look:[5,3,7],replac:3,hoc:[1,3],straight:7,md5sum:2,batch:[],"while":3,overrid:[],facter_hostnam:3,ipsum:[],cobbler:1,scene:2,bin:[2,3,7],motd:[3,7],tar:0,them:[2,3,7],erat:[],myapp:7,module_nam:6,ship:2,sever:4,http_port:3,develop:[4,0,1],welcom:1,author:1,make:[0,2,3,7],platea:[],same:[4,5,7],member:4,python:[0,1,2,4,6,7],complex:[1,3],fedora:[],document:[0,6,3,7],ansibl:[0,1,2,3,4,5,6,7,8],complet:3,finish:[],http:2,hostnam:3,denot:5,nest:2,pick:4,effect:3,dai:[],fruit:4,fusc:[],ownership:[],extrem:0,php:7,distutil:[0,1],typic:7,squar:4,exceedingli:[],task:[1,3,7],kept:3,scenario:2,mention:3,whole:[],well:[0,2,3],spent:[],contact:[0,6,2],command:[0,1,2,3,5,7,8],thi:[0,1,2,3,4,5,7],choos:2,dereferenc:3,usual:3,explor:0,comment:[],protocol:2,just:[7,0,2,3,1],less:[0,1],excel:1,kill:7,ntp_server:7,simultan:7,languag:[4,0,5,2,1],previous:[],web:[6,7],versu:1,easi:[1,2],mix:5,hac:[],except:3,littl:1,add:[0,7],simplejson:0,els:1,unlik:3,hat:1,match:3,take:2,real:0,applic:[6,3],which:[4,0,5,3,1],format:[1,2,3,4,5,7],read:[4,0],tincidunt:[],dark:6,game:1,know:[4,2,3],background:[1,7],world:0,bit:2,daemon:1,motorola:1,like:[4,5,2,3,7],success:2,signal:3,manual:[],integ:2,noth:3,edit:0,"boolean":4,either:2,velit:[],popular:1,async:[],page:[4,0,8,1],deal:[],webserv:[5,3,7],suppli:[],some:[0,2],back:3,dead:1,tumblr:[],home:[],server:[1,2,3,7],librari:[],tmp:[3,7],render:2,augu:[],assum:3,avoid:2,though:1,ultrici:[],per:6,tracker:1,unit:[],pattern:[1,6,3,5],foo:[5,7],complic:1,refer:7,machin:[0,2,3,7],core:1,run:[0,6,2,3,7],power:[1,6],quit:[],lose:7,usag:[2,7],devop:1,web2:6,host:[0,1,2,3,5,6,7],web1:6,repositori:0,output:3,"super":1,aenean:[],simpler:7,comparison:1,sshd:1,actual:2,gplv3:[],justo:[],othervar:3,surround:4,manag:[0,1,2,3,4,5,7],srv:[3,7],quisqu:[],industri:1,own:[1,2,3],"final":4,bounc:2,within:2,automat:2,compos:3,down:[],contributor:[],chang:[2,3,7],next:3,bserver:0,your:[0,1,2,3,4,5,7],mpdehaan:[],git:[0,2,7,1],fabric:1,wai:[4,0,3,7],interdum:[],transfer:[1,7],dictum:[],support:[2,7],question:1,fast:1,happi:1,avail:[0,8,2,3,7],start:[0,1,2,3,4,7],trigger:2,wordpress:3,includ:[1,3],lot:[1,3,7],suit:3,"var":[1,3],individu:5,fork:6,head:[2,7],doctyp:[],form:[4,3],eget:[],handler:[1,3,7],lint:4,yeah:3,msg:2,loborti:[],ullamcorp:[],line:[1,2,3,4,7,8],"true":[4,2],tristiqu:[],congratul:0,info:3,strawberri:4,made:[2,7],possibl:[5,3,7],whether:6,type:6,caller:2,tell:[2,7],asynchron:[1,3],record:4,below:[],limit:[1,7],suspendiss:[],rerun:3,otherwis:2,problem:[],similar:2,chip:1,facter:[1,2,3,7],curv:1,featur:3,tasti:4,creat:1,certain:3,doesn:1,repres:4,ansil:[],deferenc:3,file:[0,1,2,3,4,5,7],bob:3,exist:[1,3],check:[2,7],urna:[],nequ:[],again:3,googl:1,when:[2,3,7],nam:[],"default":[1,5],other:[7,0,2,3,1],futur:0,dignissim:[],test:[0,2],you:[0,1,2,3,4,5,7],clojur:[],node:[0,2,7,1],dapibu:[],journei:[],gravida:[],sequenc:1,asciidoc:0,est:[],log:3,feli:[],aliquet:[],src:[2,3,7],lorem:[],"60k":1,dictumst:[],sphinx:0,rutrum:[],anywher:[],descript:[],portion:5,emerg:1,potenti:3,time:[0,1,2,3,5,7],push:3,serious:[],fermentum:[]},objtypes:{},titles:["Getting Started","Ansible","Ansible Modules","Playbooks: Ansible for Deployment, Configuration Management, and Orchestration","YAML Format","The Inventory File, Patterns, and Groups","API","Examples","Man Pages"],objnames:{},filenames:["gettingstarted","index","modules","playbooks","YAMLScripts","patterns","api","examples","man"]}) \ No newline at end of file +Search.setIndex({objects:{},terms:{all:[0,1,2,3,4,5,7],rhoncu:[],donec:[],mcollect:1,prefix:[2,3,7],code:[1,2,7],lacu:[],follow:[5,2,3],scp:7,nunc:[],content:[0,1],middl:3,depend:[],fusc:[],elsewher:7,program:[1,2,3],certain:3,vel:[],blindingli:1,spec:3,sourc:[1,2,3,7],everi:[4,3],string:2,fals:[4,2],than:[0,2,3,7],consequat:[],failur:[6,2],veri:[1,6,3],affect:3,risu:[],luctu:[],implement:6,magic:[],level:[4,2],id_rsa:[0,7],list:[1,2,3,4,5,7,8],vivamu:[],item:4,ansible_librari:[],form:[4,3],dotnet:4,saltstack:1,mpdehaan:[],phasellu:[],ornar:[],alic:3,natur:2,seper:3,chef:1,second:[4,7],design:1,pass:[2,3],eleifend:[],further:3,even:7,what:[0,2,3],diam:[],favcolor:7,section:[1,2,3],abl:[],nec:[],abbrevi:4,version:[2,7],directori:[2,3],ever:1,method:6,metadata:[],tar:0,suscipit:[],hash:2,facter_hostnam:3,eckersberg:4,here:2,leo:[],let:[3,7],address:[5,2],path:2,sinc:7,valu:[4,2,3],aliquam:[],scelerisqu:[],great:1,purpos:2,plai:[2,3],ahead:3,precursor:1,larger:[],technolog:1,host:[0,1,2,3,5,6,7],adipisc:[],prior:2,venenati:[],web1:6,permit:4,action:[1,2,3],nulla:[],bob:3,commonli:7,ourselv:3,iaculi:[],via:[0,1],regardless:[4,1,3],dictionari:4,extra:3,modul:[0,1,2,3,6,7],prefer:[],qui:[],unix:3,api:[1,6,2],instal:[7,0,2,3,1],select:[1,2,3,5],httpd:[3,7],from:[0,1,2,3,4,7],describ:[2,3],would:[2,7],commun:1,visit:1,two:[4,0,5],noarch:0,suit:3,live:0,dehaan:1,call:2,usr:[2,3,7],taken:3,sagitti:[],basi:3,checkout:2,until:0,more:[0,5,2,3,1],desir:3,idempot:[2,3,7],dbserver:5,unneccessari:2,sbin:[2,7],agent:[0,7],particular:[1,3],easiest:1,must:[4,2,3],sshd:1,none:[],join:1,ibm:1,module_arg:6,habitass:[],setup:[1,2,7],work:[0,5,7,1],critic:1,remain:1,tag:[0,2],can:[0,1,2,3,4,5,6,7],learn:[0,5,3,1],ero:[],root:[4,1,3],pick:4,control:[1,2,3,7],myapp:7,yamllint:4,ultric:[],process:[1,7],rpath:1,sudo:0,share:2,templat:[7,0,2,3,1],othervar:3,knows_oop:4,minimum:3,want:[6,2,3],occur:3,nullam:[],alwai:2,multipl:[5,3,7],newlin:4,puru:[],sit:[],capistrano:1,ping:[0,6,2,1],write:[4,1,2,3,7],how:[0,2,3,4,5,6],etiam:[],instead:2,simpl:[4,1,6,3,7],updat:7,arcu:[],express:[4,1,6,3],referenc:[5,3],clone:0,after:[3,7],usabl:1,befor:[2,3],ohai_:3,mai:[4,0],end:[2,3],data:[4,6,2,7],parallel:[1,7],man:[1,8],repo:[2,7],"short":1,orchestr:[0,1,2,3,5,7],thoug:2,read:[4,0],bootstrap:1,favorit:1,turpi:[],element:[4,2],issu:1,inform:[2,3],mango:4,combin:4,asynchron:[1,3],order:3,talk:[0,3],oper:[1,7],help:1,over:1,move:[2,3],orang:4,becaus:[],elit:4,rpmbuild:0,comma:4,vita:[],still:[],paramet:[2,3],facter_:3,jid:7,overlord:0,group:[1,6,3,5],cli:6,fit:[],yaml:[4,1,3],pend:[3,7],rapidli:6,infrastructur:[0,5,1],mail:[1,5],sapien:[],main:3,might:3,easier:[],non:1,"return":[1,6,2],thei:[6,2,3,7],food:4,alist:[],nibh:[],egesta:[],"break":[],framework:[1,6],jinja2:[0,2,3,7],now:[0,2],nor:2,choic:1,multiprocess:0,name:[4,1,2,3,7],anyth:2,neccessari:[2,7],config:[1,3],viverra:[],drop:2,datastructur:6,porta:[],separ:4,each:[4,2,3,7],puppet:1,stock:2,nearli:[2,3],mean:[2,3],harm:3,metu:[],michael:1,auctor:[],idea:1,realli:[4,2,3],contributor:[],backport:0,connect:[],our:4,happen:[2,3],todo:[],event:2,out:[4,1,2,3,7],variabl:[2,3,7],"try":[],shown:[],network:1,space:[1,2],reboot:7,bubbl:[2,3],stuff:7,rel:2,internet:1,correct:[4,1,3],red:[1,7],rotat:3,state:[2,3,7],hendrerit:[],ntp:7,contain:[2,3],differ:[7,0,3,1],pub:7,base:[1,3],lab:1,tempu:[],releas:0,org:0,molli:[],bash:[0,7],care:[],vestibulum:[],pyyaml:0,indent:[],maecena:[],could:[6,3],put:[0,7],fqdn:7,thing:[1,3],yum:[],isn:1,principl:[],top:2,first:[7,0,2,3,1],origin:1,softwar:[1,2,7],rang:1,notifi:[1,3,7],obviou:1,onc:[2,3],number:2,yourself:0,hook:2,instruct:0,alreadi:[0,2,3],done:3,fast:1,enim:[],massiv:1,open:[],straight:7,given:[2,7],convent:2,script:[1,6,7],associ:4,licens:[],mkdir:3,system:[0,1,2,3,5,7],messag:6,grow:[],too:1,statement:[1,3],molesti:[],john:4,banana:4,includ:[1,3],shell:[1,2,7],option:[4,8,3,7],welcom:1,tool:[1,2,7],copi:[1,2,7],specifi:[4,2,7],retyp:0,quam:[],next:3,github:[0,1],kept:3,exactli:[],accumsan:[],serv:[],liter:2,silli:3,target:[1,5],provid:4,sollicitudin:[],heavyweight:[],structur:4,charact:4,project:[0,7,1],architect:1,were:3,tion:4,uses_cv:4,pre:0,sai:3,runner:6,explicit:2,ani:[1,6,2,3,7],spent:[],ant:[],download:0,have:[0,3,1],need:[4,0,2,3,7],tellu:[],seek:2,paramiko:0,engin:7,built:0,contact:[0,6,2],note:[5,2,7],also:[0,1,2,3,4,5,7],client:1,massa:[],build:[0,6],indic:2,environ:[],divers:1,pulvinar:[],begin:4,sure:[],unless:2,distribut:[0,1],deploy:[0,1,2,3,5,7],track:7,who:[],discov:3,most:[4,2],employe:4,regular:3,plan:[],deploi:[1,2,3,7],pair:2,why:1,porttitor:[],simplic:[],don:2,doc:1,later:7,cover:7,doe:[1,2,5],sodal:[],bracket:[4,5],snapshot:2,place:1,wildcard:5,dolor:[],someth:[1,2,7],awesom:[1,3],laoreet:[],blandit:[],verbos:2,syntax:[4,3],bring:3,directli:[2,3,7],raleigh:1,particularli:3,playbook:[0,1,2,3,4,5,6,7],permiss:[],hack:1,radic:1,pki:[],trivial:[1,2],varnam:3,involv:1,absolut:2,onli:[0,2,3,7],explicitli:3,locat:2,just:[7,0,2,3,1],pretti:6,configur:[0,1,2,3,4,5,7],apach:[3,7],written:[1,2,3,7],should:[4,2],consectetur:[],somevar:3,congratul:0,variu:[],local:2,yml:3,long_running_oper:7,contribut:1,variou:[],get:[4,0,3,7,1],financ:1,stop:2,mission:1,bibendum:[],ssl:[],ssh:[0,7],malesuada:[],requir:[0,2,1],uvh:0,nisi:[],bar:5,lame:4,nisl:[],remot:[0,2,3,7],cra:[],orci:[],through:[0,2,1],told:3,where:[1,2,3],wrote:[],view:[1,8],set:[0,2,3],creator:[],elimin:[],see:[0,1,2,3,4,5,7],sed:[],result:[6,2],fail:3,sem:[],extend:1,ntp_server:7,faucibu:[],statu:7,kei:[4,0,2,3],databas:3,modularli:[],discoveri:2,restart:[2,3,7],behind:2,won:7,languag:[4,0,5,2,1],between:4,"import":6,irc:1,altern:7,elementum:[],manpag:[0,8],handful:[],aspir:[],style:2,extens:1,job:[4,7],entir:3,aserv:0,magna:[],webapp:7,timmi:3,addit:[4,1,3],delimit:2,plugin:[],goal:1,against:[1,3,5],tempor:[],etc:[7,0,5,3,1],instanc:3,mani:[3,7],placerat:[],com:[0,6,5],proin:[],sha:2,minut:[],assur:3,simpli:[2,3],author:1,overview:4,format:[1,2,3,4,5,7],inspir:[],header:5,colon:3,shutdown:2,linux:[1,3],poll:[1,3,7],rpm:[0,1],matti:[],dui:[],three:5,pretium:[],multiplay:1,morbi:[],compos:3,been:1,amet:[],json:[1,6,2],much:[1,2],basic:[4,0,5,2,1],ungroup:[],feugiat:[],quickli:[4,1],indenta:4,box:[1,2],derefer:[],fire:1,rubi:[4,2,7],vulput:[],argument:2,understand:[],pellentesqu:[],func:1,atlanta:7,job_statu:7,those:[4,2],emploi:4,authorized_kei:0,multi:[1,3],tortor:[],look:[5,3,7],nequ:[],hoc:[1,3],servic:[1,2,3,7],md5sum:2,batch:[],"while":3,overrid:[],abov:3,ipsum:[],cobbler:1,scene:2,real:0,motd:[3,7],max_client:3,them:[2,3,7],erat:[],conf:[3,7],module_nam:6,ship:2,sever:4,http_port:3,develop:[4,0,1],inventori:[1,2,3,5],minim:0,make:[0,2,3,7],platea:[],same:[4,5,7],member:4,python:[0,1,2,4,6,7],complex:[1,3],success:2,fedora:[],document:[0,6,3,7],ansibl:[0,1,2,3,4,5,6,7,8],complet:3,finish:[],http:2,hostnam:3,again:3,nest:2,painless:1,effect:3,dai:[],fruit:4,user:3,ownership:[],extrem:0,php:7,distutil:[0,1],typic:7,squar:4,exceedingli:[],task:[1,3,7],off:1,scenario:2,mention:3,whole:[],well:[0,2,3],hypothet:3,exampl:[0,1,2,3,4,5,6,7],command:[0,1,2,3,5,7,8],thi:[0,1,2,3,4,5,7],choos:2,dereferenc:3,usual:3,comment:[],protocol:2,execut:[1,2,3],less:[0,1],when:[2,3,7],kill:7,skill:4,simultan:7,ligula:[],previous:[],web:[6,7],versu:1,easi:[1,2],mix:5,trigger:2,hac:[],except:3,littl:1,add:[0,7],other:[7,0,2,3,1],els:1,unlik:3,hat:1,match:3,take:2,bin:[0,2,3,7],applic:[6,3],which:[4,0,5,3,1],ohai:[1,2,3,7],dest:[2,3,7],tincidunt:[],dark:6,game:1,know:[4,2,3],background:[1,7],world:0,bit:2,password:0,daemon:1,motorola:1,like:[4,5,2,3,7],specif:[5,6,7],signal:3,manual:[],integ:2,noth:3,edit:0,"boolean":4,either:2,velit:[],popular:1,async:[],page:[4,0,8,1],deal:[],webserv:[5,3,7],suppli:[],some:[0,2],back:3,dead:1,tumblr:[],home:[],server:[1,2,3,7],librari:[],tmp:[3,7],render:2,assum:3,avoid:[0,2],though:1,ultrici:[],per:6,tracker:1,unit:[],pattern:[1,6,3,5],foo:[5,7],complic:1,refer:7,machin:[0,2,3,7],core:1,run:[0,6,2,3,7],power:[1,6],quit:[],lose:7,usag:[2,7],asciidoc:0,web2:6,step:[2,3],explor:0,repositori:0,output:3,"super":1,aenean:[],simpler:7,comparison:1,about:[4,0,2,3,1],actual:2,gplv3:[],justo:[],libero:[],surround:4,manag:[0,1,2,3,4,5,7],srv:[3,7],quisqu:[],industri:1,own:[1,2,3],"final":4,bounc:2,within:2,automat:2,upgrad:7,down:[],ensur:[3,7],chang:[2,3,7],perl:7,bserver:0,your:[0,1,2,3,4,5,7],praesent:[],git:[0,2,7,1],type:6,fabric:1,wai:[4,0,3,7],interdum:[],transfer:[1,7],dictum:[],support:[2,7],question:1,"long":[1,2,7],happi:1,avail:[0,8,2,3,7],start:[0,1,2,3,4,7],appl:4,wordpress:3,augu:[],lot:[1,3,7],replac:3,"var":[1,3],individu:5,fork:6,head:[2,7],doctyp:[],simplejson:0,eget:[],handler:[1,3,7],lint:4,yeah:3,msg:2,loborti:[],ullamcorp:[],line:[1,2,3,4,7,8],"true":[4,2],tristiqu:[],freenod:1,info:3,strawberri:4,made:[2,7],possibl:[5,3,7],whether:6,wish:[4,0,5],caller:2,tell:[2,7],planet:1,record:4,below:[],limit:[1,7],suspendiss:[],rerun:3,otherwis:2,problem:[],similar:2,chip:1,facter:[1,2,3,7],curv:1,featur:3,tasti:4,creat:1,lectu:[],doesn:1,repres:4,ansil:[],deferenc:3,file:[0,1,2,3,4,5,7],mauri:[],exist:[1,3],check:[2,7],urna:[],conval:[],echo:0,denot:5,googl:1,excel:1,nam:[],"default":[1,5],likes_emac:4,futur:0,dignissim:[],test:[0,2],you:[0,1,2,3,4,5,7],clojur:[],node:[0,2,7,1],dapibu:[],journei:[],gravida:[],sequenc:1,devop:1,push:3,est:[],log:3,feli:[],aliquet:[],src:[2,3,7],lorem:[],"60k":1,dictumst:[],sphinx:0,rutrum:[],anywher:[],descript:[],portion:5,emerg:1,potenti:3,time:[0,1,2,3,5,7],far:1,serious:[],fermentum:[],hello:0},objtypes:{},titles:["Getting Started","Ansible","Ansible Modules","Playbooks: Ansible for Deployment, Configuration Management, and Orchestration","YAML Format","The Inventory File, Patterns, and Groups","API","Examples","Man Pages"],objnames:{},filenames:["gettingstarted","index","modules","playbooks","YAMLScripts","patterns","api","examples","man"]}) \ No newline at end of file From e8eb7ab5ed723501fab33e4822c27cad64f63eb7 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Fri, 9 Mar 2012 07:42:53 -0500 Subject: [PATCH 10/11] Update docs --- html/YAMLScripts.html | 2 +- html/_sources/api.txt | 42 ++++++++++- html/_sources/examples.txt | 34 +++++---- html/_sources/playbooks.txt | 55 +++++++++++++- html/api.html | 53 ++++++++++++-- html/communicate.html | 118 ------------------------------- html/examples.html | 35 ++++----- html/genindex.html | 2 +- html/gettingstarted.html | 4 +- html/index.html | 12 ++-- html/man.html | 10 +-- html/man/ansible-modules.5.html | 2 +- html/man/ansible-playbook.5.html | 2 +- html/man/ansible.1.html | 2 +- html/modules.html | 14 ++-- html/patterns.html | 12 ++-- html/playbooks.html | 59 ++++++++++++++-- html/search.html | 2 +- html/searchindex.js | 2 +- rst/api.rst | 42 ++++++++++- rst/examples.rst | 34 +++++---- rst/playbooks.rst | 55 +++++++++++++- 22 files changed, 379 insertions(+), 214 deletions(-) delete mode 100644 html/communicate.html diff --git a/html/YAMLScripts.html b/html/YAMLScripts.html index 09db73f8ae..ec72607e3c 100644 --- a/html/YAMLScripts.html +++ b/html/YAMLScripts.html @@ -183,7 +183,7 @@ languages:
      diff --git a/html/_sources/api.txt b/html/_sources/api.txt index a3ddea4595..7eb71cf1f9 100644 --- a/html/_sources/api.txt +++ b/html/_sources/api.txt @@ -1,5 +1,5 @@ -API -``` +Using the Python API +==================== The Python API is very powerful, and is how the ansible CLI and ansible-playbook are implemented. @@ -32,4 +32,42 @@ expressed in the 'ansible-modules' documentation.:: A module can return any type of JSON data it wants, so Ansible can be used as a framework to rapidly build powerful applications and scripts. +Detailed API Example +```````````````````` + +The following script prints out the uptime information for all hosts:: + + #!/usr/bin/python + + import ansible.runner + import sys + + # construct the ansible runner and execute on all hosts + results = ansible.runner.Runner( + pattern='*', forks=10, + module_name='command', module_args=['/usr/bin/uptime'], + ).run() + + if results is None: + print "No hosts found" + sys.exit(1) + + print "UP ***********" + for (hostname, result) in results['contacted'].items(): + if not 'failed' in result: + print "%s >>> %s" % (hostname, result['stdout']) + + print "FAILED *******" + for (hostname, result) in results['contacted'].items(): + if 'failed' in result: + print "%s >>> %s" % (hostname, result['msg']) + + print "DOWN *********" + for (hostname, result) in results['dark'].items(): + print "%s >>> %s" % (hostname, result) + +Advanced programmers may also wish to read the source to ansible itself, for +it uses the Runner() API (with all available options) to implement the +command line tools ``ansible`` and ``ansible-playbook``. + diff --git a/html/_sources/examples.txt b/html/_sources/examples.txt index b061f31eaa..4adeeed94d 100644 --- a/html/_sources/examples.txt +++ b/html/_sources/examples.txt @@ -1,5 +1,9 @@ -Examples -======== +Command Line Examples +===================== + +The following examples show how to use `/usr/bin/ansible` for running ad-hoc tasks. +Start here. For configuration management and deployments, you'll want to pick up on +using `/usr/bin/ansible-playbook` -- the concepts port over directly. .. seealso:: @@ -24,19 +28,6 @@ The -f 10 specifies the usage of 10 simultaneous processes. Note that other than the command module, ansible modules do not work like simple scripts. They make the remote system look like you state, and run the commands neccessary to get it there. This is commonly refered to as 'idempotency'. -Time Limited Background Operations -`````````````````````````````````` - -Long running operations can be backgrounded, and their status can be checked on later. The same job ID is given to the same task on all hosts, so you won't lose track. Polling support is pending in the command line.:: - - ansible all -B 3600 -a "/usr/bin/long_running_operation --do-stuff" - ansible all -n job_status -a jid=123456789 - -Any module other than 'copy' or 'template' can be backgrounded. Typically you'll be backgrounding shell -commands or software upgrades only. - -After the time limit (in seconds) runs out (-B), the process on the remote nodes will be killed. - File Transfer & Templating `````````````````````````` @@ -74,4 +65,17 @@ Alternatively, restart a service on all webservers:: ansible webservers -m service name=httpd state=restarted +Time Limited Background Operations +`````````````````````````````````` + +Long running operations can be backgrounded, and their status can be checked on later. The same job ID is given to the same task on all hosts, so you won't lose track. Polling support is pending in the command line.:: + + ansible all -B 3600 -a "/usr/bin/long_running_operation --do-stuff" + ansible all -n job_status -a jid=123456789 + +Any module other than 'copy' or 'template' can be backgrounded. Typically you'll be backgrounding shell +commands or software upgrades only. + +After the time limit (in seconds) runs out (-B), the process on the remote nodes will be killed. + diff --git a/html/_sources/playbooks.txt b/html/_sources/playbooks.txt index 71d87d3ee0..890768c589 100644 --- a/html/_sources/playbooks.txt +++ b/html/_sources/playbooks.txt @@ -47,8 +47,7 @@ back on the webservers group, etc:: Hosts line `````````` -The hosts line is a list of one or more groups or host patterns, seperated by colons, as -described in the 'patterns' documentation. This is just like the first parameter to /usr/bin/ansible. +The hosts line is a list of one or more groups or host patterns, seperated by colons, asdescribed in the 'patterns' documentation. This is just like the first parameter to /usr/bin/ansible. Vars section ```````````` @@ -140,6 +139,58 @@ in a wordpress.yml file, and use it like so:: In addition to the explicitly passed in parameters, all variables from the vars section are also available. +The format of an included list of tasks or handlers looks just like a flat list of tasks. Here +is an example of what base.yml might look like:: + + --- + - name: no selinux + action: command /usr/sbin/setenforce 0 + - name: no iptables + action: service name=iptables state=stopped + - name: this is just to show variables work here, favcolor={{ favcolor }} + action: command /bin/true + +As you can see above, variables in include files work just like they do in the main file. +Including a variable in the name of a task is a contrived example, you could also +pass them to the action command line or use them inside a template file. + +Note that include statements are only usable from the top level playbook file. +At this time, includes can not include other includes. + +Using Includes To Assign Classes of Systems +``````````````````````````````````````````` + +Include files are best used to reuse logic between playbooks. You could imagine +a playbook describing your entire infrastructure like this:: + + --- + - hosts: atlanta-webservers + vars: + datacenter: atlanta + tasks: + - include: base.yml + - include: webservers.yml database=db.atlanta.com + handlers: + - include: generic-handlers.yml + - hosts: atlanta-dbservers + vars: + datacenter: atlanta + tasks: + - include: base.yml + - include: dbservers.yml + handlers: + - include: generic-handlers.yml + +There is one (or more) play defined for each group of systems, and each play maps +each group includes one or more 'class definitions' telling the systems what they +are supposed to do or be. + +Using a common handlers file could allow one task in 'webservers' to define 'restart apache', +and it could be reused between multiple plays. + +Variables like 'database' above can be used in templates referenced from the +configuration file to generate machine specific variables. + Asynchronous Actions and Polling ```````````````````````````````` diff --git a/html/api.html b/html/api.html index 685a15f8c4..cd965fc710 100644 --- a/html/api.html +++ b/html/api.html @@ -7,7 +7,7 @@ - API — Ansible v0.0.1 documentation + Using the Python API — Ansible v0.0.1 documentation - - - - - - - - - - -
      -
      -
      -
      - -
      -

      Communicate and Get Involved

      - -
      - - -
      -
      -
      -
      -
      -

      Previous topic

      -

      API

      -

      Next topic

      -

      Man Pages

      -

      This Page

      - - - -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/html/examples.html b/html/examples.html index d39b37a4b7..d60197c19f 100644 --- a/html/examples.html +++ b/html/examples.html @@ -7,7 +7,7 @@ - Examples — Ansible v0.0.1 documentation + Command Line Examples — Ansible v0.0.1 documentation - +
    • - previous |
    • Ansible v0.0.1 documentation »
    @@ -71,7 +71,7 @@

    Previous topic

    API

    + title="previous chapter">Using the Python API

    This Page

    diff --git a/html/man/ansible-modules.5.html b/html/man/ansible-modules.5.html index d450a830f1..f1676121f6 100644 --- a/html/man/ansible-modules.5.html +++ b/html/man/ansible-modules.5.html @@ -1,6 +1,6 @@ -ansible-modules

    Name

    ansible-modules — stock modules shipped with ansible

    DESCRIPTION

    Ansible ships with a number of modules that can be executed directly on remote hosts or through +ansible-modules

    Name

    ansible-modules — stock modules shipped with ansible

    DESCRIPTION

    Ansible ships with a number of modules that can be executed directly on remote hosts or through ansible playbooks.

    IDEMPOTENCE

    Most modules other than command are idempotent, meaning they will seek to avoid changes unless a change needs to be made. When using ansible playbooks, these modules can trigger change events, as described in ansible-playbooks(5).

    Unless otherwise noted, all modules support change hooks.

    command

    The command module takes the command name followed by a list of arguments, space delimited. diff --git a/html/man/ansible-playbook.5.html b/html/man/ansible-playbook.5.html index e2250d7580..de6d091b1f 100644 --- a/html/man/ansible-playbook.5.html +++ b/html/man/ansible-playbook.5.html @@ -1,6 +1,6 @@ -ansible-modules

    Name

    ansible-playbook — format and function of an ansible playbook file

    DESCRIPTION

    Ansible ships with ansible-playbook, a tool for running playbooks. +ansible-modules

    Name

    ansible-playbook — format and function of an ansible playbook file

    DESCRIPTION

    Ansible ships with ansible-playbook, a tool for running playbooks. Playbooks can represent frequent tasks, desired system configurations, or deployment processes.

    FORMAT

    Playbooks are written in YAML.

    EXAMPLE

    See:

    • https://github.com/mpdehaan/ansible/blob/master/examples/playbook.yml diff --git a/html/man/ansible.1.html b/html/man/ansible.1.html index 41f45554ae..dab3740bd3 100644 --- a/html/man/ansible.1.html +++ b/html/man/ansible.1.html @@ -1,6 +1,6 @@ -ansible

      Name

      ansible — run a command somewhere else

      Synopsis

      ansible <host-pattern> [-f forks] [-m module_name] [-a args]

      DESCRIPTION

      Ansible is an extra-simple tool/framework/API for doing 'remote things' over +ansible

      Name

      ansible — run a command somewhere else

      Synopsis

      ansible <host-pattern> [-f forks] [-m module_name] [-a args]

      DESCRIPTION

      Ansible is an extra-simple tool/framework/API for doing 'remote things' over SSH.

      ARGUMENTS

      host-pattern
      diff --git a/html/modules.html b/html/modules.html index 6b91a5d7ee..3b01f52e5c 100644 --- a/html/modules.html +++ b/html/modules.html @@ -24,7 +24,7 @@ - +
    • - previous |
    • Ansible v0.0.1 documentation »
    @@ -55,11 +55,11 @@ ansible playbooks.

    See also

    -
    Examples
    +
    Command Line Examples
    Examples of using modules in /usr/bin/ansible
    Playbooks: Ansible for Deployment, Configuration Management, and Orchestration
    Examples of using modules with /usr/bin/ansible-playbook
    -
    API
    +
    Using the Python API
    Examples of using modules with the Python API
    @@ -216,7 +216,7 @@ the command line, passing them arguments just like they would be passed with ans

    Previous topic

    Examples

    + title="previous chapter">Command Line Examples

    Next topic

    YAML Format

    @@ -252,14 +252,14 @@ the command line, passing them arguments just like they would be passed with ans next |
  • - previous |
  • Ansible v0.0.1 documentation »
  • diff --git a/html/patterns.html b/html/patterns.html index 321977cee6..230ca33174 100644 --- a/html/patterns.html +++ b/html/patterns.html @@ -23,7 +23,7 @@ - + @@ -34,7 +34,7 @@ index
  • - next |
  • See also

    -
    Examples
    +
    Command Line Examples
    Examples of basic commands
    Playbooks: Ansible for Deployment, Configuration Management, and Orchestration
    Learning ansible’s configuration management language
    @@ -124,7 +124,7 @@ webservers:dbservers title="previous chapter">Getting Started

    Next topic

    Examples

    + title="next chapter">Command Line Examples

    This Page

  • diff --git a/html/playbooks.html b/html/playbooks.html index ab3394467e..58baa5b5a3 100644 --- a/html/playbooks.html +++ b/html/playbooks.html @@ -23,7 +23,7 @@ - + @@ -34,7 +34,7 @@ index
  • - next |
  • Hosts line

    -

    The hosts line is a list of one or more groups or host patterns, seperated by colons, as -described in the ‘patterns’ documentation. This is just like the first parameter to /usr/bin/ansible.

    +

    The hosts line is a list of one or more groups or host patterns, seperated by colons, asdescribed in the ‘patterns’ documentation. This is just like the first parameter to /usr/bin/ansible.

    Vars section

    @@ -168,6 +167,51 @@ in a wordpress.yml file, and use it like so:

    In addition to the explicitly passed in parameters, all variables from the vars section are also available.

    +

    The format of an included list of tasks or handlers looks just like a flat list of tasks. Here +is an example of what base.yml might look like:

    +
    ---
    +- name: no selinux
    +  action: command /usr/sbin/setenforce 0
    +- name: no iptables
    +  action: service name=iptables state=stopped
    +- name: this is just to show variables work here, favcolor={{ favcolor }}
    +  action: command /bin/true
    +
    +

    As you can see above, variables in include files work just like they do in the main file. +Including a variable in the name of a task is a contrived example, you could also +pass them to the action command line or use them inside a template file.

    +

    Note that include statements are only usable from the top level playbook file. +At this time, includes can not include other includes.

    +
    +
    +

    Using Includes To Assign Classes of Systems

    +

    Include files are best used to reuse logic between playbooks. You could imagine +a playbook describing your entire infrastructure like this:

    +
    ---
    +- hosts: atlanta-webservers
    +  vars:
    +    datacenter: atlanta
    +  tasks:
    +  - include: base.yml
    +  - include: webservers.yml database=db.atlanta.com
    +  handlers:
    +    - include: generic-handlers.yml
    +- hosts: atlanta-dbservers
    +  vars:
    +    datacenter: atlanta
    +  tasks:
    +  - include: base.yml
    +  - include: dbservers.yml
    +  handlers:
    +    - include: generic-handlers.yml
    +
    +

    There is one (or more) play defined for each group of systems, and each play maps +each group includes one or more ‘class definitions’ telling the systems what they +are supposed to do or be.

    +

    Using a common handlers file could allow one task in ‘webservers’ to define ‘restart apache’, +and it could be reused between multiple plays.

    +

    Variables like ‘database’ above can be used in templates referenced from the +configuration file to generate machine specific variables.

    Asynchronous Actions and Polling

    @@ -198,6 +242,7 @@ are also available.

  • Notify statements
  • Handlers
  • Includes
  • +
  • Using Includes To Assign Classes of Systems
  • Asynchronous Actions and Polling
  • Executing A Playbook
  • @@ -209,7 +254,7 @@ are also available.

    title="previous chapter">YAML Format

    Next topic

    API

    + title="next chapter">Using the Python API

    This Page

    diff --git a/html/search.html b/html/search.html index e870053d70..f3f8751570 100644 --- a/html/search.html +++ b/html/search.html @@ -90,7 +90,7 @@
    diff --git a/html/searchindex.js b/html/searchindex.js index af354f31d2..918c86baa6 100644 --- a/html/searchindex.js +++ b/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({objects:{},terms:{all:[0,1,2,3,4,5,7],rhoncu:[],donec:[],mcollect:1,prefix:[2,3,7],code:[1,2,7],lacu:[],follow:[5,2,3],scp:7,nunc:[],content:[0,1],middl:3,depend:[],fusc:[],elsewher:7,program:[1,2,3],certain:3,vel:[],blindingli:1,spec:3,sourc:[1,2,3,7],everi:[4,3],string:2,fals:[4,2],than:[0,2,3,7],consequat:[],failur:[6,2],veri:[1,6,3],affect:3,risu:[],luctu:[],implement:6,magic:[],level:[4,2],id_rsa:[0,7],list:[1,2,3,4,5,7,8],vivamu:[],item:4,ansible_librari:[],form:[4,3],dotnet:4,saltstack:1,mpdehaan:[],phasellu:[],ornar:[],alic:3,natur:2,seper:3,chef:1,second:[4,7],design:1,pass:[2,3],eleifend:[],further:3,even:7,what:[0,2,3],diam:[],favcolor:7,section:[1,2,3],abl:[],nec:[],abbrevi:4,version:[2,7],directori:[2,3],ever:1,method:6,metadata:[],tar:0,suscipit:[],hash:2,facter_hostnam:3,eckersberg:4,here:2,leo:[],let:[3,7],address:[5,2],path:2,sinc:7,valu:[4,2,3],aliquam:[],scelerisqu:[],great:1,purpos:2,plai:[2,3],ahead:3,precursor:1,larger:[],technolog:1,host:[0,1,2,3,5,6,7],adipisc:[],prior:2,venenati:[],web1:6,permit:4,action:[1,2,3],nulla:[],bob:3,commonli:7,ourselv:3,iaculi:[],via:[0,1],regardless:[4,1,3],dictionari:4,extra:3,modul:[0,1,2,3,6,7],prefer:[],qui:[],unix:3,api:[1,6,2],instal:[7,0,2,3,1],select:[1,2,3,5],httpd:[3,7],from:[0,1,2,3,4,7],describ:[2,3],would:[2,7],commun:1,visit:1,two:[4,0,5],noarch:0,suit:3,live:0,dehaan:1,call:2,usr:[2,3,7],taken:3,sagitti:[],basi:3,checkout:2,until:0,more:[0,5,2,3,1],desir:3,idempot:[2,3,7],dbserver:5,unneccessari:2,sbin:[2,7],agent:[0,7],particular:[1,3],easiest:1,must:[4,2,3],sshd:1,none:[],join:1,ibm:1,module_arg:6,habitass:[],setup:[1,2,7],work:[0,5,7,1],critic:1,remain:1,tag:[0,2],can:[0,1,2,3,4,5,6,7],learn:[0,5,3,1],ero:[],root:[4,1,3],pick:4,control:[1,2,3,7],myapp:7,yamllint:4,ultric:[],process:[1,7],rpath:1,sudo:0,share:2,templat:[7,0,2,3,1],othervar:3,knows_oop:4,minimum:3,want:[6,2,3],occur:3,nullam:[],alwai:2,multipl:[5,3,7],newlin:4,puru:[],sit:[],capistrano:1,ping:[0,6,2,1],write:[4,1,2,3,7],how:[0,2,3,4,5,6],etiam:[],instead:2,simpl:[4,1,6,3,7],updat:7,arcu:[],express:[4,1,6,3],referenc:[5,3],clone:0,after:[3,7],usabl:1,befor:[2,3],ohai_:3,mai:[4,0],end:[2,3],data:[4,6,2,7],parallel:[1,7],man:[1,8],repo:[2,7],"short":1,orchestr:[0,1,2,3,5,7],thoug:2,read:[4,0],bootstrap:1,favorit:1,turpi:[],element:[4,2],issu:1,inform:[2,3],mango:4,combin:4,asynchron:[1,3],order:3,talk:[0,3],oper:[1,7],help:1,over:1,move:[2,3],orang:4,becaus:[],elit:4,rpmbuild:0,comma:4,vita:[],still:[],paramet:[2,3],facter_:3,jid:7,overlord:0,group:[1,6,3,5],cli:6,fit:[],yaml:[4,1,3],pend:[3,7],rapidli:6,infrastructur:[0,5,1],mail:[1,5],sapien:[],main:3,might:3,easier:[],non:1,"return":[1,6,2],thei:[6,2,3,7],food:4,alist:[],nibh:[],egesta:[],"break":[],framework:[1,6],jinja2:[0,2,3,7],now:[0,2],nor:2,choic:1,multiprocess:0,name:[4,1,2,3,7],anyth:2,neccessari:[2,7],config:[1,3],viverra:[],drop:2,datastructur:6,porta:[],separ:4,each:[4,2,3,7],puppet:1,stock:2,nearli:[2,3],mean:[2,3],harm:3,metu:[],michael:1,auctor:[],idea:1,realli:[4,2,3],contributor:[],backport:0,connect:[],our:4,happen:[2,3],todo:[],event:2,out:[4,1,2,3,7],variabl:[2,3,7],"try":[],shown:[],network:1,space:[1,2],reboot:7,bubbl:[2,3],stuff:7,rel:2,internet:1,correct:[4,1,3],red:[1,7],rotat:3,state:[2,3,7],hendrerit:[],ntp:7,contain:[2,3],differ:[7,0,3,1],pub:7,base:[1,3],lab:1,tempu:[],releas:0,org:0,molli:[],bash:[0,7],care:[],vestibulum:[],pyyaml:0,indent:[],maecena:[],could:[6,3],put:[0,7],fqdn:7,thing:[1,3],yum:[],isn:1,principl:[],top:2,first:[7,0,2,3,1],origin:1,softwar:[1,2,7],rang:1,notifi:[1,3,7],obviou:1,onc:[2,3],number:2,yourself:0,hook:2,instruct:0,alreadi:[0,2,3],done:3,fast:1,enim:[],massiv:1,open:[],straight:7,given:[2,7],convent:2,script:[1,6,7],associ:4,licens:[],mkdir:3,system:[0,1,2,3,5,7],messag:6,grow:[],too:1,statement:[1,3],molesti:[],john:4,banana:4,includ:[1,3],shell:[1,2,7],option:[4,8,3,7],welcom:1,tool:[1,2,7],copi:[1,2,7],specifi:[4,2,7],retyp:0,quam:[],next:3,github:[0,1],kept:3,exactli:[],accumsan:[],serv:[],liter:2,silli:3,target:[1,5],provid:4,sollicitudin:[],heavyweight:[],structur:4,charact:4,project:[0,7,1],architect:1,were:3,tion:4,uses_cv:4,pre:0,sai:3,runner:6,explicit:2,ani:[1,6,2,3,7],spent:[],ant:[],download:0,have:[0,3,1],need:[4,0,2,3,7],tellu:[],seek:2,paramiko:0,engin:7,built:0,contact:[0,6,2],note:[5,2,7],also:[0,1,2,3,4,5,7],client:1,massa:[],build:[0,6],indic:2,environ:[],divers:1,pulvinar:[],begin:4,sure:[],unless:2,distribut:[0,1],deploy:[0,1,2,3,5,7],track:7,who:[],discov:3,most:[4,2],employe:4,regular:3,plan:[],deploi:[1,2,3,7],pair:2,why:1,porttitor:[],simplic:[],don:2,doc:1,later:7,cover:7,doe:[1,2,5],sodal:[],bracket:[4,5],snapshot:2,place:1,wildcard:5,dolor:[],someth:[1,2,7],awesom:[1,3],laoreet:[],blandit:[],verbos:2,syntax:[4,3],bring:3,directli:[2,3,7],raleigh:1,particularli:3,playbook:[0,1,2,3,4,5,6,7],permiss:[],hack:1,radic:1,pki:[],trivial:[1,2],varnam:3,involv:1,absolut:2,onli:[0,2,3,7],explicitli:3,locat:2,just:[7,0,2,3,1],pretti:6,configur:[0,1,2,3,4,5,7],apach:[3,7],written:[1,2,3,7],should:[4,2],consectetur:[],somevar:3,congratul:0,variu:[],local:2,yml:3,long_running_oper:7,contribut:1,variou:[],get:[4,0,3,7,1],financ:1,stop:2,mission:1,bibendum:[],ssl:[],ssh:[0,7],malesuada:[],requir:[0,2,1],uvh:0,nisi:[],bar:5,lame:4,nisl:[],remot:[0,2,3,7],cra:[],orci:[],through:[0,2,1],told:3,where:[1,2,3],wrote:[],view:[1,8],set:[0,2,3],creator:[],elimin:[],see:[0,1,2,3,4,5,7],sed:[],result:[6,2],fail:3,sem:[],extend:1,ntp_server:7,faucibu:[],statu:7,kei:[4,0,2,3],databas:3,modularli:[],discoveri:2,restart:[2,3,7],behind:2,won:7,languag:[4,0,5,2,1],between:4,"import":6,irc:1,altern:7,elementum:[],manpag:[0,8],handful:[],aspir:[],style:2,extens:1,job:[4,7],entir:3,aserv:0,magna:[],webapp:7,timmi:3,addit:[4,1,3],delimit:2,plugin:[],goal:1,against:[1,3,5],tempor:[],etc:[7,0,5,3,1],instanc:3,mani:[3,7],placerat:[],com:[0,6,5],proin:[],sha:2,minut:[],assur:3,simpli:[2,3],author:1,overview:4,format:[1,2,3,4,5,7],inspir:[],header:5,colon:3,shutdown:2,linux:[1,3],poll:[1,3,7],rpm:[0,1],matti:[],dui:[],three:5,pretium:[],multiplay:1,morbi:[],compos:3,been:1,amet:[],json:[1,6,2],much:[1,2],basic:[4,0,5,2,1],ungroup:[],feugiat:[],quickli:[4,1],indenta:4,box:[1,2],derefer:[],fire:1,rubi:[4,2,7],vulput:[],argument:2,understand:[],pellentesqu:[],func:1,atlanta:7,job_statu:7,those:[4,2],emploi:4,authorized_kei:0,multi:[1,3],tortor:[],look:[5,3,7],nequ:[],hoc:[1,3],servic:[1,2,3,7],md5sum:2,batch:[],"while":3,overrid:[],abov:3,ipsum:[],cobbler:1,scene:2,real:0,motd:[3,7],max_client:3,them:[2,3,7],erat:[],conf:[3,7],module_nam:6,ship:2,sever:4,http_port:3,develop:[4,0,1],inventori:[1,2,3,5],minim:0,make:[0,2,3,7],platea:[],same:[4,5,7],member:4,python:[0,1,2,4,6,7],complex:[1,3],success:2,fedora:[],document:[0,6,3,7],ansibl:[0,1,2,3,4,5,6,7,8],complet:3,finish:[],http:2,hostnam:3,again:3,nest:2,painless:1,effect:3,dai:[],fruit:4,user:3,ownership:[],extrem:0,php:7,distutil:[0,1],typic:7,squar:4,exceedingli:[],task:[1,3,7],off:1,scenario:2,mention:3,whole:[],well:[0,2,3],hypothet:3,exampl:[0,1,2,3,4,5,6,7],command:[0,1,2,3,5,7,8],thi:[0,1,2,3,4,5,7],choos:2,dereferenc:3,usual:3,comment:[],protocol:2,execut:[1,2,3],less:[0,1],when:[2,3,7],kill:7,skill:4,simultan:7,ligula:[],previous:[],web:[6,7],versu:1,easi:[1,2],mix:5,trigger:2,hac:[],except:3,littl:1,add:[0,7],other:[7,0,2,3,1],els:1,unlik:3,hat:1,match:3,take:2,bin:[0,2,3,7],applic:[6,3],which:[4,0,5,3,1],ohai:[1,2,3,7],dest:[2,3,7],tincidunt:[],dark:6,game:1,know:[4,2,3],background:[1,7],world:0,bit:2,password:0,daemon:1,motorola:1,like:[4,5,2,3,7],specif:[5,6,7],signal:3,manual:[],integ:2,noth:3,edit:0,"boolean":4,either:2,velit:[],popular:1,async:[],page:[4,0,8,1],deal:[],webserv:[5,3,7],suppli:[],some:[0,2],back:3,dead:1,tumblr:[],home:[],server:[1,2,3,7],librari:[],tmp:[3,7],render:2,assum:3,avoid:[0,2],though:1,ultrici:[],per:6,tracker:1,unit:[],pattern:[1,6,3,5],foo:[5,7],complic:1,refer:7,machin:[0,2,3,7],core:1,run:[0,6,2,3,7],power:[1,6],quit:[],lose:7,usag:[2,7],asciidoc:0,web2:6,step:[2,3],explor:0,repositori:0,output:3,"super":1,aenean:[],simpler:7,comparison:1,about:[4,0,2,3,1],actual:2,gplv3:[],justo:[],libero:[],surround:4,manag:[0,1,2,3,4,5,7],srv:[3,7],quisqu:[],industri:1,own:[1,2,3],"final":4,bounc:2,within:2,automat:2,upgrad:7,down:[],ensur:[3,7],chang:[2,3,7],perl:7,bserver:0,your:[0,1,2,3,4,5,7],praesent:[],git:[0,2,7,1],type:6,fabric:1,wai:[4,0,3,7],interdum:[],transfer:[1,7],dictum:[],support:[2,7],question:1,"long":[1,2,7],happi:1,avail:[0,8,2,3,7],start:[0,1,2,3,4,7],appl:4,wordpress:3,augu:[],lot:[1,3,7],replac:3,"var":[1,3],individu:5,fork:6,head:[2,7],doctyp:[],simplejson:0,eget:[],handler:[1,3,7],lint:4,yeah:3,msg:2,loborti:[],ullamcorp:[],line:[1,2,3,4,7,8],"true":[4,2],tristiqu:[],freenod:1,info:3,strawberri:4,made:[2,7],possibl:[5,3,7],whether:6,wish:[4,0,5],caller:2,tell:[2,7],planet:1,record:4,below:[],limit:[1,7],suspendiss:[],rerun:3,otherwis:2,problem:[],similar:2,chip:1,facter:[1,2,3,7],curv:1,featur:3,tasti:4,creat:1,lectu:[],doesn:1,repres:4,ansil:[],deferenc:3,file:[0,1,2,3,4,5,7],mauri:[],exist:[1,3],check:[2,7],urna:[],conval:[],echo:0,denot:5,googl:1,excel:1,nam:[],"default":[1,5],likes_emac:4,futur:0,dignissim:[],test:[0,2],you:[0,1,2,3,4,5,7],clojur:[],node:[0,2,7,1],dapibu:[],journei:[],gravida:[],sequenc:1,devop:1,push:3,est:[],log:3,feli:[],aliquet:[],src:[2,3,7],lorem:[],"60k":1,dictumst:[],sphinx:0,rutrum:[],anywher:[],descript:[],portion:5,emerg:1,potenti:3,time:[0,1,2,3,5,7],far:1,serious:[],fermentum:[],hello:0},objtypes:{},titles:["Getting Started","Ansible","Ansible Modules","Playbooks: Ansible for Deployment, Configuration Management, and Orchestration","YAML Format","The Inventory File, Patterns, and Groups","API","Examples","Man Pages"],objnames:{},filenames:["gettingstarted","index","modules","playbooks","YAMLScripts","patterns","api","examples","man"]}) \ No newline at end of file +Search.setIndex({objects:{},terms:{all:[0,1,2,3,4,5,6,7],code:[1,2,7],myapp:7,perl:7,mcollect:1,prefix:[2,3,7],concept:7,upgrad:7,follow:[5,6,2,3,7],scp:7,content:[0,1],middl:3,elsewher:7,specif:[5,6,3,7],program:[1,2,3],selinux:3,blindingli:1,spec:3,sourc:[1,6,2,3,7],everi:[4,3],string:2,fals:[4,2],failur:[6,2],veri:[1,6,3],affect:3,max_client:3,level:[4,2,3],id_rsa:[0,7],list:[1,2,3,4,5,7,8],item:[4,6],dotnet:4,saltstack:1,servic:[1,2,3,7],alic:3,natur:2,seper:3,chef:1,second:[4,7],design:1,pass:[2,3],download:0,further:3,port:7,even:7,what:[0,2,3],favcolor:[3,7],section:[1,2,3],abbrevi:4,version:[2,7],varnam:3,ever:1,method:6,told:3,hash:2,facter_hostnam:3,eckersberg:4,gener:3,here:[2,3,7],let:[3,7],address:[5,2],path:2,sinc:7,valu:[4,2,3],box:[1,2],great:1,ahead:3,precursor:1,technolog:1,host:[0,1,2,3,5,6,7],prior:2,pick:[4,7],action:[1,2,3],extrem:0,implement:6,commonli:7,ourselv:3,employe:4,via:[0,1],regardless:[4,1,3],extra:3,modul:[0,1,2,3,6,7],put:[0,7],unix:3,"boolean":4,instal:[7,0,2,3,1],select:[1,2,3,5],httpd:[3,7],from:[0,1,2,3,4,7],describ:[2,3],would:[2,7],commun:1,visit:1,two:[4,0,5],noarch:0,suit:3,live:0,handler:[1,3,7],call:2,usr:[6,2,3,7],msg:[6,2],somevar:3,type:6,tell:[2,3,7],more:[0,5,2,3,1],flat:3,desir:3,idempot:[2,3,7],src:[2,3,7],unneccessari:2,sshd:1,agent:[0,7],particular:[1,3],easiest:1,must:[4,2,3],none:6,join:1,ibm:1,module_arg:6,setup:[1,2,7],work:[7,0,5,3,1],knows_oop:4,remain:1,tag:[0,2],can:[0,1,2,3,4,5,6,7],learn:[0,5,3,1],about:[4,0,2,3,1],purpos:2,root:[4,1,3],control:[1,2,3,7],want:[6,2,3,7],yamllint:4,process:[1,7],rpath:1,sudo:0,share:2,templat:[7,0,2,3,1],critic:1,minimum:3,explor:0,occur:3,contribut:1,alwai:2,multipl:[5,3,7],newlin:4,thoug:2,lame:4,capistrano:1,ping:[0,6,2,1],uptim:6,write:[4,1,2,3,7],how:[0,2,3,4,5,6,7],instead:2,config:[1,3],stock:2,map:3,express:[4,1,6,3],referenc:[5,3],clone:0,after:[3,7],lab:1,befor:[2,3],ohai_:3,mai:[4,0,6],end:[2,3],associ:4,parallel:[1,7],man:[1,8],"short":1,orchestr:[0,1,2,3,5,7],read:[4,0,6],bootstrap:1,explicit:2,element:[4,2],issu:1,inform:[6,2,3],mango:4,combin:4,allow:3,order:3,talk:[0,3],origin:1,help:1,over:[1,7],move:[2,3],orang:4,mission:1,elit:4,rpmbuild:0,comma:4,paramet:[2,3],facter_:3,jid:7,overlord:0,group:[1,6,3,5],cli:6,yaml:[4,1,3],pend:[3,7],rapidli:6,infrastructur:[0,5,3,1],mail:[1,5],job_statu:7,main:3,might:3,them:[2,3,7],"return":[1,6,2],thei:[6,2,3,7],food:4,scene:2,framework:[1,6],jinja2:[0,2,3,7],now:[0,2],nor:2,choic:1,multiprocess:0,name:[4,1,2,3,7],anyth:2,neccessari:[2,7],simpl:[4,1,6,3,7],drop:2,instruct:0,separ:4,exampl:[0,1,2,3,4,5,6,7],each:[4,2,3,7],found:6,updat:7,mean:[2,3],harm:3,michael:1,individu:5,idea:1,realli:[4,2,3],backport:0,facter:[1,2,3,7],our:4,happen:[2,3],event:2,out:[1,2,3,4,6,7],variabl:[2,3,7],network:1,space:[1,2],reboot:7,bubbl:[2,3],rel:2,internet:1,print:6,correct:[4,1,3],red:[1,7],insid:3,advanc:6,ntp:7,given:[2,7],pub:7,base:[1,3],usabl:[1,3],dictionari:4,releas:0,org:0,bash:[0,7],basi:3,pyyaml:0,could:[6,3],fqdn:7,thing:[1,3],place:1,isn:1,assign:[1,3],first:[7,0,2,3,1],oper:[1,7],softwar:[1,2,7],rang:1,notifi:[1,3,7],directli:[2,3,7],onc:[2,3],number:2,yourself:0,hook:2,datastructur:6,alreadi:[0,2,3],puppet:1,construct:6,extend:1,massiv:1,differ:[7,0,3,1],"long":[1,2,7],convent:2,script:[1,6,7],data:[4,6,2,7],top:[2,3],mkdir:3,system:[0,1,2,3,5,7],messag:6,appl:4,too:1,statement:[1,3],john:4,banana:4,iptabl:3,shell:[1,2,7],option:[4,6,3,8,7],welcom:1,tool:[1,6,2,7],copi:[1,2,7],specifi:[4,2,7],retyp:0,provid:4,github:[0,1],off:1,than:[0,2,3,7],liter:2,silli:3,target:[1,5],remot:[0,2,3,7],structur:4,"final":4,project:[0,7,1],reus:3,architect:1,were:3,tion:4,uses_cv:4,pre:0,sai:3,runner:6,favorit:1,ani:[1,6,2,3,7],have:[0,3,1],need:[4,0,2,3,7],seek:2,paramiko:0,imagin:3,engin:7,built:0,note:[5,2,3,7],also:[0,1,2,3,4,5,6,7],client:1,build:[0,6],indic:2,datacent:3,divers:1,begin:4,unless:2,distribut:[0,1],deploy:[0,1,2,3,5,7],track:7,discov:3,most:[4,2],plai:[2,3],regular:3,deploi:[1,2,3,7],pair:2,why:1,don:2,doc:1,later:7,cover:7,doe:[1,2,5],likes_emac:4,snapshot:2,wildcard:5,pattern:[1,6,3,5],awesom:[1,3],show:[3,7],verbos:2,syntax:[4,3],bring:3,raleigh:1,particularli:3,playbook:[0,1,2,3,4,5,6,7],hack:1,radic:1,trivial:[1,2],rotat:3,involv:1,absolut:2,onli:[0,2,3,7],explicitli:3,locat:2,execut:[1,6,2,3],pretti:6,configur:[0,1,2,3,4,5,7],apach:[3,7],state:[2,3,7],should:[4,2],suppos:3,congratul:0,local:2,yml:3,long_running_oper:7,nearli:[2,3],get:[4,0,3,7,1],financ:1,stop:[2,3],repo:[2,7],obviou:1,ssh:[0,7],requir:[0,2,1],uvh:0,bar:5,sha:2,stuff:7,common:3,contain:[2,3],through:[0,2,1],where:[1,2,3],view:[1,8],set:[0,2,3],see:[0,1,2,3,4,5,7],result:[6,2],fail:[6,3],charact:4,skill:4,best:3,asynchron:[1,3],statu:7,kei:[4,0,2,3],databas:3,someth:[1,2,7],discoveri:2,restart:[2,3,7],behind:2,won:7,between:[4,3],"import":6,irc:1,altern:7,manpag:[0,8],style:2,extens:1,job:[4,7],entir:3,aserv:0,webapp:7,asdescrib:3,timmi:3,addit:[4,1,3],delimit:2,goal:1,against:[1,3,5],etc:[7,0,5,3,1],instanc:3,logic:3,mani:[3,7],com:[0,6,3,5],assur:3,simpli:[2,3],overview:4,header:5,written:[1,2,3,7],colon:3,shutdown:2,linux:[1,3],poll:[1,3,7],rpm:[0,1],multiplay:1,three:5,been:1,json:[1,6,2],much:[1,2],far:1,basic:[4,0,5,2,1],quickli:[4,1],indenta:4,wish:[4,0,6,5],fire:1,rubi:[4,2,7],argument:2,func:1,minim:0,atlanta:[3,7],those:[4,2],emploi:4,authorized_kei:0,multi:[1,3],look:[5,3,7],hoc:[1,3,7],straight:7,md5sum:2,permit:4,defin:3,"while":3,abov:3,exist:[1,3],dehaan:1,motd:[3,7],tar:0,stdout:6,non:1,itself:6,conf:[3,7],module_nam:6,sever:4,http_port:3,develop:[4,0,1],inventori:[1,2,3,5],author:1,make:[0,2,3,7],format:[1,2,3,4,5,7],same:[4,5,7],member:4,python:[0,1,2,4,6,7],complex:[1,3],document:[0,6,3,7],ansibl:[0,1,2,3,4,5,6,7,8],complet:3,http:2,hostnam:[6,3],denot:5,nest:2,painless:1,effect:3,fruit:4,user:3,php:7,distutil:[0,1],typic:7,squar:4,task:[1,3,7],kept:3,scenario:2,mention:3,setenforc:3,well:[0,2,3],hypothet:3,contact:[0,6,2],command:[0,1,2,3,5,6,7,8],thi:[0,1,2,3,4,5,7],choos:2,programm:6,dereferenc:3,usual:3,protocol:2,just:[7,0,2,3,1],less:[0,1],when:[2,3,7],kill:7,ntp_server:7,simultan:7,languag:[4,0,5,2,1],web:[6,7],versu:1,easi:[1,2],mix:5,except:3,littl:1,add:[0,7],other:[7,0,2,3,1],simplejson:0,els:1,unlik:3,hat:1,match:3,take:2,bin:[0,6,2,3,7],applic:[6,3],which:[4,0,5,3,1],ohai:[1,2,3,7],dest:[2,3,7],dark:6,game:1,know:[4,2,3],background:[1,7],world:0,bit:2,password:0,daemon:1,motorola:1,like:[4,5,2,3,7],success:2,signal:3,integ:2,noth:3,edit:0,api:[1,6,2],either:2,lose:7,popular:1,output:3,manag:[0,1,2,3,4,5,7],webserv:[5,3,7],some:[0,2],back:3,dead:1,server:[1,2,3,7],tmp:[3,7],render:2,assum:3,avoid:[0,2],though:1,definit:3,per:6,tracker:1,exit:6,foo:[5,7],complic:1,refer:7,machin:[0,2,3,7],core:1,run:[0,6,2,3,7],power:[1,6],usag:[2,7],asciidoc:0,web2:6,step:[2,3],web1:6,repositori:0,"super":1,simpler:7,comparison:1,sbin:[2,3,7],actual:2,othervar:3,surround:4,page:[4,0,8,1],srv:[3,7],done:3,industri:1,own:[1,2,3],real:0,bounc:2,within:2,contriv:3,automat:2,compos:3,down:6,ensur:[3,7],chang:[2,3,7],next:3,bserver:0,your:[0,1,2,3,4,5,7],git:[0,2,7,1],fabric:1,wai:[4,0,3,7],transfer:[1,7],support:[2,7],question:1,fast:1,happi:1,avail:[0,2,3,6,7,8],start:[0,1,2,3,4,7],trigger:2,wordpress:3,includ:[1,3],lot:[1,3,7],replac:3,"var":[1,3],fork:6,head:[2,7],form:[4,3],lint:4,yeah:3,taken:3,line:[0,1,2,3,4,5,6,7,8],"true":[4,2,3],freenod:1,info:3,strawberri:4,made:[2,7],possibl:[5,3,7],whether:6,checkout:2,caller:2,until:0,planet:1,record:4,limit:[1,7],rerun:3,otherwis:2,similar:2,chip:1,curv:1,featur:3,tasti:4,creat:1,certain:3,doesn:1,repres:4,cobbler:1,file:[0,1,2,3,4,5,7],bob:3,ship:2,check:[2,7],echo:0,again:3,googl:1,dbserver:[5,3],excel:1,detail:[1,6],"default":[1,5],bracket:[4,5],futur:0,test:[0,2],you:[0,1,2,3,4,5,7],node:[0,2,7,1],sequenc:1,"class":[1,3],devop:1,log:3,deferenc:3,"60k":1,sphinx:0,directori:[2,3],portion:5,emerg:1,potenti:3,time:[0,1,2,3,5,7],push:3,hello:0},objtypes:{},titles:["Getting Started","Ansible","Ansible Modules","Playbooks: Ansible for Deployment, Configuration Management, and Orchestration","YAML Format","The Inventory File, Patterns, and Groups","Using the Python API","Command Line Examples","Man Pages"],objnames:{},filenames:["gettingstarted","index","modules","playbooks","YAMLScripts","patterns","api","examples","man"]}) \ No newline at end of file diff --git a/rst/api.rst b/rst/api.rst index a3ddea4595..7eb71cf1f9 100644 --- a/rst/api.rst +++ b/rst/api.rst @@ -1,5 +1,5 @@ -API -``` +Using the Python API +==================== The Python API is very powerful, and is how the ansible CLI and ansible-playbook are implemented. @@ -32,4 +32,42 @@ expressed in the 'ansible-modules' documentation.:: A module can return any type of JSON data it wants, so Ansible can be used as a framework to rapidly build powerful applications and scripts. +Detailed API Example +```````````````````` + +The following script prints out the uptime information for all hosts:: + + #!/usr/bin/python + + import ansible.runner + import sys + + # construct the ansible runner and execute on all hosts + results = ansible.runner.Runner( + pattern='*', forks=10, + module_name='command', module_args=['/usr/bin/uptime'], + ).run() + + if results is None: + print "No hosts found" + sys.exit(1) + + print "UP ***********" + for (hostname, result) in results['contacted'].items(): + if not 'failed' in result: + print "%s >>> %s" % (hostname, result['stdout']) + + print "FAILED *******" + for (hostname, result) in results['contacted'].items(): + if 'failed' in result: + print "%s >>> %s" % (hostname, result['msg']) + + print "DOWN *********" + for (hostname, result) in results['dark'].items(): + print "%s >>> %s" % (hostname, result) + +Advanced programmers may also wish to read the source to ansible itself, for +it uses the Runner() API (with all available options) to implement the +command line tools ``ansible`` and ``ansible-playbook``. + diff --git a/rst/examples.rst b/rst/examples.rst index b061f31eaa..4adeeed94d 100644 --- a/rst/examples.rst +++ b/rst/examples.rst @@ -1,5 +1,9 @@ -Examples -======== +Command Line Examples +===================== + +The following examples show how to use `/usr/bin/ansible` for running ad-hoc tasks. +Start here. For configuration management and deployments, you'll want to pick up on +using `/usr/bin/ansible-playbook` -- the concepts port over directly. .. seealso:: @@ -24,19 +28,6 @@ The -f 10 specifies the usage of 10 simultaneous processes. Note that other than the command module, ansible modules do not work like simple scripts. They make the remote system look like you state, and run the commands neccessary to get it there. This is commonly refered to as 'idempotency'. -Time Limited Background Operations -`````````````````````````````````` - -Long running operations can be backgrounded, and their status can be checked on later. The same job ID is given to the same task on all hosts, so you won't lose track. Polling support is pending in the command line.:: - - ansible all -B 3600 -a "/usr/bin/long_running_operation --do-stuff" - ansible all -n job_status -a jid=123456789 - -Any module other than 'copy' or 'template' can be backgrounded. Typically you'll be backgrounding shell -commands or software upgrades only. - -After the time limit (in seconds) runs out (-B), the process on the remote nodes will be killed. - File Transfer & Templating `````````````````````````` @@ -74,4 +65,17 @@ Alternatively, restart a service on all webservers:: ansible webservers -m service name=httpd state=restarted +Time Limited Background Operations +`````````````````````````````````` + +Long running operations can be backgrounded, and their status can be checked on later. The same job ID is given to the same task on all hosts, so you won't lose track. Polling support is pending in the command line.:: + + ansible all -B 3600 -a "/usr/bin/long_running_operation --do-stuff" + ansible all -n job_status -a jid=123456789 + +Any module other than 'copy' or 'template' can be backgrounded. Typically you'll be backgrounding shell +commands or software upgrades only. + +After the time limit (in seconds) runs out (-B), the process on the remote nodes will be killed. + diff --git a/rst/playbooks.rst b/rst/playbooks.rst index 71d87d3ee0..890768c589 100644 --- a/rst/playbooks.rst +++ b/rst/playbooks.rst @@ -47,8 +47,7 @@ back on the webservers group, etc:: Hosts line `````````` -The hosts line is a list of one or more groups or host patterns, seperated by colons, as -described in the 'patterns' documentation. This is just like the first parameter to /usr/bin/ansible. +The hosts line is a list of one or more groups or host patterns, seperated by colons, asdescribed in the 'patterns' documentation. This is just like the first parameter to /usr/bin/ansible. Vars section ```````````` @@ -140,6 +139,58 @@ in a wordpress.yml file, and use it like so:: In addition to the explicitly passed in parameters, all variables from the vars section are also available. +The format of an included list of tasks or handlers looks just like a flat list of tasks. Here +is an example of what base.yml might look like:: + + --- + - name: no selinux + action: command /usr/sbin/setenforce 0 + - name: no iptables + action: service name=iptables state=stopped + - name: this is just to show variables work here, favcolor={{ favcolor }} + action: command /bin/true + +As you can see above, variables in include files work just like they do in the main file. +Including a variable in the name of a task is a contrived example, you could also +pass them to the action command line or use them inside a template file. + +Note that include statements are only usable from the top level playbook file. +At this time, includes can not include other includes. + +Using Includes To Assign Classes of Systems +``````````````````````````````````````````` + +Include files are best used to reuse logic between playbooks. You could imagine +a playbook describing your entire infrastructure like this:: + + --- + - hosts: atlanta-webservers + vars: + datacenter: atlanta + tasks: + - include: base.yml + - include: webservers.yml database=db.atlanta.com + handlers: + - include: generic-handlers.yml + - hosts: atlanta-dbservers + vars: + datacenter: atlanta + tasks: + - include: base.yml + - include: dbservers.yml + handlers: + - include: generic-handlers.yml + +There is one (or more) play defined for each group of systems, and each play maps +each group includes one or more 'class definitions' telling the systems what they +are supposed to do or be. + +Using a common handlers file could allow one task in 'webservers' to define 'restart apache', +and it could be reused between multiple plays. + +Variables like 'database' above can be used in templates referenced from the +configuration file to generate machine specific variables. + Asynchronous Actions and Polling ```````````````````````````````` From f3a0eb4b236b4d697bd28122a4d16cafbfdb90d8 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Fri, 9 Mar 2012 07:43:06 -0500 Subject: [PATCH 11/11] Docs build --- html/man/ansible-modules.5.html | 2 +- html/man/ansible-playbook.5.html | 2 +- html/man/ansible.1.html | 2 +- html/searchindex.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/html/man/ansible-modules.5.html b/html/man/ansible-modules.5.html index f1676121f6..83ffc3628c 100644 --- a/html/man/ansible-modules.5.html +++ b/html/man/ansible-modules.5.html @@ -1,6 +1,6 @@ -ansible-modules

    Name

    ansible-modules — stock modules shipped with ansible

    DESCRIPTION

    Ansible ships with a number of modules that can be executed directly on remote hosts or through +ansible-modules

    Name

    ansible-modules — stock modules shipped with ansible

    DESCRIPTION

    Ansible ships with a number of modules that can be executed directly on remote hosts or through ansible playbooks.

    IDEMPOTENCE

    Most modules other than command are idempotent, meaning they will seek to avoid changes unless a change needs to be made. When using ansible playbooks, these modules can trigger change events, as described in ansible-playbooks(5).

    Unless otherwise noted, all modules support change hooks.

    command

    The command module takes the command name followed by a list of arguments, space delimited. diff --git a/html/man/ansible-playbook.5.html b/html/man/ansible-playbook.5.html index de6d091b1f..4ed86baa07 100644 --- a/html/man/ansible-playbook.5.html +++ b/html/man/ansible-playbook.5.html @@ -1,6 +1,6 @@ -ansible-modules

    Name

    ansible-playbook — format and function of an ansible playbook file

    DESCRIPTION

    Ansible ships with ansible-playbook, a tool for running playbooks. +ansible-modules

    Name

    ansible-playbook — format and function of an ansible playbook file

    DESCRIPTION

    Ansible ships with ansible-playbook, a tool for running playbooks. Playbooks can represent frequent tasks, desired system configurations, or deployment processes.

    FORMAT

    Playbooks are written in YAML.

    EXAMPLE

    See:

    • https://github.com/mpdehaan/ansible/blob/master/examples/playbook.yml diff --git a/html/man/ansible.1.html b/html/man/ansible.1.html index dab3740bd3..972bc24aab 100644 --- a/html/man/ansible.1.html +++ b/html/man/ansible.1.html @@ -1,6 +1,6 @@ -ansible

      Name

      ansible — run a command somewhere else

      Synopsis

      ansible <host-pattern> [-f forks] [-m module_name] [-a args]

      DESCRIPTION

      Ansible is an extra-simple tool/framework/API for doing 'remote things' over +ansible

      Name

      ansible — run a command somewhere else

      Synopsis

      ansible <host-pattern> [-f forks] [-m module_name] [-a args]

      DESCRIPTION

      Ansible is an extra-simple tool/framework/API for doing 'remote things' over SSH.

      ARGUMENTS

      host-pattern
      diff --git a/html/searchindex.js b/html/searchindex.js index 918c86baa6..e8f431232d 100644 --- a/html/searchindex.js +++ b/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({objects:{},terms:{all:[0,1,2,3,4,5,6,7],code:[1,2,7],myapp:7,perl:7,mcollect:1,prefix:[2,3,7],concept:7,upgrad:7,follow:[5,6,2,3,7],scp:7,content:[0,1],middl:3,elsewher:7,specif:[5,6,3,7],program:[1,2,3],selinux:3,blindingli:1,spec:3,sourc:[1,6,2,3,7],everi:[4,3],string:2,fals:[4,2],failur:[6,2],veri:[1,6,3],affect:3,max_client:3,level:[4,2,3],id_rsa:[0,7],list:[1,2,3,4,5,7,8],item:[4,6],dotnet:4,saltstack:1,servic:[1,2,3,7],alic:3,natur:2,seper:3,chef:1,second:[4,7],design:1,pass:[2,3],download:0,further:3,port:7,even:7,what:[0,2,3],favcolor:[3,7],section:[1,2,3],abbrevi:4,version:[2,7],varnam:3,ever:1,method:6,told:3,hash:2,facter_hostnam:3,eckersberg:4,gener:3,here:[2,3,7],let:[3,7],address:[5,2],path:2,sinc:7,valu:[4,2,3],box:[1,2],great:1,ahead:3,precursor:1,technolog:1,host:[0,1,2,3,5,6,7],prior:2,pick:[4,7],action:[1,2,3],extrem:0,implement:6,commonli:7,ourselv:3,employe:4,via:[0,1],regardless:[4,1,3],extra:3,modul:[0,1,2,3,6,7],put:[0,7],unix:3,"boolean":4,instal:[7,0,2,3,1],select:[1,2,3,5],httpd:[3,7],from:[0,1,2,3,4,7],describ:[2,3],would:[2,7],commun:1,visit:1,two:[4,0,5],noarch:0,suit:3,live:0,handler:[1,3,7],call:2,usr:[6,2,3,7],msg:[6,2],somevar:3,type:6,tell:[2,3,7],more:[0,5,2,3,1],flat:3,desir:3,idempot:[2,3,7],src:[2,3,7],unneccessari:2,sshd:1,agent:[0,7],particular:[1,3],easiest:1,must:[4,2,3],none:6,join:1,ibm:1,module_arg:6,setup:[1,2,7],work:[7,0,5,3,1],knows_oop:4,remain:1,tag:[0,2],can:[0,1,2,3,4,5,6,7],learn:[0,5,3,1],about:[4,0,2,3,1],purpos:2,root:[4,1,3],control:[1,2,3,7],want:[6,2,3,7],yamllint:4,process:[1,7],rpath:1,sudo:0,share:2,templat:[7,0,2,3,1],critic:1,minimum:3,explor:0,occur:3,contribut:1,alwai:2,multipl:[5,3,7],newlin:4,thoug:2,lame:4,capistrano:1,ping:[0,6,2,1],uptim:6,write:[4,1,2,3,7],how:[0,2,3,4,5,6,7],instead:2,config:[1,3],stock:2,map:3,express:[4,1,6,3],referenc:[5,3],clone:0,after:[3,7],lab:1,befor:[2,3],ohai_:3,mai:[4,0,6],end:[2,3],associ:4,parallel:[1,7],man:[1,8],"short":1,orchestr:[0,1,2,3,5,7],read:[4,0,6],bootstrap:1,explicit:2,element:[4,2],issu:1,inform:[6,2,3],mango:4,combin:4,allow:3,order:3,talk:[0,3],origin:1,help:1,over:[1,7],move:[2,3],orang:4,mission:1,elit:4,rpmbuild:0,comma:4,paramet:[2,3],facter_:3,jid:7,overlord:0,group:[1,6,3,5],cli:6,yaml:[4,1,3],pend:[3,7],rapidli:6,infrastructur:[0,5,3,1],mail:[1,5],job_statu:7,main:3,might:3,them:[2,3,7],"return":[1,6,2],thei:[6,2,3,7],food:4,scene:2,framework:[1,6],jinja2:[0,2,3,7],now:[0,2],nor:2,choic:1,multiprocess:0,name:[4,1,2,3,7],anyth:2,neccessari:[2,7],simpl:[4,1,6,3,7],drop:2,instruct:0,separ:4,exampl:[0,1,2,3,4,5,6,7],each:[4,2,3,7],found:6,updat:7,mean:[2,3],harm:3,michael:1,individu:5,idea:1,realli:[4,2,3],backport:0,facter:[1,2,3,7],our:4,happen:[2,3],event:2,out:[1,2,3,4,6,7],variabl:[2,3,7],network:1,space:[1,2],reboot:7,bubbl:[2,3],rel:2,internet:1,print:6,correct:[4,1,3],red:[1,7],insid:3,advanc:6,ntp:7,given:[2,7],pub:7,base:[1,3],usabl:[1,3],dictionari:4,releas:0,org:0,bash:[0,7],basi:3,pyyaml:0,could:[6,3],fqdn:7,thing:[1,3],place:1,isn:1,assign:[1,3],first:[7,0,2,3,1],oper:[1,7],softwar:[1,2,7],rang:1,notifi:[1,3,7],directli:[2,3,7],onc:[2,3],number:2,yourself:0,hook:2,datastructur:6,alreadi:[0,2,3],puppet:1,construct:6,extend:1,massiv:1,differ:[7,0,3,1],"long":[1,2,7],convent:2,script:[1,6,7],data:[4,6,2,7],top:[2,3],mkdir:3,system:[0,1,2,3,5,7],messag:6,appl:4,too:1,statement:[1,3],john:4,banana:4,iptabl:3,shell:[1,2,7],option:[4,6,3,8,7],welcom:1,tool:[1,6,2,7],copi:[1,2,7],specifi:[4,2,7],retyp:0,provid:4,github:[0,1],off:1,than:[0,2,3,7],liter:2,silli:3,target:[1,5],remot:[0,2,3,7],structur:4,"final":4,project:[0,7,1],reus:3,architect:1,were:3,tion:4,uses_cv:4,pre:0,sai:3,runner:6,favorit:1,ani:[1,6,2,3,7],have:[0,3,1],need:[4,0,2,3,7],seek:2,paramiko:0,imagin:3,engin:7,built:0,note:[5,2,3,7],also:[0,1,2,3,4,5,6,7],client:1,build:[0,6],indic:2,datacent:3,divers:1,begin:4,unless:2,distribut:[0,1],deploy:[0,1,2,3,5,7],track:7,discov:3,most:[4,2],plai:[2,3],regular:3,deploi:[1,2,3,7],pair:2,why:1,don:2,doc:1,later:7,cover:7,doe:[1,2,5],likes_emac:4,snapshot:2,wildcard:5,pattern:[1,6,3,5],awesom:[1,3],show:[3,7],verbos:2,syntax:[4,3],bring:3,raleigh:1,particularli:3,playbook:[0,1,2,3,4,5,6,7],hack:1,radic:1,trivial:[1,2],rotat:3,involv:1,absolut:2,onli:[0,2,3,7],explicitli:3,locat:2,execut:[1,6,2,3],pretti:6,configur:[0,1,2,3,4,5,7],apach:[3,7],state:[2,3,7],should:[4,2],suppos:3,congratul:0,local:2,yml:3,long_running_oper:7,nearli:[2,3],get:[4,0,3,7,1],financ:1,stop:[2,3],repo:[2,7],obviou:1,ssh:[0,7],requir:[0,2,1],uvh:0,bar:5,sha:2,stuff:7,common:3,contain:[2,3],through:[0,2,1],where:[1,2,3],view:[1,8],set:[0,2,3],see:[0,1,2,3,4,5,7],result:[6,2],fail:[6,3],charact:4,skill:4,best:3,asynchron:[1,3],statu:7,kei:[4,0,2,3],databas:3,someth:[1,2,7],discoveri:2,restart:[2,3,7],behind:2,won:7,between:[4,3],"import":6,irc:1,altern:7,manpag:[0,8],style:2,extens:1,job:[4,7],entir:3,aserv:0,webapp:7,asdescrib:3,timmi:3,addit:[4,1,3],delimit:2,goal:1,against:[1,3,5],etc:[7,0,5,3,1],instanc:3,logic:3,mani:[3,7],com:[0,6,3,5],assur:3,simpli:[2,3],overview:4,header:5,written:[1,2,3,7],colon:3,shutdown:2,linux:[1,3],poll:[1,3,7],rpm:[0,1],multiplay:1,three:5,been:1,json:[1,6,2],much:[1,2],far:1,basic:[4,0,5,2,1],quickli:[4,1],indenta:4,wish:[4,0,6,5],fire:1,rubi:[4,2,7],argument:2,func:1,minim:0,atlanta:[3,7],those:[4,2],emploi:4,authorized_kei:0,multi:[1,3],look:[5,3,7],hoc:[1,3,7],straight:7,md5sum:2,permit:4,defin:3,"while":3,abov:3,exist:[1,3],dehaan:1,motd:[3,7],tar:0,stdout:6,non:1,itself:6,conf:[3,7],module_nam:6,sever:4,http_port:3,develop:[4,0,1],inventori:[1,2,3,5],author:1,make:[0,2,3,7],format:[1,2,3,4,5,7],same:[4,5,7],member:4,python:[0,1,2,4,6,7],complex:[1,3],document:[0,6,3,7],ansibl:[0,1,2,3,4,5,6,7,8],complet:3,http:2,hostnam:[6,3],denot:5,nest:2,painless:1,effect:3,fruit:4,user:3,php:7,distutil:[0,1],typic:7,squar:4,task:[1,3,7],kept:3,scenario:2,mention:3,setenforc:3,well:[0,2,3],hypothet:3,contact:[0,6,2],command:[0,1,2,3,5,6,7,8],thi:[0,1,2,3,4,5,7],choos:2,programm:6,dereferenc:3,usual:3,protocol:2,just:[7,0,2,3,1],less:[0,1],when:[2,3,7],kill:7,ntp_server:7,simultan:7,languag:[4,0,5,2,1],web:[6,7],versu:1,easi:[1,2],mix:5,except:3,littl:1,add:[0,7],other:[7,0,2,3,1],simplejson:0,els:1,unlik:3,hat:1,match:3,take:2,bin:[0,6,2,3,7],applic:[6,3],which:[4,0,5,3,1],ohai:[1,2,3,7],dest:[2,3,7],dark:6,game:1,know:[4,2,3],background:[1,7],world:0,bit:2,password:0,daemon:1,motorola:1,like:[4,5,2,3,7],success:2,signal:3,integ:2,noth:3,edit:0,api:[1,6,2],either:2,lose:7,popular:1,output:3,manag:[0,1,2,3,4,5,7],webserv:[5,3,7],some:[0,2],back:3,dead:1,server:[1,2,3,7],tmp:[3,7],render:2,assum:3,avoid:[0,2],though:1,definit:3,per:6,tracker:1,exit:6,foo:[5,7],complic:1,refer:7,machin:[0,2,3,7],core:1,run:[0,6,2,3,7],power:[1,6],usag:[2,7],asciidoc:0,web2:6,step:[2,3],web1:6,repositori:0,"super":1,simpler:7,comparison:1,sbin:[2,3,7],actual:2,othervar:3,surround:4,page:[4,0,8,1],srv:[3,7],done:3,industri:1,own:[1,2,3],real:0,bounc:2,within:2,contriv:3,automat:2,compos:3,down:6,ensur:[3,7],chang:[2,3,7],next:3,bserver:0,your:[0,1,2,3,4,5,7],git:[0,2,7,1],fabric:1,wai:[4,0,3,7],transfer:[1,7],support:[2,7],question:1,fast:1,happi:1,avail:[0,2,3,6,7,8],start:[0,1,2,3,4,7],trigger:2,wordpress:3,includ:[1,3],lot:[1,3,7],replac:3,"var":[1,3],fork:6,head:[2,7],form:[4,3],lint:4,yeah:3,taken:3,line:[0,1,2,3,4,5,6,7,8],"true":[4,2,3],freenod:1,info:3,strawberri:4,made:[2,7],possibl:[5,3,7],whether:6,checkout:2,caller:2,until:0,planet:1,record:4,limit:[1,7],rerun:3,otherwis:2,similar:2,chip:1,curv:1,featur:3,tasti:4,creat:1,certain:3,doesn:1,repres:4,cobbler:1,file:[0,1,2,3,4,5,7],bob:3,ship:2,check:[2,7],echo:0,again:3,googl:1,dbserver:[5,3],excel:1,detail:[1,6],"default":[1,5],bracket:[4,5],futur:0,test:[0,2],you:[0,1,2,3,4,5,7],node:[0,2,7,1],sequenc:1,"class":[1,3],devop:1,log:3,deferenc:3,"60k":1,sphinx:0,directori:[2,3],portion:5,emerg:1,potenti:3,time:[0,1,2,3,5,7],push:3,hello:0},objtypes:{},titles:["Getting Started","Ansible","Ansible Modules","Playbooks: Ansible for Deployment, Configuration Management, and Orchestration","YAML Format","The Inventory File, Patterns, and Groups","Using the Python API","Command Line Examples","Man Pages"],objnames:{},filenames:["gettingstarted","index","modules","playbooks","YAMLScripts","patterns","api","examples","man"]}) \ No newline at end of file +Search.setIndex({objects:{},terms:{all:[0,1,2,3,4,5,6,7],concept:7,mcollect:1,prefix:[2,3,7],code:[1,2,7],follow:[5,6,2,3,7],scp:7,bubbl:[2,3],middl:3,elsewher:7,program:[1,2,3],selinux:3,blindingli:1,spec:3,sourc:[1,6,2,3,7],everi:[4,3],string:2,fals:[4,2],failur:[6,2],veri:[1,6,3],affect:3,level:[4,2,3],id_rsa:[0,7],list:[1,2,3,4,5,7,8],item:[4,6],form:[4,3],dotnet:4,saltstack:1,straight:7,alic:3,natur:2,seper:3,chef:1,second:[4,7],design:1,pass:[2,3],download:0,further:3,port:7,even:7,what:[0,2,3],favcolor:[3,7],section:[1,2,3],abbrevi:4,version:[2,7],varnam:3,ever:1,method:6,told:3,tar:0,hash:2,abov:3,conf:[3,7],eckersberg:4,gener:3,here:[2,3,7],let:[3,7],address:[5,2],path:2,sinc:7,valu:[4,2,3],box:[1,2],great:1,ahead:3,precursor:1,technolog:1,step:[2,3],prior:2,pick:[4,7],action:[1,2,3],extrem:0,implement:6,commonli:7,ourselv:3,employe:4,via:[0,1],regardless:[4,1,3],extra:3,modul:[0,1,2,3,6,7],releas:0,unix:3,"boolean":4,instal:[7,0,2,3,1],select:[1,2,3,5],httpd:[3,7],from:[0,1,2,3,4,7],describ:[2,3],would:[2,7],commun:1,visit:1,two:[4,0,5],noarch:0,live:0,handler:[1,3,7],call:2,usr:[6,2,3,7],msg:[6,2],suppos:3,checkout:2,tell:[2,3,7],more:[0,5,2,3,1],flat:3,desir:3,idempot:[2,3,7],comparison:1,unneccessari:2,sshd:1,agent:[0,7],particular:[1,3],easiest:1,must:[4,2,3],none:6,join:1,ibm:1,module_arg:6,dest:[2,3,7],setup:[1,2,7],work:[7,0,5,3,1],knows_oop:4,remain:1,minimum:3,can:[0,1,2,3,4,5,6,7],learn:[0,5,3,1],about:[4,0,2,3,1],purpos:2,root:[4,1,3],control:[1,2,3,7],want:[6,2,3,7],yamllint:4,process:[1,7],rpath:1,sudo:0,share:2,templat:[7,0,2,3,1],critic:1,liter:2,explor:0,occur:3,nearli:[2,3],alwai:2,multipl:[5,3,7],newlin:4,thoug:2,lame:4,capistrano:1,ping:[0,6,2,1],uptim:6,write:[4,1,2,3,7],how:[0,2,3,4,5,6,7],instead:2,simpl:[4,1,6,3,7],updat:7,map:3,financ:1,referenc:[5,3],clone:0,after:[3,7],usabl:[1,3],befor:[2,3],ohai_:3,mai:[4,0,6],end:[2,3],data:[4,6,2,7],parallel:[1,7],man:[1,8],github:[0,1],orchestr:[0,1,2,3,5,7],bootstrap:1,favorit:1,element:[4,2],issu:1,inform:[6,2,3],mango:4,combin:4,allow:3,order:3,talk:[0,3],oper:[1,7],help:1,over:[1,7],move:[2,3],orang:4,mission:1,elit:4,rpmbuild:0,comma:4,paramet:[2,3],facter_:3,jid:7,overlord:0,group:[1,6,3,5],cli:6,yaml:[4,1,3],pend:[3,7],rapidli:6,infrastructur:[0,5,3,1],mail:[1,5],job_statu:7,main:3,might:3,them:[2,3,7],"return":[1,6,2],thei:[6,2,3,7],food:4,contriv:3,scene:2,framework:[1,6],jinja2:[0,2,3,7],now:[0,2],nor:2,choic:1,multiprocess:0,name:[4,1,2,3,7],anyth:2,neccessari:[2,7],config:[1,3],drop:2,datastructur:6,separ:4,exampl:[0,1,2,3,4,5,6,7],each:[4,2,3,7],found:6,stock:2,mean:[2,3],harm:3,michael:1,individu:5,idea:1,realli:[4,2,3],backport:0,facter:[1,2,3,7],our:4,happen:[2,3],event:2,out:[1,2,3,4,6,7],variabl:[2,3,7],network:1,space:[1,2],reboot:7,content:[0,1],rel:2,internet:1,print:6,correct:[4,1,3],red:[1,7],painless:1,insid:3,advanc:6,ntp:7,given:[2,7],pub:7,base:[1,3],lab:1,dictionari:4,put:[0,7],org:0,bash:[0,7],basi:3,pyyaml:0,could:[6,3],fqdn:7,thing:[1,3],place:1,isn:1,assign:[1,3],first:[7,0,2,3,1],origin:1,softwar:[1,2,7],rang:1,notifi:[1,3,7],directli:[2,3,7],onc:[2,3],number:2,yourself:0,hook:2,instruct:0,alreadi:[0,2,3],puppet:1,construct:6,extend:1,massiv:1,differ:[7,0,3,1],convent:2,script:[1,6,7],associ:4,top:[2,3],mkdir:3,system:[0,1,2,3,5,7],messag:6,inventori:[1,2,3,5],too:1,statement:[1,3],john:4,"final":4,iptabl:3,shell:[1,2,7],option:[4,6,3,8,7],tool:[1,6,2,7],copi:[1,2,7],specifi:[4,2,7],retyp:0,sha:2,"short":1,kept:3,than:[0,2,3,7],silli:3,target:[1,5],remot:[0,2,3,7],structur:4,banana:4,project:[0,7,1],reus:3,architect:1,were:3,tion:4,uses_cv:4,pre:0,sai:3,runner:6,explicit:2,ani:[1,6,2,3,7],have:[0,3,1],need:[4,0,2,3,7],seek:2,paramiko:0,imagin:3,engin:7,built:0,note:[5,2,3,7],also:[0,1,2,3,4,5,6,7],client:1,build:[0,6],indic:2,datacent:3,divers:1,begin:4,unless:2,distribut:[0,1],deploy:[0,1,2,3,5,7],track:7,discov:3,most:[4,2],plai:[2,3],regular:3,deploi:[1,2,3,7],pair:2,why:1,don:2,doc:1,later:7,cover:7,doe:[1,2,5],likes_emac:4,snapshot:2,wildcard:5,databas:3,awesom:[1,3],show:[3,7],verbos:2,syntax:[4,3],bring:3,raleigh:1,particularli:3,playbook:[0,1,2,3,4,5,6,7],hack:1,radic:1,trivial:[1,2],rotat:3,involv:1,absolut:2,onli:[0,2,3,7],explicitli:3,locat:2,just:[7,0,2,3,1],pretti:6,configur:[0,1,2,3,4,5,7],apach:[3,7],behind:2,should:[4,2],somevar:3,freenod:1,local:2,yml:3,long_running_oper:7,contribut:1,get:[4,0,3,7,1],express:[4,1,6,3],stop:[2,3],repo:[2,7],next:3,obviou:1,ssh:[0,7],requir:[0,2,1],uvh:0,bar:5,provid:4,stuff:7,common:3,contain:[2,3],through:[0,2,1],where:[1,2,3],view:[1,8],set:[0,2,3],see:[0,1,2,3,4,5,7],result:[6,2],fail:[6,3],charact:4,ntp_server:7,best:3,planet:1,statu:7,manpag:[0,8],pattern:[1,6,3,5],someth:[1,2,7],discoveri:2,restart:[2,3,7],state:[2,3,7],won:7,between:[4,3],"import":6,irc:1,altern:7,kei:[4,0,2,3],style:2,extens:1,job:[4,7],entir:3,aserv:0,webapp:7,asdescrib:3,timmi:3,addit:[4,1,3],delimit:2,goal:1,against:[1,3,5],etc:[7,0,5,3,1],instanc:3,logic:3,mani:[3,7],com:[0,6,3,5],assur:3,simpli:[2,3],author:1,overview:4,header:5,written:[1,2,3,7],colon:3,shutdown:2,linux:[1,3],poll:[1,3,7],rpm:[0,1],three:5,multiplay:1,compos:3,been:1,json:[1,6,2],much:[1,2],basic:[4,0,5,2,1],quickli:[4,1],indenta:4,fire:1,rubi:[4,2,7],argument:2,func:1,atlanta:[3,7],those:[4,2],emploi:4,authorized_kei:0,multi:[1,3],look:[5,3,7],replac:3,hoc:[1,3,7],servic:[1,2,3,7],md5sum:2,defin:3,"while":3,facter_hostnam:3,cobbler:1,dehaan:1,motd:[3,7],max_client:3,stdout:6,non:1,itself:6,myapp:7,module_nam:6,sever:4,http_port:3,develop:[4,0,1],welcom:1,minim:0,make:[0,2,3,7],ohai:[1,2,3,7],same:[4,5,7],member:4,python:[0,1,2,4,6,7],complex:[1,3],success:2,document:[0,6,3,7],ansibl:[0,1,2,3,4,5,6,7,8],complet:3,http:2,hostnam:[6,3],again:3,nest:2,permit:4,effect:3,fruit:4,user:3,php:7,distutil:[0,1],typic:7,squar:4,task:[1,3,7],off:1,scenario:2,mention:3,setenforc:3,well:[0,2,3],hypothet:3,contact:[0,6,2],command:[0,1,2,3,5,6,7,8],thi:[0,1,2,3,4,5,7],choos:2,programm:6,dereferenc:3,usual:3,protocol:2,execut:[1,6,2,3],less:[0,1],excel:1,kill:7,skill:4,simultan:7,languag:[4,0,5,2,1],web:[6,7],versu:1,easi:[1,2],mix:5,trigger:2,except:3,littl:1,add:[0,7],els:1,unlik:3,hat:1,match:3,take:2,bin:[0,6,2,3,7],applic:[6,3],which:[4,0,5,3,1],format:[1,2,3,4,5,7],read:[4,0,6],fast:1,dark:6,game:1,know:[4,2,3],background:[1,7],world:0,bit:2,password:0,daemon:1,motorola:1,like:[4,5,2,3,7],specif:[5,6,3,7],signal:3,integ:2,noth:3,edit:0,api:[1,6,2],either:2,lose:7,popular:1,output:3,manag:[0,1,2,3,4,5,7],webserv:[5,3,7],some:[0,2],back:3,dead:1,server:[1,2,3,7],tmp:[3,7],render:2,assum:3,avoid:[0,2],though:1,definit:3,per:6,tracker:1,exit:6,foo:[5,7],complic:1,refer:7,machin:[0,2,3,7],core:1,run:[0,6,2,3,7],power:[1,6],usag:[2,7],devop:1,web2:6,host:[0,1,2,3,5,6,7],web1:6,repositori:0,"super":1,simpler:7,src:[2,3,7],sbin:[2,3,7],actual:2,othervar:3,surround:4,page:[4,0,8,1],srv:[3,7],done:3,industri:1,own:[1,2,3],real:0,bounc:2,within:2,tag:[0,2],automat:2,upgrad:7,down:6,ensur:[3,7],chang:[2,3,7],perl:7,bserver:0,your:[0,1,2,3,4,5,7],git:[0,2,7,1],type:6,fabric:1,wai:[4,0,3,7],transfer:[1,7],support:[2,7],question:1,"long":[1,2,7],happi:1,avail:[0,2,3,6,7,8],start:[0,1,2,3,4,7],appl:4,wordpress:3,includ:[1,3],lot:[1,3,7],suit:3,"var":[1,3],fork:6,head:[2,7],simplejson:0,lint:4,yeah:3,taken:3,line:[0,1,2,3,4,5,6,7,8],"true":[4,2,3],congratul:0,info:3,strawberri:4,made:[2,7],possibl:[5,3,7],whether:6,wish:[4,0,6,5],caller:2,until:0,asynchron:[1,3],record:4,limit:[1,7],rerun:3,otherwis:2,similar:2,chip:1,curv:1,featur:3,tasti:4,creat:1,certain:3,doesn:1,repres:4,exist:[1,3],file:[0,1,2,3,4,5,7],bob:3,ship:2,check:[2,7],bracket:[4,5],echo:0,denot:5,googl:1,dbserver:[5,3],when:[2,3,7],detail:[1,6],"default":[1,5],other:[7,0,2,3,1],futur:0,test:[0,2],you:[0,1,2,3,4,5,7],node:[0,2,7,1],sequenc:1,"class":[1,3],asciidoc:0,push:3,log:3,deferenc:3,"60k":1,sphinx:0,directori:[2,3],portion:5,emerg:1,potenti:3,time:[0,1,2,3,5,7],far:1,hello:0},objtypes:{},titles:["Getting Started","Ansible","Ansible Modules","Playbooks: Ansible for Deployment, Configuration Management, and Orchestration","YAML Format","The Inventory File, Patterns, and Groups","Using the Python API","Command Line Examples","Man Pages"],objnames:{},filenames:["gettingstarted","index","modules","playbooks","YAMLScripts","patterns","api","examples","man"]}) \ No newline at end of file