mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Update module docs to include new user/group control features, fix formatting on playbooks page.
This commit is contained in:
parent
8d92efa9fc
commit
a879278713
8 changed files with 97 additions and 24 deletions
|
@ -191,7 +191,7 @@ will remain short & simple, and the source will be blindingly obvious.</p>
|
|||
<p>We’ve learned well from “Infrastructure is Code”. Infrastructure should be easy and powerful to command, but it should not look like code, lest it acquire the disadvantages of a software project – bugs, complexity, and overhead. Infrastructure configurations should be simple, easy to develop, and easy to audit.</p>
|
||||
<div class="section" id="architecture">
|
||||
<h2>Architecture<a class="headerlink" href="#architecture" title="Permalink to this headline">¶</a></h2>
|
||||
<img alt=""Architecture Diagram"" src="http://ansible.github.com/ansible_arch2.jpg" style="width: 800px;" />
|
||||
<div align="center" class="align-center"><img alt=""Architecture Diagram"" class="align-center" src="http://ansible.github.com/ansible_arch2.jpg" style="width: 800px;" /></div>
|
||||
</div>
|
||||
<div class="section" id="features">
|
||||
<h2>Features<a class="headerlink" href="#features" title="Permalink to this headline">¶</a></h2>
|
||||
|
@ -270,6 +270,7 @@ Email: <input type=text name=email> <input type=submit name="sub" val
|
|||
<li class="toctree-l2"><a class="reference internal" href="modules.html#facter">facter</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="modules.html#file">file</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="modules.html#git">git</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="modules.html#group">group</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="modules.html#ohai">ohai</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="modules.html#ping">ping</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="modules.html#service">service</a></li>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!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>ansible-playbook</title><link rel="stylesheet" href="./docbook-xsl.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /></head><body><div xml:lang="en" class="refentry" title="ansible-playbook" lang="en"><a id="id559301"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ansible-playbook — run an ansible playbook</p></div><div class="refsynopsisdiv" title="Synopsis"><a id="_synopsis"></a><h2>Synopsis</h2><p>ansible-playbook <filename.yml> … [options]</p></div><div class="refsect1" title="DESCRIPTION"><a id="_description"></a><h2>DESCRIPTION</h2><p><span class="strong"><strong>Ansible playbooks</strong></span> are a configuration and multinode deployment
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ansible-playbook</title><link rel="stylesheet" href="./docbook-xsl.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /></head><body><div xml:lang="en" class="refentry" title="ansible-playbook" lang="en"><a id="id411675"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ansible-playbook — run an ansible playbook</p></div><div class="refsynopsisdiv" title="Synopsis"><a id="_synopsis"></a><h2>Synopsis</h2><p>ansible-playbook <filename.yml> … [options]</p></div><div class="refsect1" title="DESCRIPTION"><a id="_description"></a><h2>DESCRIPTION</h2><p><span class="strong"><strong>Ansible playbooks</strong></span> are a configuration and multinode deployment
|
||||
system. Ansible-playbook is the tool used to run them. See the
|
||||
project home page (link below) for more information.</p></div><div class="refsect1" title="ARGUMENTS"><a id="_arguments"></a><h2>ARGUMENTS</h2><div class="variablelist"><dl><dt><span class="term">
|
||||
<span class="strong"><strong>filename.yml</strong></span>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!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>ansible</title><link rel="stylesheet" href="./docbook-xsl.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /></head><body><div xml:lang="en" class="refentry" title="ansible" lang="en"><a id="id377166"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ansible — run a command somewhere else</p></div><div class="refsynopsisdiv" title="Synopsis"><a id="_synopsis"></a><h2>Synopsis</h2><p>ansible <host-pattern> [-f forks] [-m module_name] [-a args]</p></div><div class="refsect1" title="DESCRIPTION"><a id="_description"></a><h2>DESCRIPTION</h2><p><span class="strong"><strong>Ansible</strong></span> is an extra-simple tool/framework/API for doing 'remote things' over
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ansible</title><link rel="stylesheet" href="./docbook-xsl.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /></head><body><div xml:lang="en" class="refentry" title="ansible" lang="en"><a id="id351566"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ansible — run a command somewhere else</p></div><div class="refsynopsisdiv" title="Synopsis"><a id="_synopsis"></a><h2>Synopsis</h2><p>ansible <host-pattern> [-f forks] [-m module_name] [-a args]</p></div><div class="refsect1" title="DESCRIPTION"><a id="_description"></a><h2>DESCRIPTION</h2><p><span class="strong"><strong>Ansible</strong></span> is an extra-simple tool/framework/API for doing 'remote things' over
|
||||
SSH.</p></div><div class="refsect1" title="ARGUMENTS"><a id="_arguments"></a><h2>ARGUMENTS</h2><div class="variablelist"><dl><dt><span class="term">
|
||||
<span class="strong"><strong>host-pattern</strong></span>
|
||||
</span></dt><dd>
|
||||
|
|
45
modules.html
45
modules.html
|
@ -135,6 +135,7 @@ s.parentNode.insertBefore(ga, s);
|
|||
<li><a class="reference internal" href="#facter">facter</a></li>
|
||||
<li><a class="reference internal" href="#file">file</a></li>
|
||||
<li><a class="reference internal" href="#git">git</a></li>
|
||||
<li><a class="reference internal" href="#group">group</a></li>
|
||||
<li><a class="reference internal" href="#ohai">ohai</a></li>
|
||||
<li><a class="reference internal" href="#ping">ping</a></li>
|
||||
<li><a class="reference internal" href="#service">service</a></li>
|
||||
|
@ -310,6 +311,26 @@ file dest/path/to/delete state=absent</pre>
|
|||
<div class="highlight-python"><pre>git repo=git://foosball.example.org/path/to/repo.git dest=/srv/checkout version=release-0.22</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="group">
|
||||
<h2>group<a class="headerlink" href="#group" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Adds or removes groups.</p>
|
||||
<p><em>name</em>:</p>
|
||||
<ul class="simple">
|
||||
<li>name of the group</li>
|
||||
</ul>
|
||||
<p><em>gid</em>:</p>
|
||||
<ul class="simple">
|
||||
<li>optional gid to set for the group</li>
|
||||
</ul>
|
||||
<p><em>state</em>:</p>
|
||||
<ul class="simple">
|
||||
<li>either ‘absent’, or ‘present’. ‘present’ is the default.</li>
|
||||
</ul>
|
||||
<p>To control members of the group, see the users resource.</p>
|
||||
<p>Example action from Ansible <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p>
|
||||
<div class="highlight-python"><pre>group name=somegroup state=present</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="ohai">
|
||||
<h2>ohai<a class="headerlink" href="#ohai" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Similar to the <a class="reference internal" href="#facter"><em>facter</em></a> module, this returns JSON inventory data.
|
||||
|
@ -427,6 +448,14 @@ be a relative or absolute path.</li>
|
|||
<ul class="simple">
|
||||
<li>Optionally sets the user’s primary group, takes a group name.</li>
|
||||
</ul>
|
||||
<p><em>groups</em>:</p>
|
||||
<ul class="simple">
|
||||
<li>Put the user in the specified groups, takes comma delimited group names.</li>
|
||||
</ul>
|
||||
<p><em>append</em>:</p>
|
||||
<ul class="simple">
|
||||
<li>If true, will only add additional groups to the user listed in ‘groups’, rather than making the user only be in those specified groups.</li>
|
||||
</ul>
|
||||
<p><em>shell</em>:</p>
|
||||
<ul class="simple">
|
||||
<li>Optionally sets the user’s shell.</li>
|
||||
|
@ -437,16 +466,24 @@ be a relative or absolute path.</li>
|
|||
</ul>
|
||||
<p><em>password</em>:</p>
|
||||
<ul class="simple">
|
||||
<li>Sets the user’s password to this crypted value. Pass in a result from crypt. See the users
|
||||
example in the github examples directory for what this looks like in a playbook.</li>
|
||||
<li>Sets the user’s password to this crypted value. Pass in a result from crypt. See the users example in the github examples directory for what this looks like in a playbook.</li>
|
||||
</ul>
|
||||
<p><em>state</em>:</p>
|
||||
<ul class="simple">
|
||||
<li>Defaults to ‘present’. When ‘absent’, the user account will be removed if present.</li>
|
||||
<li>Defaults to ‘present’. When ‘absent’, the user account will be removed if present. Optionally additional removal behaviors can be set with the ‘force’ or ‘remove’ parameter values (see below).</li>
|
||||
</ul>
|
||||
<p><em>force</em>:</p>
|
||||
<ul class="simple">
|
||||
<li>When used with a state of ‘absent’, the behavior denoted in the ‘userdel’ manpage for –force is also used when removing the user. Value is ‘yes’ or ‘no’, default is ‘no’.</li>
|
||||
</ul>
|
||||
<p><em>remove</em>:</p>
|
||||
<ul class="simple">
|
||||
<li>When used with a state of ‘absent’, the behavior denoted in the ‘userdel’ manpage for –remove is also used when removing the user. Value is ‘yes’ or ‘no’, default is ‘no’.</li>
|
||||
</ul>
|
||||
<p>Example action from Ansible <a class="reference internal" href="playbooks.html"><em>Playbooks</em></a>:</p>
|
||||
<div class="highlight-python"><pre>user name=mdehaan comment=awesome passwd=awWxVV.JvmdHw createhome=yes
|
||||
user name=mdehaan state=absent</pre>
|
||||
user name=mdehaan groups=wheel,skynet
|
||||
user name=mdehaan state=absent force=yes</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="yum">
|
||||
|
|
|
@ -232,15 +232,12 @@ documentation. The <cite>user</cite> is just the name of the user account:</p>
|
|||
- hosts: webservers
|
||||
user: root</pre>
|
||||
</div>
|
||||
<p>Support for running things from sudo is also available. Sudo must be
|
||||
configured to not require a password.</p>
|
||||
<blockquote>
|
||||
<div><p>—
|
||||
- hosts: webservers</p>
|
||||
<blockquote>
|
||||
<div>user: yourname
|
||||
sudo: True</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p>Support for running things from sudo is also available:</p>
|
||||
<div class="highlight-python"><pre>---
|
||||
- hosts: webservers
|
||||
user: yourname
|
||||
sudo: True</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="vars-section">
|
||||
<h3>Vars section<a class="headerlink" href="#vars-section" title="Permalink to this headline">¶</a></h3>
|
||||
|
|
|
@ -177,6 +177,29 @@ Example action from Ansible :doc:`playbooks`::
|
|||
git repo=git://foosball.example.org/path/to/repo.git dest=/srv/checkout version=release-0.22
|
||||
|
||||
|
||||
group
|
||||
`````
|
||||
|
||||
Adds or removes groups.
|
||||
|
||||
*name*:
|
||||
|
||||
* name of the group
|
||||
|
||||
*gid*:
|
||||
|
||||
* optional gid to set for the group
|
||||
|
||||
*state*:
|
||||
|
||||
* either 'absent', or 'present'. 'present' is the default.
|
||||
|
||||
To control members of the group, see the users resource.
|
||||
|
||||
Example action from Ansible :doc:`playbooks`::
|
||||
|
||||
group name=somegroup state=present
|
||||
|
||||
ohai
|
||||
````
|
||||
|
||||
|
@ -327,6 +350,14 @@ Creates user accounts, manipulates existing user accounts, and removes user acco
|
|||
|
||||
* Optionally sets the user's primary group, takes a group name.
|
||||
|
||||
*groups*:
|
||||
|
||||
* Put the user in the specified groups, takes comma delimited group names.
|
||||
|
||||
*append*:
|
||||
|
||||
* If true, will only add additional groups to the user listed in 'groups', rather than making the user only be in those specified groups.
|
||||
|
||||
*shell*:
|
||||
|
||||
* Optionally sets the user's shell.
|
||||
|
@ -337,17 +368,25 @@ Creates user accounts, manipulates existing user accounts, and removes user acco
|
|||
|
||||
*password*:
|
||||
|
||||
* Sets the user's password to this crypted value. Pass in a result from crypt. See the users
|
||||
example in the github examples directory for what this looks like in a playbook.
|
||||
* Sets the user's password to this crypted value. Pass in a result from crypt. See the users example in the github examples directory for what this looks like in a playbook.
|
||||
|
||||
*state*:
|
||||
|
||||
* Defaults to 'present'. When 'absent', the user account will be removed if present.
|
||||
* Defaults to 'present'. When 'absent', the user account will be removed if present. Optionally additional removal behaviors can be set with the 'force' or 'remove' parameter values (see below).
|
||||
|
||||
*force*:
|
||||
|
||||
* When used with a state of 'absent', the behavior denoted in the 'userdel' manpage for --force is also used when removing the user. Value is 'yes' or 'no', default is 'no'.
|
||||
|
||||
*remove*:
|
||||
|
||||
* When used with a state of 'absent', the behavior denoted in the 'userdel' manpage for --remove is also used when removing the user. Value is 'yes' or 'no', default is 'no'.
|
||||
|
||||
Example action from Ansible :doc:`playbooks`::
|
||||
|
||||
user name=mdehaan comment=awesome passwd=awWxVV.JvmdHw createhome=yes
|
||||
user name=mdehaan state=absent
|
||||
user name=mdehaan groups=wheel,skynet
|
||||
user name=mdehaan state=absent force=yes
|
||||
|
||||
.. _yum:
|
||||
|
||||
|
|
|
@ -73,8 +73,7 @@ documentation. The `user` is just the name of the user account::
|
|||
user: root
|
||||
|
||||
|
||||
Support for running things from sudo is also available. Sudo must be
|
||||
configured to not require a password.
|
||||
Support for running things from sudo is also available::
|
||||
|
||||
---
|
||||
- hosts: webservers
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue