ansible/html/gettingstarted.html

216 lines
9.4 KiB
HTML
Raw Normal View History

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" />
<title>Getting Started &mdash; Ansible v0.0.1 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '0.0.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</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>
<link rel="top" title="Ansible v0.0.1 documentation" 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-07 17:35:18 +01:00
<link rel="prev" title="Ansible" href="index.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
2012-03-08 19:53:48 +01:00
<a href="patterns.html" title="The Inventory File, Patterns, and Groups"
2012-03-07 17:35:18 +01:00
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="Ansible"
accesskey="P">previous</a> |</li>
<li><a href="index.html">Ansible v0.0.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="getting-started">
<h1>Getting Started<a class="headerlink" href="#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>
2012-03-07 17:35:18 +01:00
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
2012-03-08 19:36:47 +01:00
<dt><a class="reference internal" href="examples.html"><em>Examples</em></a></dt>
<dd>Examples of basic commands</dd>
2012-03-08 19:53:48 +01:00
<dt><a class="reference internal" href="playbooks.html"><em>Playbooks: Ansible for Deployment, Configuration Management, and Orchestration</em></a></dt>
2012-03-08 19:36:47 +01:00
<dd>Learning ansible&#8217;s configuration management language</dd>
2012-03-07 17:35:18 +01:00
</dl>
</div>
2012-03-08 19:36:47 +01:00
<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>
<p>If you are running python 2.6 on the <strong>overlord</strong> machine (the machine that you&#8217;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>
<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>
<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>
<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>
<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>
<div class="highlight-python"><pre>ansible all /bin/echo hello</pre>
</div>
2012-03-08 19:36:47 +01:00
<p>Congratulations. You&#8217;ve just contacted your nodes with Ansible. It&#8217;s now time to read some
2012-03-09 04:50:12 +01:00
of the more real-world examples, and explore what you can do with different modules, as well
2012-03-09 05:06:07 +01:00
as the Ansible playbooks language. Ansible is not just about running commands, but you already
have a working infrastructure!</p>
2012-03-07 17:35:18 +01:00
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Getting Started</a><ul>
2012-03-08 19:36:47 +01:00
<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>
2012-03-07 17:35:18 +01:00
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="index.html"
title="previous chapter">Ansible</a></p>
<h4>Next topic</h4>
2012-03-08 19:36:47 +01:00
<p class="topless"><a href="patterns.html"
2012-03-08 19:53:48 +01:00
title="next chapter">The Inventory File, Patterns, and Groups</a></p>
2012-03-07 17:35:18 +01:00
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/gettingstarted.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
2012-03-08 19:36:47 +01:00
<input type="text" name="q" />
2012-03-07 17:35:18 +01:00
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
2012-03-08 19:53:48 +01:00
<a href="patterns.html" title="The Inventory File, Patterns, and Groups"
2012-03-07 17:35:18 +01:00
>next</a> |</li>
<li class="right" >
<a href="index.html" title="Ansible"
>previous</a> |</li>
<li><a href="index.html">Ansible v0.0.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2012 Michael DeHaan.
2012-03-08 19:36:47 +01:00
Last updated on Mar 08, 2012.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.
2012-03-07 17:35:18 +01:00
</div>
</body>
</html>