Skip to content

Commit

Permalink
Docs build 2024-06-08
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jun 8, 2024
1 parent 4ffc66c commit fe16361
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 180 deletions.
4 changes: 2 additions & 2 deletions en/next/_sources/operations/dnf.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Install/remove/update dnf packages & updates.
extra_install_args=None, extra_uninstall_args=None,
)
+ **packages**: list of packages to ensure
+ **packages**: packages to ensure
+ **present**: whether the packages should be installed
+ **latest**: whether to upgrade packages without a specified version
+ **update**: run ``dnf update`` before installing packages
Expand Down Expand Up @@ -99,7 +99,7 @@ Add/remove/update dnf repositories.
gpgkey=None,
)
+ **name**: URL or name for the ``.repo`` file
+ **src**: URL or name for the ``.repo`` file
+ **present**: whether the ``.repo`` file should be present
+ **baseurl**: the baseurl of the repo (if ``name`` is not a URL)
+ **description**: optional verbose description
Expand Down
2 changes: 1 addition & 1 deletion en/next/_sources/operations/files.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ the ``rsync`` binary on your system.

.. code:: python
files.rsync(src, dest, flags=['-ax', '--delete'])
files.rsync(src, dest, flags=None)
.. important::
The ``files.rsync`` operation is in alpha, and only supported using SSH
Expand Down
85 changes: 1 addition & 84 deletions en/next/_sources/operations/mysql.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ Facts used in these operations: :ref:`facts:mysql.MysqlDatabases`, :ref:`facts:m

:code:`mysql.database`
~~~~~~~~~~~~~~~~~~~~~~

Add/remove MySQL databases.

.. code:: python
mysql.database(
Expand All @@ -33,31 +30,6 @@ Add/remove MySQL databases.
mysql_port=None,
)
+ **name**: the name of the database
+ **present**: whether the database should exist or not
+ **collate**: the collate to use when creating the database
+ **charset**: the charset to use when creating the database
+ **user**: MySQL user to grant privileges on this database to
+ **user_hostname**: the hostname of the MySQL user to grant
+ **user_privileges**: privileges to grant to any specified user
+ **mysql_***: global module arguments, see above

Collate/charset:
these will only be applied if the database does not exist - ie pyinfra
will not attempt to alter the existing databases collate/character sets.

**Example:**

.. code:: python
mysql.database(
name="Create the pyinfra_stuff database",
database="pyinfra_stuff",
user="pyinfra",
user_privileges=["SELECT", "INSERT"],
charset="utf8",
)
.. _operations:mysql.dump:

Expand Down Expand Up @@ -177,68 +149,13 @@ Execute arbitrary SQL against MySQL.

:code:`mysql.user`
~~~~~~~~~~~~~~~~~~

Add/remove/update MySQL users.

.. code:: python
mysql.user(
user, present=True, user_hostname="localhost", password=None, privileges=None,
require=None, require_cipher=False, require_issuer=False, require_subject=False,
require=None, require_cipher=None, require_issuer=None, require_subject=None,
max_connections=None, max_queries_per_hour=None, max_updates_per_hour=None,
max_connections_per_hour=None, mysql_user=None, mysql_password=None, mysql_host=None,
mysql_port=None,
)
+ **user**: the name of the user
+ **present**: whether the user should exist or not
+ **user_hostname**: the hostname of the user
+ **password**: the password of the user (if created)
+ **privileges**: the global privileges for this user
+ **mysql_***: global module arguments, see above

Hostname:
this + ``name`` makes the username - so changing this will create a new
user, rather than update users with the same ``name``.

Password:
will only be applied if the user does not exist - ie pyinfra cannot
detect if the current password doesn't match the one provided, so won't
attempt to change it.

**Example:**

.. code:: python
mysql.user(
name="Create the pyinfra@localhost MySQL user",
user="pyinfra",
password="somepassword",
)
# Create a user with resource limits
mysql.user(
name="Create the pyinfra@localhost MySQL user",
user="pyinfra",
max_connections=50,
max_updates_per_hour=10,
)
# Create a user that requires SSL for connections
mysql.user(
name="Create the pyinfra@localhost MySQL user",
user="pyinfra",
password="somepassword",
require="SSL",
)
# Create a user that requires a specific certificate
mysql.user(
name="Create the pyinfra@localhost MySQL user",
user="pyinfra",
password="somepassword",
require="X509",
require_issuer="/C=SE/ST=Stockholm...",
require_cipher="EDH-RSA-DES-CBC3-SHA",
)
6 changes: 3 additions & 3 deletions en/next/_sources/operations/selinux.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Set the specified SELinux boolean to the desired state.
selinux.boolean(bool_name, value, persistent=False)
+ **boolean**: name of an SELinux boolean
+ **state**: 'on' or 'off'
+ **value**: desired state of the boolean
+ **persistent**: whether to write updated policy or not

Note: This operation requires root privileges.
Expand All @@ -31,7 +31,7 @@ Note: This operation requires root privileges.
selinux.boolean(
name='Allow Apache to connect to LDAP server',
'httpd_can_network_connect',
'on',
Boolean.ON,
persistent=True
)
Expand Down Expand Up @@ -115,7 +115,7 @@ Note: This operation requires root privileges.
selinux.port(
name='Allow Apache to provide service on port 2222',
'tcp',
Protocol.TCP,
2222,
'http_port_t',
)
Expand Down
2 changes: 1 addition & 1 deletion en/next/_sources/operations/server.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ Edit /etc/security/limits.conf configuration.
domain='*',
limit_type='soft',
item='nofile',
value='1024',
value=1024,
)
Expand Down
2 changes: 1 addition & 1 deletion en/next/_sources/operations/yum.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Add/remove/update yum repositories.
+ **src**: URL or name for the ``.repo`` file
+ **present**: whether the ``.repo`` file should be present
+ **baseurl**: the baseurl of the repo (if ``name`` is not a URL)
+ **baseurl**: the baseurl of the repo (if ``src`` is not a URL)
+ **description**: optional verbose description
+ **enabled**: whether this repo is enabled
+ **gpgcheck**: whether set ``gpgcheck=1``
Expand Down
4 changes: 2 additions & 2 deletions en/next/apidoc/pyinfra.api.command.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ <h3>Navigation</h3>
<span id="pyinfra-api-command-module"></span><h1>pyinfra.api.command module<a class="headerlink" href="#module-pyinfra.api.command" title="Permalink to this heading"></a></h1>
<dl class="py class">
<dt class="sig sig-object py" id="pyinfra.api.command.FileDownloadCommand">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><code class="sig-prename descclassname"><span class="pre">pyinfra.api.command.</span></code><code class="sig-name descname"><span class="pre">FileDownloadCommand</span></code><span class="sig-paren">(</span><em><span class="n"><span class="pre">src</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em><span class="n"><span class="pre">dest</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em><span class="n"><span class="pre">remote_temp_filename</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Unpack</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyinfra.api.command.FileDownloadCommand" title="Permalink to this definition"></a></dt>
<em class="property"><span class="pre">class</span><span class="w"> </span></em><code class="sig-prename descclassname"><span class="pre">pyinfra.api.command.</span></code><code class="sig-name descname"><span class="pre">FileDownloadCommand</span></code><span class="sig-paren">(</span><em><span class="n"><span class="pre">src</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em><span class="n"><span class="pre">dest</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">IO</span></span></em>, <em><span class="n"><span class="pre">remote_temp_filename</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Unpack</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyinfra.api.command.FileDownloadCommand" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyinfra.api.command.PyinfraCommand" title="pyinfra.api.command.PyinfraCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyinfraCommand</span></code></a></p>
<dl class="py method">
<dt class="sig sig-object py" id="pyinfra.api.command.FileDownloadCommand.execute">
Expand All @@ -181,7 +181,7 @@ <h3>Navigation</h3>

<dl class="py class">
<dt class="sig sig-object py" id="pyinfra.api.command.FileUploadCommand">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><code class="sig-prename descclassname"><span class="pre">pyinfra.api.command.</span></code><code class="sig-name descname"><span class="pre">FileUploadCommand</span></code><span class="sig-paren">(</span><em><span class="n"><span class="pre">src</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em><span class="n"><span class="pre">dest</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em><span class="n"><span class="pre">remote_temp_filename</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Unpack</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyinfra.api.command.FileUploadCommand" title="Permalink to this definition"></a></dt>
<em class="property"><span class="pre">class</span><span class="w"> </span></em><code class="sig-prename descclassname"><span class="pre">pyinfra.api.command.</span></code><code class="sig-name descname"><span class="pre">FileUploadCommand</span></code><span class="sig-paren">(</span><em><span class="n"><span class="pre">src</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">IO</span></span></em>, <em><span class="n"><span class="pre">dest</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em><span class="n"><span class="pre">remote_temp_filename</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Unpack</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyinfra.api.command.FileUploadCommand" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyinfra.api.command.PyinfraCommand" title="pyinfra.api.command.PyinfraCommand"><code class="xref py py-class docutils literal notranslate"><span class="pre">PyinfraCommand</span></code></a></p>
<dl class="py method">
<dt class="sig sig-object py" id="pyinfra.api.command.FileUploadCommand.execute">
Expand Down
2 changes: 1 addition & 1 deletion en/next/apidoc/pyinfra.api.util.html
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ <h3>Navigation</h3>

<dl class="py function">
<dt class="sig sig-object py" id="pyinfra.api.util.get_template">
<code class="sig-prename descclassname"><span class="pre">pyinfra.api.util.</span></code><code class="sig-name descname"><span class="pre">get_template</span></code><span class="sig-paren">(</span><em><span class="n"><span class="pre">filename_or_io</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyinfra.api.util.get_template" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname"><span class="pre">pyinfra.api.util.</span></code><code class="sig-name descname"><span class="pre">get_template</span></code><span class="sig-paren">(</span><em><span class="n"><span class="pre">filename_or_io</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">IO</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyinfra.api.util.get_template" title="Permalink to this definition"></a></dt>
<dd><p>Gets a jinja2 <code class="docutils literal notranslate"><span class="pre">Template</span></code> object for the input filename or string, with caching
based on the filename of the template, or the SHA1 of the input string.</p>
</dd></dl>
Expand Down
4 changes: 2 additions & 2 deletions en/next/operations/dnf.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ <h1>Dnf Operations<a class="headerlink" href="#dnf-operations" title="Permalink
</pre></div>
</div>
<ul class="simple">
<li><strong>packages</strong>: list of packages to ensure</li>
<li><strong>packages</strong>: packages to ensure</li>
<li><strong>present</strong>: whether the packages should be installed</li>
<li><strong>latest</strong>: whether to upgrade packages without a specified version</li>
<li><strong>update</strong>: run <code class="docutils literal notranslate"><span class="pre">dnf</span> <span class="pre">update</span></code> before installing packages</li>
Expand Down Expand Up @@ -256,7 +256,7 @@ <h1>Dnf Operations<a class="headerlink" href="#dnf-operations" title="Permalink
</pre></div>
</div>
<ul class="simple">
<li><strong>name</strong>: URL or name for the <code class="docutils literal notranslate"><span class="pre">.repo</span></code> file</li>
<li><strong>src</strong>: URL or name for the <code class="docutils literal notranslate"><span class="pre">.repo</span></code> file</li>
<li><strong>present</strong>: whether the <code class="docutils literal notranslate"><span class="pre">.repo</span></code> file should be present</li>
<li><strong>baseurl</strong>: the baseurl of the repo (if <code class="docutils literal notranslate"><span class="pre">name</span></code> is not a URL)</li>
<li><strong>description</strong>: optional verbose description</li>
Expand Down
2 changes: 1 addition & 1 deletion en/next/operations/files.html
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ <h1>Files Operations<a class="headerlink" href="#files-operations" title="Permal
</div>
<p>Use <code class="docutils literal notranslate"><span class="pre">rsync</span></code> to sync a local directory to the remote system. This operation will actually call
the <code class="docutils literal notranslate"><span class="pre">rsync</span></code> binary on your system.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">files</span><span class="o">.</span><span class="n">rsync</span><span class="p">(</span><span class="n">src</span><span class="p">,</span> <span class="n">dest</span><span class="p">,</span> <span class="n">flags</span><span class="o">=</span><span class="p">[</span><span class="s1">&#39;-ax&#39;</span><span class="p">,</span> <span class="s1">&#39;--delete&#39;</span><span class="p">])</span>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">files</span><span class="o">.</span><span class="n">rsync</span><span class="p">(</span><span class="n">src</span><span class="p">,</span> <span class="n">dest</span><span class="p">,</span> <span class="n">flags</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span>
</pre></div>
</div>
<div class="admonition important">
Expand Down
Loading

0 comments on commit fe16361

Please sign in to comment.