2012-03-07 17:35:18 +01:00
|
|
|
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
|
2012-03-13 00:13:19 +01:00
|
|
|
<title>Downloads & Getting Started — Ansible - SSH-Based Configuration Management & Deployment</title>
|
2012-03-07 17:35:18 +01:00
|
|
|
<link rel="stylesheet" href="_static/default.css" type="text/css" />
|
|
|
|
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
2012-03-09 17:44:14 +01:00
|
|
|
<link rel="stylesheet" href="_static/bootstrap.css" type="text/css" />
|
|
|
|
<link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
|
2012-03-07 17:35:18 +01:00
|
|
|
<script type="text/javascript">
|
|
|
|
var DOCUMENTATION_OPTIONS = {
|
|
|
|
URL_ROOT: '',
|
2012-03-13 00:13:19 +01:00
|
|
|
VERSION: '0.01',
|
2012-03-07 17:35:18 +01:00
|
|
|
COLLAPSE_INDEX: false,
|
|
|
|
FILE_SUFFIX: '.html',
|
2012-03-09 17:50:07 +01:00
|
|
|
HAS_SOURCE: false
|
2012-03-07 17:35:18 +01:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<script type="text/javascript" src="_static/jquery.js"></script>
|
|
|
|
<script type="text/javascript" src="_static/underscore.js"></script>
|
|
|
|
<script type="text/javascript" src="_static/doctools.js"></script>
|
2012-03-09 17:44:14 +01:00
|
|
|
<script type="text/javascript" src="_static/bootstrap-dropdown.js"></script>
|
|
|
|
<script type="text/javascript" src="_static/bootstrap-scrollspy.js"></script>
|
2012-03-13 00:13:19 +01:00
|
|
|
<link rel="top" title="Ansible - SSH-Based Configuration Management & Deployment" href="index.html" />
|
2012-03-08 19:53:48 +01:00
|
|
|
<link rel="next" title="The Inventory File, Patterns, and Groups" href="patterns.html" />
|
2012-03-10 03:50:00 +01:00
|
|
|
<link rel="prev" title="Introducing Ansible" href="index.html" />
|
2012-03-09 17:44:14 +01:00
|
|
|
<script type="text/javascript">
|
|
|
|
(function () {
|
|
|
|
/**
|
|
|
|
* Patch TOC list.
|
|
|
|
*
|
|
|
|
* Will mutate the underlying span to have a correct ul for nav.
|
|
|
|
*
|
|
|
|
* @param $span: Span containing nested UL's to mutate.
|
|
|
|
* @param minLevel: Starting level for nested lists. (1: global, 2: local).
|
|
|
|
*/
|
|
|
|
var patchToc = function ($span, minLevel) {
|
|
|
|
var $tocList = $("<ul/>").attr('class', "dropdown-menu"),
|
|
|
|
findA;
|
|
|
|
|
|
|
|
// Find all a "internal" tags, traversing recursively.
|
|
|
|
findA = function ($elem, level) {
|
|
|
|
var level = level || 0,
|
|
|
|
$items = $elem.find("> li > a.internal, > ul, > li > ul");
|
|
|
|
|
|
|
|
// Iterate everything in order.
|
|
|
|
$items.each(function (index, item) {
|
|
|
|
var $item = $(item),
|
|
|
|
tag = item.tagName.toLowerCase(),
|
|
|
|
pad = 10 + ((level - minLevel) * 10);
|
|
|
|
|
|
|
|
if (tag === 'a' && level >= minLevel) {
|
|
|
|
// Add to existing padding.
|
|
|
|
$item.css('padding-left', pad + "px");
|
|
|
|
// Add list element.
|
|
|
|
$tocList.append($("<li/>").append($item));
|
|
|
|
} else if (tag === 'ul') {
|
|
|
|
// Recurse.
|
|
|
|
findA($item, level + 1);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
// Start construction and return.
|
|
|
|
findA($span);
|
|
|
|
|
|
|
|
// Wipe out old list and patch in new one.
|
|
|
|
return $span.empty("ul").append($tocList);
|
|
|
|
};
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
// Patch the global and local TOC's to be bootstrap-compliant.
|
|
|
|
patchToc($("span.globaltoc"), 1);
|
|
|
|
patchToc($("span.localtoc"), 2);
|
|
|
|
|
|
|
|
// Activate.
|
|
|
|
$('#topbar').dropdown();
|
|
|
|
});
|
|
|
|
}());
|
2012-03-10 04:31:54 +01:00
|
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
var _gaq = _gaq || [];
|
|
|
|
_gaq.push(['_setAccount', 'UA-29861888-1']);
|
|
|
|
_gaq.push(['_trackPageview']);
|
|
|
|
|
|
|
|
(function() {
|
|
|
|
var ga = document.createElement('script'); ga.type =
|
|
|
|
'text/javascript'; ga.async = true;
|
|
|
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl' :
|
|
|
|
'http://www') + '.google-analytics.com/ga.js';
|
|
|
|
var s = document.getElementsByTagName('script')[0];
|
|
|
|
s.parentNode.insertBefore(ga, s);
|
|
|
|
})();
|
|
|
|
|
2012-03-09 17:44:14 +01:00
|
|
|
</script>
|
|
|
|
|
2012-03-07 17:35:18 +01:00
|
|
|
</head>
|
|
|
|
<body>
|
2012-03-09 17:44:14 +01:00
|
|
|
<div class="topbar" data-scrollspy="scrollspy" >
|
|
|
|
<div class="topbar-inner">
|
|
|
|
<div class="container">
|
|
|
|
<a class="brand" href="index.html">Ansible</a>
|
|
|
|
<ul class="nav">
|
|
|
|
|
|
|
|
<li class="dropdown" data-dropdown="dropdown">
|
|
|
|
<a href="index.html"
|
2012-03-31 15:29:31 +02:00
|
|
|
class="dropdown-toggle">Chapter</a>
|
2012-03-09 17:44:14 +01:00
|
|
|
<span class="globaltoc"><ul class="current">
|
2012-03-10 03:50:00 +01:00
|
|
|
<li class="toctree-l1 current"><a class="current reference internal" href="">Downloads & Getting Started</a></li>
|
2012-03-09 17:44:14 +01:00
|
|
|
<li class="toctree-l1"><a class="reference internal" href="patterns.html">The Inventory File, Patterns, and Groups</a></li>
|
|
|
|
<li class="toctree-l1"><a class="reference internal" href="examples.html">Command Line Examples</a></li>
|
|
|
|
<li class="toctree-l1"><a class="reference internal" href="modules.html">Ansible Modules</a></li>
|
2012-03-11 20:34:21 +01:00
|
|
|
<li class="toctree-l1"><a class="reference internal" href="YAMLSyntax.html">YAML Syntax</a></li>
|
2012-03-09 17:44:14 +01:00
|
|
|
<li class="toctree-l1"><a class="reference internal" href="playbooks.html">Playbooks</a></li>
|
2012-03-31 04:28:30 +02:00
|
|
|
<li class="toctree-l1"><a class="reference internal" href="api.html">API & Integrations</a></li>
|
2012-03-14 17:50:40 +01:00
|
|
|
<li class="toctree-l1"><a class="reference internal" href="moduledev.html">Module Development Guide</a></li>
|
2012-03-10 03:50:00 +01:00
|
|
|
<li class="toctree-l1"><a class="reference internal" href="faq.html">Frequently Asked Questions</a></li>
|
2012-03-09 17:44:14 +01:00
|
|
|
<li class="toctree-l1"><a class="reference internal" href="man.html">Man Pages</a></li>
|
|
|
|
</ul>
|
|
|
|
</span>
|
2012-03-31 15:36:37 +02:00
|
|
|
</li>
|
|
|
|
<li class="dropdown" data-dropdown="dropdown">
|
|
|
|
<a href="#"
|
|
|
|
class="dropdown-toggle">Page</a>
|
|
|
|
<span class="localtoc"><ul>
|
|
|
|
<li><a class="reference internal" href="#">Downloads & Getting Started</a><ul>
|
|
|
|
<li><a class="reference internal" href="#requirements">Requirements</a></li>
|
|
|
|
<li><a class="reference internal" href="#developer-requirements">Developer Requirements</a></li>
|
|
|
|
<li><a class="reference internal" href="#getting-ansible">Getting Ansible</a><ul>
|
|
|
|
<li><a class="reference internal" href="#python-distutils">Python Distutils</a></li>
|
|
|
|
<li><a class="reference internal" href="#via-rpm">Via RPM</a></li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li><a class="reference internal" href="#your-first-commands">Your first commands</a></li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</span>
|
2012-03-09 17:44:14 +01:00
|
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
<ul class="nav secondary-nav">
|
|
|
|
|
|
|
|
|
|
|
|
<form class="pull-left" action="search.html" method="get">
|
|
|
|
<input type="text" name="q" placeholder="Search" />
|
|
|
|
<input type="hidden" name="check_keywords" value="yes" />
|
|
|
|
<input type="hidden" name="area" value="default" />
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2012-03-10 16:39:34 +01:00
|
|
|
|
2012-03-09 17:44:14 +01:00
|
|
|
<div class="container">
|
|
|
|
|
2012-03-10 03:50:00 +01:00
|
|
|
<div class="section" id="downloads-getting-started">
|
|
|
|
<h1>Downloads & Getting Started<a class="headerlink" href="#downloads-getting-started" title="Permalink to this headline">¶</a></h1>
|
2012-03-08 19:36:47 +01:00
|
|
|
<p>How to download ansible and get started using it</p>
|
|
|
|
<div class="section" id="requirements">
|
|
|
|
<h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline">¶</a></h2>
|
2012-03-09 04:50:12 +01:00
|
|
|
<p>Requirements for Ansible are extremely minimal.</p>
|
2012-03-10 00:29:01 +01:00
|
|
|
<p>If you are running python 2.6 on the <strong>overlord</strong> machine (the machine
|
|
|
|
that you’ll be talking to the other machines from), you will need:</p>
|
2012-03-08 19:36:47 +01:00
|
|
|
<ul class="simple">
|
|
|
|
<li><tt class="docutils literal"><span class="pre">paramiko</span></tt></li>
|
|
|
|
<li><tt class="docutils literal"><span class="pre">PyYAML</span></tt></li>
|
|
|
|
<li><tt class="docutils literal"><span class="pre">python-jinja2</span></tt> (for playbooks)</li>
|
|
|
|
</ul>
|
|
|
|
<p>If you are running less than Python 2.6, you will also need:</p>
|
|
|
|
<ul class="simple">
|
|
|
|
<li>The Python 2.4 or 2.5 backport of the <tt class="docutils literal"><span class="pre">multiprocessing</span></tt> module<ul>
|
|
|
|
<li><a class="reference external" href="http://code.google.com/p/python-multiprocessing/wiki/Install">Installation and Testing Instructions</a></li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li><tt class="docutils literal"><span class="pre">simplejson</span></tt></li>
|
|
|
|
</ul>
|
|
|
|
<p>On the managed nodes, to use templating, you will need:</p>
|
|
|
|
<ul class="simple">
|
|
|
|
<li><tt class="docutils literal"><span class="pre">python-jinja2</span></tt> (you can install this with ansible)</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="section" id="developer-requirements">
|
|
|
|
<h2>Developer Requirements<a class="headerlink" href="#developer-requirements" title="Permalink to this headline">¶</a></h2>
|
|
|
|
<p>For developers, you may wish to have:</p>
|
|
|
|
<ul class="simple">
|
|
|
|
<li><tt class="docutils literal"><span class="pre">asciidoc</span></tt> (for building manpage documentation)</li>
|
2012-03-09 04:50:12 +01:00
|
|
|
<li><tt class="docutils literal"><span class="pre">python-sphinx</span></tt> (for building content for the ansible.github.com project only)</li>
|
2012-03-08 19:36:47 +01:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="section" id="getting-ansible">
|
|
|
|
<h2>Getting Ansible<a class="headerlink" href="#getting-ansible" title="Permalink to this headline">¶</a></h2>
|
|
|
|
<p>Tagged releases are available as tar.gz files from the Ansible github
|
|
|
|
project page:</p>
|
|
|
|
<ul class="simple">
|
|
|
|
<li><a class="reference external" href="https://github.com/ansible/ansible/downloads">Ansible/downloads</a></li>
|
|
|
|
</ul>
|
|
|
|
<p>You can also clone the git repository yourself and install Ansible in
|
|
|
|
one of two ways:</p>
|
|
|
|
<div class="section" id="python-distutils">
|
|
|
|
<h3>Python Distutils<a class="headerlink" href="#python-distutils" title="Permalink to this headline">¶</a></h3>
|
|
|
|
<p>You can also install Ansible using Python Distutils:</p>
|
|
|
|
<div class="highlight-python"><pre>$ git clone git://github.com/ansible/ansible.git
|
|
|
|
$ cd ./ansible
|
|
|
|
$ sudo make install</pre>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="section" id="via-rpm">
|
|
|
|
<h3>Via RPM<a class="headerlink" href="#via-rpm" title="Permalink to this headline">¶</a></h3>
|
2012-03-10 00:29:01 +01:00
|
|
|
<p>In the near future, pre-built RPMs will be available through your
|
|
|
|
distribution. Until that time you can use the <tt class="docutils literal"><span class="pre">make</span> <span class="pre">rpm</span></tt> command:</p>
|
2012-03-08 19:36:47 +01:00
|
|
|
<div class="highlight-python"><pre>$ git clone git://github.com/ansible/ansible.git
|
|
|
|
$ cd ./ansible
|
|
|
|
$ make rpm
|
|
|
|
$ sudo rpm -Uvh ~/rpmbuild/RPMS/noarch/ansible-1.0-1.noarch.rpm</pre>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="section" id="your-first-commands">
|
|
|
|
<h2>Your first commands<a class="headerlink" href="#your-first-commands" title="Permalink to this headline">¶</a></h2>
|
2012-03-10 00:29:01 +01:00
|
|
|
<p>Edit /etc/ansible/hosts and put one or more remote systems in it, for
|
|
|
|
which you have your SSH key in <tt class="docutils literal"><span class="pre">authorized_keys</span></tt>:</p>
|
2012-03-08 19:36:47 +01:00
|
|
|
<div class="highlight-python"><pre>192.168.1.50
|
|
|
|
aserver.example.org
|
|
|
|
bserver.example.org</pre>
|
|
|
|
</div>
|
2012-03-09 05:06:07 +01:00
|
|
|
<p>Set up SSH agent to avoid retyping passwords:</p>
|
|
|
|
<div class="highlight-python"><pre>ssh-agent bash
|
|
|
|
ssh-add ~/.ssh/id_rsa</pre>
|
|
|
|
</div>
|
|
|
|
<p>Now ping all your nodes:</p>
|
|
|
|
<div class="highlight-python"><pre>ansible all -m ping</pre>
|
|
|
|
</div>
|
|
|
|
<p>Now run a live command on all of your nodes:</p>
|
2012-03-12 02:20:30 +01:00
|
|
|
<div class="highlight-python"><pre>ansible all -a "/bin/echo hello"</pre>
|
2012-03-09 05:06:07 +01:00
|
|
|
</div>
|
2012-03-10 00:29:01 +01:00
|
|
|
<p>Congratulations. You’ve just contacted your nodes with Ansible. It’s
|
2012-03-11 20:34:21 +01:00
|
|
|
now time to read some of the more real-world <a class="reference internal" href="examples.html"><em>Command Line Examples</em></a>, and explore
|
2012-03-10 00:29:01 +01:00
|
|
|
what you can do with different modules, as well as the Ansible
|
2012-03-11 20:34:21 +01:00
|
|
|
<a class="reference internal" href="playbooks.html"><em>Playbooks</em></a> language. Ansible is not just about running commands, but
|
2012-03-10 00:29:01 +01:00
|
|
|
you already have a working infrastructure!</p>
|
|
|
|
<div class="admonition-see-also admonition seealso">
|
|
|
|
<p class="first admonition-title">See also</p>
|
|
|
|
<dl class="last docutils">
|
2012-03-11 20:34:21 +01:00
|
|
|
<dt><a class="reference internal" href="examples.html"><em>Command Line Examples</em></a></dt>
|
|
|
|
<dd>Examples of basic commands</dd>
|
|
|
|
<dt><a class="reference internal" href="playbooks.html"><em>Playbooks</em></a></dt>
|
|
|
|
<dd>Learning ansible’s configuration management language</dd>
|
2012-03-10 00:29:01 +01:00
|
|
|
</dl>
|
|
|
|
</div>
|
2012-03-07 17:35:18 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
2012-03-09 17:44:14 +01:00
|
|
|
<footer class="footer">
|
|
|
|
<div class="container">
|
|
|
|
<p class="pull-right"><a href="#">Back to top</a></p>
|
|
|
|
<p>
|
|
|
|
© Copyright 2012 Michael DeHaan.<br/>
|
2012-03-31 15:29:31 +02:00
|
|
|
Last updated on Mar 31, 2012.<br/>
|
2012-03-10 00:29:01 +01:00
|
|
|
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.<br/>
|
2012-03-09 17:44:14 +01:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</footer>
|
2012-03-07 17:35:18 +01:00
|
|
|
</body>
|
|
|
|
</html>
|