diff --git a/api.html b/api.html
index 8fd017a87d..02f40a73bd 100644
--- a/api.html
+++ b/api.html
@@ -187,15 +187,25 @@ s.parentNode.insertBefore(ga, s);
There are two major ways to use Ansible from an API perspective. The primary way is to use the Ansible python API to control nodes. Ansible is written in its own API so you have a considerable amount of power there.
Also covered here, Ansible’s list of hosts, groups, and variables assigned to each host can be driven from external sources. We’ll start with the Python API.
+Table of contents
+ +The Python API is very powerful, and is how the ansible CLI and ansible-playbook are implemented.
It’s pretty simple:
@@ -263,7 +273,7 @@ command line tools ansibleOften a user of a configuration management system will want to keep inventory in a different system. Frequent examples include LDAP, Cobbler, or a piece of expensive enterprisey CMDB software. Ansible easily supports all @@ -422,9 +432,9 @@ e.g.
Both ec2_security_group_ids and ec2_security_group_names are comma-separated lists of all security groups. Each EC2 tag is a variable in the format ec2_tag_KEY.
To see the complete list of variables available for an instance, run the script by itself:
--+cd examples/scripts -./ec2_external_inventory.py –host ec2-12-12-12-12.compute-1.amazonaws.com
cd examples/scripts
+./ec2_external_inventory.py --host ec2-12-12-12-12.compute-1.amazonaws.com
+See also
Here are some tips for making the most of Ansible.
+Contents
+ +The ‘state’ parameter is optional to a lot of modules. Whether ‘state=present’ or ‘state=absent’, it’s always best to leave that parameter in your playbooks to make it clear, especially as some modules support additional states.
A system can be in multiple groups. See Inventory & Patterns. Having groups named after things like webservers and dbservers is repeated in the examples because it’s a very powerful concept.
This allows playbooks to target machines based on role, as well as to assign role specific variables using the group variable system.
Playbooks should be organized like this:
# root of source control repository
├── acme/
@@ -240,14 +253,9 @@ these sections do, see P
are contained in ‘acme/handlers/main.yml’. As a reminder, handlers are mostly just used to notify services to restart
when things change, and these are described in Playbooks.
Including more than one setup file or more than one handlers file is of course legal.
-Having playbooks be able to include other playbooks is coming in a
-future release. See Issue 538.
-Until then, to manage your entire site, simply execute all of your playbooks together, in the order desired.
-You don’t have to do this though. It’s fine to select sections of your infrastructure to manage at a single time.
-You may wish to construct simple shell scripts to wrap calls to ansible-playbook.
New in version 0.5.
If a playbook has a ”./library” directory relative to it’s YAML file, @@ -256,7 +264,7 @@ automatically be in the ansible module path. This is a great way to keep modules that go with a playbook together.
When you can do something simply, do something simply. Do not reach
to use every feature of Ansible together, all at once. Use what works
for you. For example, you should probably not need ‘vars’,
diff --git a/examples.html b/examples.html
index 62afb9b382..ee3a287fe1 100644
--- a/examples.html
+++ b/examples.html
@@ -186,14 +186,31 @@ s.parentNode.insertBefore(ga, s);
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. (See Playbooks for more information about those)
+Contents
+ +Let’s use ansible’s command line tool to reboot all web servers in Atlanta, 10 at a time. First, let’s set up SSH-agent so it can remember our credentials:
$ ssh-agent bash
@@ -257,7 +274,7 @@ get it there. This is commonly referred to as ‘idempotence’, and is
However, we also recognize that running ad hoc commands is equally important, so Ansible easily supports both.
Here’s another use case for the /usr/bin/ansible command line. Ansible can SCP lots of files to multiple machines in parallel.
To transfer a file directly to many different servers:
$ ansible atlanta -m copy -a "src=/etc/hosts dest=/tmp/hosts"
@@ -281,7 +298,7 @@ same options can be passed directly to the
There are modules available for yum and apt. Here are some examples with yum.
Ensure a package is installed, but don’t update it:
@@ -305,7 +322,7 @@ for other packages for now using the command module or (better!) contribute a mo for other package managers. Stop by the mailing list for info/details.The user module allows easy creation and manipulation of existing user accounts, as well as removal of user accounts that may exist:
@@ -318,7 +335,7 @@ exist: how to manipulate groups and group membership.Deploy your webapp straight from git:
$ ansible webservers -m git -a "repo=git://foo.example.org/repo.git dest=/srv/myapp version=HEAD"
Ensure a service is started on all webservers:
$ ansible webservers -m service -a "name=httpd state=started"
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. If you kick hosts and don’t want @@ -370,7 +387,7 @@ the remote nodes will be terminated.
shell commands or software upgrades only. Backgrounding the copy module does not do a background file transfer. Playbooks also support polling, and have a simplified syntax for this.New in version 0.7.
What hosts you select to manage can be additionally constrained by using the ‘–limit’ parameter or @@ -394,7 +411,7 @@ what their names or IP addresses are).
Both of these methods can be used at the same time, and ranges can also be passed to the –limit parameter.
New in version 0.7.
Ansible has an optional configuration file that can be used to tune settings and also eliminate the need to pass various command line flags. The config file location is controlled by the ANSIBLE_CONFIG environment variable, if set, otherwise ~/.ansible.cfg or /etc/ansible/ansible.cfg will be loaded, whichever comes first. For those running from source, a sample configuration file lives in the examples/ directory. The RPM will install configuration into /etc/ansible/ansible.cfg automatically.
diff --git a/faq.html b/faq.html index 16dba55af4..c5f309be3d 100644 --- a/faq.html +++ b/faq.html @@ -193,14 +193,38 @@ s.parentNode.insertBefore(ga, s);Contents
+One of my favorite books is Orson Scott Card’s “Ender’s Game”. In the book, the Ansible is a method of instantaneous long distance “hyperspace” communication with a large number of space ships. You should read it!
Back when I worked for Red Hat and working on Cobbler, several of us identified a gap between provisioning (Cobbler) and configuration management solutions (cfengine, Puppet, etc). There was a need for a way to do ad-hoc tasks efficiently, and various parallel @@ -232,9 +256,9 @@ best’, and distills all of the ideas behind all of these other tools to th
I’d like to know what you think of it. Hop by the mailing list and say hi.
Ansible uses SSH by default instead of SSL and custom daemons, and requires
no extra software to run on managed machines. You can also write modules
in any language as long as they return JSON. Ansible’s API, of course, is
@@ -243,7 +267,7 @@ a configuration management and multinode orchestration layer (
- First off, Ansible wouldn’t have happened without Puppet. Puppet took configuration
management ideas from cfengine and made them sane. However, I still think they can
be much simpler.vs Puppet?¶
+vs Puppet?¶
Much in the ways Ansible is different from Puppet. Chef is notoriously hard to set up on the server, and requires that you know how to program in Ruby to use the language. As such, it seems to have a pretty good following mainly @@ -292,7 +316,7 @@ submit a patch or module.
has it’s own facts so you do not need to use ohai unless you want to.These tools aren’t really well suited to doing idempotent configuration and are typically about pushing software out for web deployment and automating steps.
Meanwhile Ansible is designed for other types of configuration management, and contains some @@ -303,9 +327,9 @@ useful for sysadmins (not just web developers), and can also be used for firing
Ansible aims to not develop custom daemon or PKI code but rely heavily on OpenSSH, which is extremely well peer reviewed and the most widely used security subsystem in the industry. As a result, Ansible has a lower attack surface than any configuration management tool featuring daemons that run @@ -320,7 +344,7 @@ free RAM and compute resources, which should be relevant to users wanting to max computing investments.
Whether in single-execution mode or using ansible playbooks, ansible can run multiple commands in seperate parallel forks, thanks to the magic behind Python’s multiprocessing module.
@@ -345,7 +369,7 @@ model.If you’d like to discuss scaling strategies further, please hop on the mailing list.
Currently SSH (you can choose between paramiko or the openssh binaries) and local connections are supported. The interface is actually pluggable so a small patch could bring transport over message bus or XMPP as an option.
@@ -353,7 +377,7 @@ small patch could bring transport over message bus or XMPP as an option. are all abstracted away from the core implementation so it is very easy to extend.One of the best use cases? Complex multi-node cloud deployments using playbooks. Another good
example is for configuration management where you
are starting from a clean OS with no extra software installed, adopting systems
diff --git a/gettingstarted.html b/gettingstarted.html
index 2e38545bfe..274224338c 100644
--- a/gettingstarted.html
+++ b/gettingstarted.html
@@ -189,9 +189,22 @@ s.parentNode.insertBefore(ga, s);
Contents
+ +Requirements for Ansible are extremely minimal.
Ansible is written for Python 2.6. If you are running Python 2.5 on an “Enterprise Linux” variant, your distribution can easily install 2.6 (see instructions in the next section). Newer versions @@ -218,7 +231,7 @@ though.)
These distributions don’t have Python 2.6 by default, but it is easily installable. If you have not already done so, configure EPEL
$ yum install python26 python26-PyYAML python26-paramiko python26-jinja2
@@ -226,7 +239,7 @@ installable. If you have not already done so,
If you are interested in using all the latest features, you may wish to keep up to date with the development branch of the git checkout. This also makes it easiest to contribute back to the project.
@@ -310,7 +323,7 @@ project page:By default, ansible uses paramiko to talk to managed nodes over SSH. Paramiko is fast, works very transparently, requires no configuration, and is a good choice for most users. However, it does not support some advanced SSH features that folks will want to use.
@@ -327,7 +340,7 @@ are roughly the same speed. Without CM, the binary ssh transport is signficantlIf none of this makes sense to you, the default paramiko option is probably fine.
Now that you’ve installed Ansible, it’s time to test it.
Edit (or create) /etc/ansible/hosts and put one or more remote systems in it, for which you have your SSH key in authorized_keys:
diff --git a/moduledev.html b/moduledev.html index d82c497062..33f4d89e60 100644 --- a/moduledev.html +++ b/moduledev.html @@ -187,13 +187,31 @@ s.parentNode.insertBefore(ga, s);Ansible modules are reusable units of magic that can be used by the Ansible API, or by the ansible or ansible-playbook programs.
Modules can be written in any language and are found in the path specified by ANSIBLE_LIBRARY_PATH or the --module-path command line option.
+Contents
+ +Let’s build a module to get and set the system time. For starters, let’s build a module that just outputs the current time.
We are going to use Python here but any language is possible. Only File I/O and outputing to standard @@ -223,7 +241,7 @@ you’ll turn to stone. Nobody ever executes async_wrapper directly.
There’s a useful test script in the source checkout for ansible:
git clone git@github.com:ansible/ansible.git
chmod +x ansible/hacking/test-module
@@ -238,7 +256,7 @@ chmod +x ansible/hacking/test-module
If you did not, you might have a typo in your module, so recheck it and try again.
Let’s modify the module to allow setting the current time. We’ll do this by seeing if a key value pair in the form time=<string> is passed in to the module.
Ansible internally saves arguments to an arguments file. So we must read the file @@ -342,7 +360,7 @@ a lot shorter than this:
The ‘setup’ module that ships with Ansible provides many variables about a system that can be used in playbooks and templates. However, it’s possible to also add your own facts without modifying the system module. To do this, just have the module return a ansible_facts key, like so, along with other return data:
@@ -363,7 +381,7 @@ A good idea might be make a module called ‘site_facts’ and always ca we’re always open to improving the selection of core facts in Ansible as well.As mentioned, if you are writing a module in Python, there are some very powerful shortcuts you can use. Modules are still transferred as one file, but an arguments file is no longer needed, so these are not only shorter in terms of code, they are actually FASTER in terms of execution time.
@@ -405,7 +423,7 @@ can function outside of Ansible. class is required.You should also never do this in a module:
print "some status message"
As a reminder from the example code above, here are some basic conventions and guidelines:
To make it easier to write modules in bash and in cases where a JSON module might not be available, it is acceptable for a module to return key=value output all on one line, like this. The Ansible parser @@ -450,7 +468,7 @@ will know what to do:
JSON is probably the simplest way to go.If you think your module is generally useful to others, a good place to share it is in Ansible Resources. This is maintained as a simple repo with pointers to other github projects.
@@ -459,7 +477,7 @@ We would like to build up as many of these as possible in as many languages as pHigh-quality modules with minimal dependencies
can be included in the core, but core modules (just due to the programming
preferences of the developers) will need to be implemented in Python and use
diff --git a/modules.html b/modules.html
index 1e9fc96fd2..f7b2318481 100644
--- a/modules.html
+++ b/modules.html
@@ -149,6 +149,7 @@ s.parentNode.insertBefore(ga, s);
class="dropdown-toggle">Page
Contents Ansible ships with a number of modules (called the ‘module library’)
that can be executed directly on remote hosts or through Playbooks.
Users can also write their own modules. These modules can control system
@@ -237,61 +283,9 @@ not have to write modules in any particular language – you get to choose.<
playbooks, these modules can trigger ‘change events’ in the form of notifying ‘handlers’
to run additional tasks. Let’s see what’s available in the Ansible module library, out of the box:
New in version 0.7. Manages apt repositores Manages apt-packages (such as for Debian/Ubuntu).
New in version 0.5. Assembles a configuration file from fragments. Often a particular
@@ -442,7 +436,7 @@ sorting order. Puppet calls this idea “fragments”.
New in version 0.5. Adds or removes an authorized key for a user from a remote host. The command module takes the command name followed by a list of
arguments, space delimited. The creates= and chdir options will not be passed to the actual executable. The copy module moves a file on the local box to remote locations. In addition to the options
listed below, the arguments available to the file module can also be passed to the copy
module.
New in version 0.7. The easy_install module installs Python libraries. 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 works like ‘copy’, but in reverse. It is used for fetching files
from remote machines and storing them locally in a file tree, organized by hostname. Sets attributes of files, symlinks, and directories, or removes files/symlinks/directories. Many other modules
support the same options as the file module – including ‘copy’, ‘template’, and ‘assmeble’. Downloads files from http, https, or ftp to the remote server. The remote server must have direct
access to the remote resource. Deploys software (or files) from git checkouts. Adds or removes groups.
New in version 0.6. Add or remove MySQL databases from a remote host.
New in version 0.6. Adds or removes a user from a MySQL database.
New in version 0.7. Perform common tasks in Nagios related to downtime and notifications. 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. A trivial test module, this module always returns ‘pong’ on
successful contact. It does not make sense in playbooks, but is useful
from /usr/bin/ansible:
New in version 0.7. Manages Python library dependencies.
New in version 0.6. Add or remove PostgreSQL databases from a remote host.
New in version 0.6. Add or remove PostgreSQL users (roles) from a remote host and, optionally, grant the users
@@ -1532,7 +1526,7 @@ happened and separately if the user was removed or not. Executes a low-down and dirty SSH command, not going through the module subsystem. This is useful and should only be done in two cases. The first case is installing
python-simplejson on older (python 2.4 and before) hosts that need it as a dependency
@@ -1547,7 +1541,7 @@ for this module. Controls services on remote machines. This module is automatically called by playbooks to gather useful variables about remote hosts that can be used
in playbooks. It can also be executed directly by /usr/bin/ansible to check what variables are available
to a host. The shell module takes the command name followed by a list of
arguments, space delimited. It is almost exactly like the command module
but runs the command through the user’s configured shell on the remote node.
New in version 0.7. Deploys a subversion repository.
New in version 0.7. Manage the state of a program or group of programs running via Supervisord Templates a file out to a remote server. Creates user accounts, manipulates existing user accounts, and removes user accounts. Manages virtual machines supported by libvirt. Requires that libvirt be installed
on the managed machine. Will install, upgrade, remove, and list packages with the yum package manager. In addition to the following built-in modules, community modules are available at Ansible Resources. See Module Development. See also 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. Table of contents The format for /etc/ansible/hosts is an INI format and looks like this: Leading zeros can be included or removed, as desired, and the ranges are inclusive. We’ll go over how to use the command line in Command Line Examples And Next Steps section, however, basically it looks like this: Easy enough. See Command Line Examples And Next Steps and then Playbooks for how to do things to selected hosts. It is easy to assign variables to hosts that will be used later in playbooks: Variables can also be applied to an entire group at once: It is also possible to make groups of groups and assign
variables to groups. These variables can be used by /usr/bin/ansible-playbook, but not
/usr/bin/ansible:
New in version 0.6. In addition to the storing variables directly in the INI file, host
@@ -339,7 +354,7 @@ variable called ‘ansible_python_interpreter’ to the Python
interpreter path you would like to use.
Deprecated since version 0.7. Ansible’s YAML inventory format is deprecated and will be removed in
diff --git a/playbooks.html b/playbooks.html
index aa4ada3ba3..c76695f383 100644
--- a/playbooks.html
+++ b/playbooks.html
@@ -149,6 +149,7 @@ s.parentNode.insertBefore(ga, s);
class="dropdown-toggle">Page
Contents Playbooks are a completely different way to use ansible than in task execution mode, and are
particularly powerful. Simply put, playbooks are the basis for a really simple
configuration management and multi-machine deployment system,
@@ -204,8 +222,9 @@ remote systems are in spec. Let’s dive in and see how they work. As you go, you may wish to open
the github examples directory in
another tab, so you can apply the theory to what things look like in practice. Playbooks are expressed in YAML format and have a minimum of syntax.
Each playbook is composed of one or more ‘plays’ in a list. The goal of a play is map a group of hosts to some well defined roles, represented by
@@ -238,7 +257,7 @@ server group, then more commands back on the webservers group, etc. Below, we’ll break down what the various features of the playbook language are. For each play in a playbook, you get to choose which machines in your infrastructure
@@ -378,7 +397,7 @@ make more sense to break up tasks using the ‘include:’ directive. W
As we’ve mentioned, modules are written to be ‘idempotent’ and can relay when
they have made a change on the remote system. Playbooks recognize this and
have a basic event system that can be used to respond to change. Suppose you want to reuse lists of tasks between plays or playbooks. You can use
include files to do this. Use of included task lists is a great way to define a role
that system is going to fulfill. Remember, the goal of a play in a playbook is to map
@@ -477,14 +496,14 @@ ability for hosts to conditionally skip tasks). Now that you’ve learned playbook syntax, how do you run a playbook? It’s simple.
Let’s run a playbook using a parallelism level of 10: Look at the bottom of the playbook execution for a summary of the nodes that were executed
and how they performed. General failures and fatal “unreachable” communication attempts are
kept seperate in the counts. Here are some advanced features of the playbooks language. Using all of these features
are not neccessary, but many of them will prove useful. If a feature doesn’t seem immediately
relevant, feel free to skip it. For many people, the features documented in playbooks will
be 90% or more of what they use in Ansible. Contents
New in version 0.6. To further advance the concept of include files, playbook files can
@@ -245,7 +274,7 @@ all of your systems like this:
Deprecated since version 0.6. Generally playbooks will stop executing any more steps on a host that
@@ -257,7 +286,7 @@ write a task that looks like this: Some provided facts, like networking information, are made available as nested data structures. To access
them a simple ‘$foo’ is not sufficient, but it is still easy to do. Here’s how we get an IP address: If your database server wants to check the value of a ‘fact’ from another node, or an inventory variable
assigned to another node, it’s easy to do so within a template or even an action line: Don’t worry about any of this unless you think you need it. You’ll know when you do. It’s a great idea to keep your playbooks under source control, but
you may wish to make the playbook source public while keeping certain
important variables private. Similarly, sometimes you may just
@@ -335,7 +364,7 @@ similar files, this is covered in
- You may wish to prompt the user for certain input, and can
do so with the similarly named ‘vars_prompt’ section. This has uses
beyond security, for instance, you may use the same playbook for all
@@ -364,7 +393,7 @@ some other options, but otherwise works equivalently: In addition to vars_prompt and vars_files, it is possible to send variables over
the ansible command line. This is particularly useful when writing a generic release playbook
where you may want to pass in the version of the application to deploy: Sometimes you will want to skip a particular step on a particular host. This could be something
as simple as not installing a certain package if the operating system is a particular version,
or it could be something like performing some cleanup steps if a filesystem is getting full. Sometimes you will want to do certain things differently in a playbook based on certain criteria.
Having one playbook that works on multiple platforms and OS versions is a good example. As an example, the name of the Apache package may be different between CentOS and Debian,
@@ -463,7 +492,7 @@ in more streamlined & auditable configuration rules – especially becau
minimum of decision points to track. To save some typing, repeated tasks can be written in short-hand like so: Sometimes a configuration file you want to copy, or a template you will use may depend on a variable.
The following construct selects the first available file appropriate for the variables of a given host,
which is often much cleaner than putting a lot of if conditionals in a template. By default tasks in playbooks block, meaning the connections stay open
until the task is done on each node. If executing playbooks with
a small parallelism value (aka --forks), you may wish that long
@@ -548,7 +577,7 @@ tasks even faster. This also increases the efficiency of polling. It may be useful to use a playbook locally, rather than by connecting over SSH. This can be useful
for assuring the configuration of a system by putting a playbook on a crontab. This may also be used
to run a playbook inside a OS installer, such as an Anaconda kickstart. If you know you don’t need any fact data about your hosts, and know everything about your systems centrally, you
can turn off fact gathering. This has advantages in scaling ansible in push mode with very large numbers of
systems, mainly, or if you are using Ansible on experimental platforms. In any play, just do this: The use of playbooks in local mode (above) is made extremely powerful with the addition of ansible-pull.
A script for setting up ansible-pull is provided in the examples/playbooks directory of the source
checkout.
New in version 0.7. Often in a playbook it may be useful to store the result of a given command in a variable and access
@@ -603,7 +632,7 @@ instance, you could test for the existance of a particular program.
New in version 0.7. By default ansible will try to manage all of the machines referenced in a play in parallel. For a rolling updates
@@ -616,7 +645,7 @@ use case, you can define how many hosts ansible should manage at a single time b
would complete the play completely before moving on to the next 3 hosts.
New in version 0.7. If you want to perform a task on one host with reference to other hosts, use the ‘delegate_to’ keyword on a task.
@@ -654,7 +683,7 @@ a good idea: You have already learned about inventory host and group variables, ‘vars’, and ‘vars_files’. If a variable name is defined in more than one place with the same name, priority is as follows
to determine which place sets the value of the variable. Ansible playbooks are colorized. If you do not like this, set the ANSIBLE_NOCOLOR=1 environment variable. Ansible playbooks also look more impressive with cowsay installed, and we encourage installing this package.
+
Ansible Modules¶
+Ansible Modules¶
+
+
+
+
+Introduction¶
-
+
-apt_repository
-apt
-assemble
-
-authorized_key
-command
-copy
-
-easy_install
-facter
-fetch
-
-file
-get_url
-git
-
-group
-mount
-mysql_db
-
-mysql_user
-nagios
-ohai
-
-ping
-pip
-postgresql_db
-
-postgresql_user
-raw
-service
-
-setup
-shell
-supervisorctl
-
-template
-user
-virt
-
-
-yum
-
-
-apt_repository¶
+apt_repository¶
apt¶
+apt¶
assemble¶
+assemble¶
authorized_key¶
+authorized_key¶
command¶
+command¶
@@ -538,7 +532,7 @@ the user’s environment.
copy¶
+copy¶
easy_install¶
+easy_install¶
facter¶
+facter¶
fetch¶
+fetch¶
@@ -673,7 +667,7 @@ be saved into ‘/foo/host.example.com/tmp/bar’
file¶
+file¶
@@ -771,7 +765,7 @@ file path=/some/path state=directory context=default
get_url¶
+get_url¶
@@ -821,7 +815,7 @@ small local files. prior to 0.6, acts if ‘yes’ by default.
git¶
+git¶
group¶
+group¶
mysql_db¶
+mysql_db¶
mysql_user¶
+mysql_user¶
nagios¶
+nagios¶
ohai¶
+ohai¶
ping¶
+ping¶
pip¶
+pip¶
postgresql_db¶
+postgresql_db¶
postgresql_user¶
+postgresql_user¶
raw¶
+raw¶
service¶
+service¶
setup¶
+setup¶
shell¶
+shell¶
subversion¶
+subversion¶
supervisorctl¶
+supervisorctl¶
template¶
+template¶
user¶
+user¶
virt¶
+virt¶
@@ -2009,7 +2003,7 @@ ansible host -m virt -a "command=virttype"
yum¶
+yum¶
Additional Contrib Modules¶
+Additional Contrib Modules¶
Writing your own modules¶
+Writing your own modules¶
Inventory & Patterns¶
+Inventory & Patterns¶
Hosts and Groups¶
+Hosts and Groups¶
mail.example.com
@@ -217,7 +232,7 @@ after the hostname with a colon.
Selecting Targets¶
+Selecting Targets¶
ansible <pattern_goes_here> -m <module_name> -a <arguments>
Host Variables¶
+Host Variables¶
[atlanta]
host1 http_port=80 maxRequestsPerChild=808
@@ -264,7 +279,7 @@ host2 http_port=303 maxRequestsPerChild=909
Group Variables¶
+Group Variables¶
[atlanta]
host1
@@ -276,7 +291,7 @@ proxy=proxy.atlanta.example.com
Groups of Groups, and Group Variables¶
+Groups of Groups, and Group Variables¶
Splitting Out Host and Group Specific Data¶
+Splitting Out Host and Group Specific Data¶
YAML Inventory¶
+YAML Inventory¶
+
Playbooks¶
+Playbooks¶
+Introduction¶
Playbook Language Example¶
+Playbook Language Example¶
Basics¶
+Basics¶
Hosts and Users¶
Running Operations On Change¶
+Running Operations On Change¶
Include Files And Encouraging Reuse¶
+Include Files And Encouraging Reuse¶
Executing A Playbook¶
+Executing A Playbook¶
ansible-playbook playbook.yml -f 10
Tips and Tricks¶
+Tips and Tricks¶
Advanced Playbooks¶
+Advanced Playbooks¶
+
+
+
+Playbooks Including Playbooks¶
+Playbooks Including Playbooks¶
Ignoring Failed Commands¶
+Ignoring Failed Commands¶
Accessing Complex Variable Data¶
+Accessing Complex Variable Data¶
${ansible_eth0.ipv4.address}
@@ -272,7 +301,7 @@ that is preferred:
Accessing Information About Other Hosts¶
+Accessing Information About Other Hosts¶
${hostvars.hostname.factname}
@@ -302,7 +331,7 @@ period.
Variable File Seperation¶
+Variable File Seperation¶
Prompting For Sensitive Data¶
+Prompting For Sensitive Data¶
Passing Variables On The Command Line¶
+Passing Variables On The Command Line¶
Conditional Execution¶
+Conditional Execution¶
Conditional Imports¶
+Conditional Imports¶
Loop Shorthand¶
+Loop Shorthand¶
- name: add user $item
action: user name=$item state=present groups=wheel
@@ -484,7 +513,7 @@ minimum of decision points to track.
manager transactions.
Selecting Files And Templates Based On Variables¶
+Selecting Files And Templates Based On Variables¶
Asynchronous Actions and Polling¶
+Asynchronous Actions and Polling¶
Local Playbooks¶
+Local Playbooks¶
Turning Off Facts¶
+Turning Off Facts¶
Pull-Mode Playbooks¶
+Pull-Mode Playbooks¶
Register Variables¶
+Register Variables¶
Rolling Updates¶
+Rolling Updates¶
Delegation¶
+Delegation¶
Understanding Variable Precedence¶
+Understanding Variable Precedence¶
Style Points¶
+Style Points¶