ansible-collections.communi.../branch/main/api_modify_module.html

700 lines
73 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>community.routeros.api_modify module Modify data at paths with API &mdash; Community.Routeros Collection documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/ansible.css" type="text/css" />
<link rel="stylesheet" href="_static/antsibull-minimal.css" type="text/css" />
<link rel="stylesheet" href="_static/css/rtd-ethical-ads.css" type="text/css" />
<link rel="shortcut icon" href="_static/images/Ansible-Mark-RGB_Black.png"/>
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script src="_static/jquery.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="community.routeros.command module Run commands on remote devices running MikroTik RouterOS" href="command_module.html" />
<link rel="prev" title="community.routeros.api_info module Retrieve information from API" href="api_info_module.html" /><!-- extra head elements for Ansible beyond RTD Sphinx Theme -->
</head>
<body class="wy-body-for-nav"><!-- extra body elements for Ansible beyond RTD Sphinx Theme -->
<div class="DocSite-globalNav ansibleNav">
<ul>
<li><a href="https://www.ansible.com/ansiblefest" target="_blank">AnsibleFest</a></li>
<li><a href="https://www.ansible.com/tower" target="_blank">Products</a></li>
<li><a href="https://www.ansible.com/community" target="_blank">Community</a></li>
<li><a href="https://www.ansible.com/webinars-training" target="_blank">Webinars & Training</a></li>
<li><a href="https://www.ansible.com/blog" target="_blank">Blog</a></li>
</ul>
</div>
<a class="DocSite-nav" href="https://ansible-collections.github.io/community.routeros/branch/main/" style="padding-bottom: 30px;">
<img class="DocSiteNav-logo"
src="_static/images/Ansible-Mark-RGB_White.png"
alt="Ansible Logo">
<div class="DocSiteNav-title">Community.Routeros Collection Docs</div>
</a>
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home">
Community.Routeros Collection
</a><!--- Based on https://github.com/rtfd/sphinx_rtd_theme/pull/438/files -->
<div class="version">
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<label class="sr-only" for="q">Search docs:</label>
<input type="text" class="st-default-search-input" id="q" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="docsite/api-guide.html">How to connect to RouterOS devices with the RouterOS API</a></li>
<li class="toctree-l1"><a class="reference internal" href="docsite/ssh-guide.html">How to connect to RouterOS devices with SSH</a></li>
<li class="toctree-l1"><a class="reference internal" href="docsite/quoting.html">How to quote and unquote commands and arguments</a></li>
</ul>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="api_module.html">community.routeros.api module Ansible module for RouterOS API</a></li>
<li class="toctree-l1"><a class="reference internal" href="api_facts_module.html">community.routeros.api_facts module Collect facts from remote devices running MikroTik RouterOS using the API</a></li>
<li class="toctree-l1"><a class="reference internal" href="api_find_and_modify_module.html">community.routeros.api_find_and_modify module Find and modify information using the API</a></li>
<li class="toctree-l1"><a class="reference internal" href="api_info_module.html">community.routeros.api_info module Retrieve information from API</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">community.routeros.api_modify module Modify data at paths with API</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#synopsis">Synopsis</a></li>
<li class="toctree-l2"><a class="reference internal" href="#requirements">Requirements</a></li>
<li class="toctree-l2"><a class="reference internal" href="#parameters">Parameters</a></li>
<li class="toctree-l2"><a class="reference internal" href="#attributes">Attributes</a></li>
<li class="toctree-l2"><a class="reference internal" href="#see-also">See Also</a></li>
<li class="toctree-l2"><a class="reference internal" href="#examples">Examples</a></li>
<li class="toctree-l2"><a class="reference internal" href="#return-values">Return Values</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#authors">Authors</a></li>
<li class="toctree-l3"><a class="reference internal" href="#collection-links">Collection links</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="command_module.html">community.routeros.command module Run commands on remote devices running MikroTik RouterOS</a></li>
<li class="toctree-l1"><a class="reference internal" href="facts_module.html">community.routeros.facts module Collect facts from remote devices running MikroTik RouterOS</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="routeros_cliconf.html">community.routeros.routeros cliconf Use routeros cliconf to run command on MikroTik RouterOS platform</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="join_filter.html">community.routeros.join filter Join a list of arguments to a command</a></li>
<li class="toctree-l1"><a class="reference internal" href="list_to_dict_filter.html">community.routeros.list_to_dict filter Convert a list of arguments to a dictionary</a></li>
<li class="toctree-l1"><a class="reference internal" href="quote_argument_filter.html">community.routeros.quote_argument filter Quote an argument</a></li>
<li class="toctree-l1"><a class="reference internal" href="quote_argument_value_filter.html">community.routeros.quote_argument_value filter Quote an argument value</a></li>
<li class="toctree-l1"><a class="reference internal" href="split_filter.html">community.routeros.split filter Split a command into arguments</a></li>
</ul>
<!-- extra nav elements for Ansible beyond RTD Sphinx Theme -->
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Community.Routeros Collection</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">community.routeros.api_modify module Modify data at paths with API</li>
<li class="wy-breadcrumbs-aside">
<!-- User defined GitHub URL -->
<a href="https://github.com/ansible-collections/community.routeros/edit/main/plugins/modules/api_modify.py?description=%23%23%23%23%23%20SUMMARY%0A%3C!—%20Your%20description%20here%20%3E%0A%0A%0A%23%23%23%23%23%20ISSUE%20TYPE%0A-%20Docs%20Pull%20Request%0A%0A%2Blabel:%20docsite_pr" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<span class="target" id="ansible-collections-community-routeros-api-modify-module"></span><section id="community-routeros-api-modify-module-modify-data-at-paths-with-api">
<h1>community.routeros.api_modify module Modify data at paths with API<a class="headerlink" href="#community-routeros-api-modify-module-modify-data-at-paths-with-api" title="Permalink to this heading"></a></h1>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This module is part of the <a class="reference external" href="https://galaxy.ansible.com/community/routeros">community.routeros collection</a> (version 2.8.0).</p>
<p>To install it, use: <code class="code docutils literal notranslate"><span class="pre">ansible-galaxy</span> <span class="pre">collection</span> <span class="pre">install</span> <span class="pre">community.routeros</span></code>.
You need further requirements to be able to use this module,
see <a class="reference internal" href="#ansible-collections-community-routeros-api-modify-module-requirements"><span class="std std-ref">Requirements</span></a> for details.</p>
<p>To use it in a playbook, specify: <code class="code docutils literal notranslate"><span class="pre">community.routeros.api_modify</span></code>.</p>
</div>
<p class="ansible-version-added">New in community.routeros 2.2.0</p>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#synopsis" id="id1">Synopsis</a></p></li>
<li><p><a class="reference internal" href="#requirements" id="id2">Requirements</a></p></li>
<li><p><a class="reference internal" href="#parameters" id="id3">Parameters</a></p></li>
<li><p><a class="reference internal" href="#attributes" id="id4">Attributes</a></p></li>
<li><p><a class="reference internal" href="#see-also" id="id5">See Also</a></p></li>
<li><p><a class="reference internal" href="#examples" id="id6">Examples</a></p></li>
<li><p><a class="reference internal" href="#return-values" id="id7">Return Values</a></p></li>
</ul>
</nav>
<section id="synopsis">
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Synopsis</a><a class="headerlink" href="#synopsis" title="Permalink to this heading"></a></h2>
<ul class="simple">
<li><p>Allows to modify information for a path using the API.</p></li>
<li><p>Use the <a class="reference internal" href="api_find_and_modify_module.html#ansible-collections-community-routeros-api-find-and-modify-module"><span class="std std-ref">community.routeros.api_find_and_modify</span></a> module to modify one or multiple entries in a controlled way depending on some search conditions.</p></li>
<li><p>To make a backup of a path that can be restored with this module, use the <a class="reference internal" href="api_info_module.html#ansible-collections-community-routeros-api-info-module"><span class="std std-ref">community.routeros.api_info</span></a> module.</p></li>
<li><p>The module ignores dynamic and builtin entries.</p></li>
<li><p><strong>Note</strong> that this module is still heavily in development, and only supports <strong>some</strong> paths. If you want to support new paths, or think you found problems with existing paths, please first <a class="reference external" href="https://github.com/ansible-collections/community.routeros/issues/">create an issue in the community.routeros Issue Tracker</a>.</p></li>
</ul>
</section>
<section id="requirements">
<span id="ansible-collections-community-routeros-api-modify-module-requirements"></span><h2><a class="toc-backref" href="#id2" role="doc-backlink">Requirements</a><a class="headerlink" href="#requirements" title="Permalink to this heading"></a></h2>
<p>The below requirements are needed on the host that executes this module.</p>
<ul class="simple">
<li><p>Needs <a class="reference external" href="https://pypi.org/project/ordereddict">ordereddict</a> for Python 2.6</p></li>
<li><p>Python &gt;= 3.6 (for librouteros)</p></li>
<li><p>librouteros</p></li>
</ul>
</section>
<section id="parameters">
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Parameters</a><a class="headerlink" href="#parameters" title="Permalink to this heading"></a></h2>
<table class="ansible-option-table docutils align-default" style="width: 100%">
<thead>
<tr class="row-odd"><th class="head"><p>Parameter</p></th>
<th class="head"><p>Comments</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-ca_path"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-parameter-ca-path"><strong>ca_path</strong></p>
<a class="ansibleOptionLink" href="#parameter-ca_path" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
<p><span class="ansible-option-versionadded">added in community.routeros 1.2.0</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>PEM formatted file that contains a CA certificate to be used for certificate validation.</p>
<p>See also <em>validate_cert_hostname</em>. Only used when <em>tls=true</em> and <em>validate_certs=true</em>.</p>
</div></td>
</tr>
<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-data"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-parameter-data"><strong>data</strong></p>
<a class="ansibleOptionLink" href="#parameter-data" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=dictionary</span> / <span class="ansible-option-required">required</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Data to ensure that is present for this path.</p>
<p>Fields not provided will not be modified.</p>
<p>If <code class="docutils literal notranslate"><span class="pre">.id</span></code> appears in an entry, it will be ignored.</p>
</div></td>
</tr>
<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-encoding"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-parameter-encoding"><strong>encoding</strong></p>
<a class="ansibleOptionLink" href="#parameter-encoding" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
<p><span class="ansible-option-versionadded">added in community.routeros 2.1.0</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Use the specified encoding when communicating with the RouterOS device.</p>
<p>Default is <code class="docutils literal notranslate"><span class="pre">ASCII</span></code>. Note that <code class="docutils literal notranslate"><span class="pre">UTF-8</span></code> requires librouteros 3.2.1 or newer.</p>
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">&quot;ASCII&quot;</span></code></p>
</div></td>
</tr>
<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-ensure_order"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-parameter-ensure-order"><strong>ensure_order</strong></p>
<a class="ansibleOptionLink" href="#parameter-ensure_order" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Whether to ensure the same order of the config as present in <em>data</em>.</p>
<p>Requires <em>handle_absent_entries=remove</em>.</p>
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
<ul class="simple">
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">true</span></code></p></li>
</ul>
</div></td>
</tr>
<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-force_no_cert"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-parameter-force-no-cert"><strong>force_no_cert</strong></p>
<a class="ansibleOptionLink" href="#parameter-force_no_cert" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
<p><span class="ansible-option-versionadded">added in community.routeros 2.4.0</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Set to <code class="docutils literal notranslate"><span class="pre">true</span></code> to connect without a certificate when <em>tls=true</em>.</p>
<p>See also <em>validate_certs</em>.</p>
<p><strong>Note:</strong> this forces the use of anonymous Diffie-Hellman (ADH) ciphers. The protocol is susceptible to Man-in-the-Middle attacks, because the keys used in the exchange are not authenticated. Instead of simply connecting without a certificate to “make things work” have a look at <em>validate_certs</em> and <em>ca_path</em>.</p>
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
<ul class="simple">
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">true</span></code></p></li>
</ul>
</div></td>
</tr>
<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-handle_absent_entries"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-parameter-handle-absent-entries"><strong>handle_absent_entries</strong></p>
<a class="ansibleOptionLink" href="#parameter-handle_absent_entries" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>How to handle entries that are present in the current config, but not in <em>data</em>.</p>
<p><code class="docutils literal notranslate"><span class="pre">ignore</span></code> ignores them.</p>
<p><code class="docutils literal notranslate"><span class="pre">remove</span></code> removes them.</p>
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
<ul class="simple">
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">&quot;ignore&quot;</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;remove&quot;</span></code></p></li>
</ul>
</div></td>
</tr>
<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-handle_entries_content"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-parameter-handle-entries-content"><strong>handle_entries_content</strong></p>
<a class="ansibleOptionLink" href="#parameter-handle_entries_content" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>For a single entry in <em>data</em>, this describes how to handle fields that are not mentioned in that entry, but appear in the actual config.</p>
<p>If <code class="docutils literal notranslate"><span class="pre">ignore</span></code>, they are not modified.</p>
<p>If <code class="docutils literal notranslate"><span class="pre">remove</span></code>, they are removed. If at least one cannot be removed, the module will fail.</p>
<p>If <code class="docutils literal notranslate"><span class="pre">remove_as_much_as_possible</span></code>, all that can be removed will be removed. The ones that cannot be removed will be kept.</p>
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
<ul class="simple">
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">&quot;ignore&quot;</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;remove&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;remove_as_much_as_possible&quot;</span></code></p></li>
</ul>
</div></td>
</tr>
<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-hostname"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-parameter-hostname"><strong>hostname</strong></p>
<a class="ansibleOptionLink" href="#parameter-hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span> / <span class="ansible-option-required">required</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>RouterOS hostname API.</p>
</div></td>
</tr>
<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-password"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-parameter-password"><strong>password</strong></p>
<a class="ansibleOptionLink" href="#parameter-password" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span> / <span class="ansible-option-required">required</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>RouterOS user password.</p>
</div></td>
</tr>
<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-path"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-parameter-path"><strong>path</strong></p>
<a class="ansibleOptionLink" href="#parameter-path" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span> / <span class="ansible-option-required">required</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Path to query.</p>
<p>An example value is <code class="docutils literal notranslate"><span class="pre">ip</span> <span class="pre">address</span></code>. This is equivalent to running modification commands in <code class="docutils literal notranslate"><span class="pre">/ip</span> <span class="pre">address</span></code> in the RouterOS CLI.</p>
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
<ul class="simple">
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;caps-man</span> <span class="pre">aaa&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;caps-man</span> <span class="pre">access-list&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;caps-man</span> <span class="pre">configuration&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;caps-man</span> <span class="pre">datapath&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;caps-man</span> <span class="pre">manager&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;caps-man</span> <span class="pre">provisioning&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;caps-man</span> <span class="pre">security&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;certificate</span> <span class="pre">settings&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">bonding&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">bridge&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">bridge</span> <span class="pre">mlag&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">bridge</span> <span class="pre">port&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">bridge</span> <span class="pre">port-controller&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">bridge</span> <span class="pre">port-extender&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">bridge</span> <span class="pre">settings&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">bridge</span> <span class="pre">vlan&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">detect-internet&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">eoip&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">ethernet&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">ethernet</span> <span class="pre">poe&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">ethernet</span> <span class="pre">switch&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">ethernet</span> <span class="pre">switch</span> <span class="pre">port&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">gre&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">gre6&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">l2tp-server</span> <span class="pre">server&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">list&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">list</span> <span class="pre">member&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">ovpn-server</span> <span class="pre">server&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">pppoe-client&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">pptp-server</span> <span class="pre">server&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">sstp-server</span> <span class="pre">server&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">vlan&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">vrrp&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">wireguard&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">wireguard</span> <span class="pre">peers&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">wireless</span> <span class="pre">align&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">wireless</span> <span class="pre">cap&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">wireless</span> <span class="pre">sniffer&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;interface</span> <span class="pre">wireless</span> <span class="pre">snooper&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">accounting&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">accounting</span> <span class="pre">web-access&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">address&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">arp&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">cloud&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">cloud</span> <span class="pre">advanced&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">dhcp-client&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">dhcp-client</span> <span class="pre">option&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">dhcp-server&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">dhcp-server</span> <span class="pre">config&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">dhcp-server</span> <span class="pre">lease&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">dhcp-server</span> <span class="pre">network&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">dns&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">dns</span> <span class="pre">static&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">firewall</span> <span class="pre">address-list&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">firewall</span> <span class="pre">connection</span> <span class="pre">tracking&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">firewall</span> <span class="pre">filter&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">firewall</span> <span class="pre">layer7-protocol&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">firewall</span> <span class="pre">mangle&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">firewall</span> <span class="pre">nat&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">firewall</span> <span class="pre">raw&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">firewall</span> <span class="pre">service-port&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">hotspot</span> <span class="pre">service-port&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">ipsec</span> <span class="pre">identity&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">ipsec</span> <span class="pre">peer&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">ipsec</span> <span class="pre">policy&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">ipsec</span> <span class="pre">profile&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">ipsec</span> <span class="pre">proposal&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">ipsec</span> <span class="pre">settings&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">neighbor</span> <span class="pre">discovery-settings&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">pool&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">proxy&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">route&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">route</span> <span class="pre">vrf&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">service&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">settings&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">smb&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">socks&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">ssh&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">tftp</span> <span class="pre">settings&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">traffic-flow&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">traffic-flow</span> <span class="pre">ipfix&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ip</span> <span class="pre">upnp&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ipv6</span> <span class="pre">address&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ipv6</span> <span class="pre">dhcp-client&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ipv6</span> <span class="pre">dhcp-server&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ipv6</span> <span class="pre">dhcp-server</span> <span class="pre">option&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ipv6</span> <span class="pre">firewall</span> <span class="pre">address-list&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ipv6</span> <span class="pre">firewall</span> <span class="pre">filter&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ipv6</span> <span class="pre">firewall</span> <span class="pre">mangle&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ipv6</span> <span class="pre">firewall</span> <span class="pre">raw&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ipv6</span> <span class="pre">nd&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ipv6</span> <span class="pre">nd</span> <span class="pre">prefix</span> <span class="pre">default&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ipv6</span> <span class="pre">route&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ipv6</span> <span class="pre">settings&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;mpls&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;mpls</span> <span class="pre">ldp&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;port</span> <span class="pre">firmware&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ppp</span> <span class="pre">aaa&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;queue</span> <span class="pre">interface&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;queue</span> <span class="pre">tree&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;radius</span> <span class="pre">incoming&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;routing</span> <span class="pre">bgp</span> <span class="pre">instance&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;routing</span> <span class="pre">mme&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;routing</span> <span class="pre">ospf</span> <span class="pre">area&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;routing</span> <span class="pre">ospf</span> <span class="pre">area</span> <span class="pre">range&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;routing</span> <span class="pre">ospf</span> <span class="pre">instance&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;routing</span> <span class="pre">ospf</span> <span class="pre">interface-template&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;routing</span> <span class="pre">pimsm</span> <span class="pre">instance&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;routing</span> <span class="pre">pimsm</span> <span class="pre">interface-template&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;routing</span> <span class="pre">rip&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;routing</span> <span class="pre">ripng&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;snmp&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;snmp</span> <span class="pre">community&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;system</span> <span class="pre">clock&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;system</span> <span class="pre">clock</span> <span class="pre">manual&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;system</span> <span class="pre">identity&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;system</span> <span class="pre">leds</span> <span class="pre">settings&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;system</span> <span class="pre">logging&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;system</span> <span class="pre">logging</span> <span class="pre">action&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;system</span> <span class="pre">note&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;system</span> <span class="pre">ntp</span> <span class="pre">client&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;system</span> <span class="pre">ntp</span> <span class="pre">client</span> <span class="pre">servers&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;system</span> <span class="pre">ntp</span> <span class="pre">server&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;system</span> <span class="pre">package</span> <span class="pre">update&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;system</span> <span class="pre">routerboard</span> <span class="pre">settings&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;system</span> <span class="pre">scheduler&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;system</span> <span class="pre">script&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;system</span> <span class="pre">upgrade</span> <span class="pre">mirror&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;system</span> <span class="pre">ups&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;system</span> <span class="pre">watchdog&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;tool</span> <span class="pre">bandwidth-server&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;tool</span> <span class="pre">e-mail&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;tool</span> <span class="pre">graphing&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;tool</span> <span class="pre">mac-server&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;tool</span> <span class="pre">mac-server</span> <span class="pre">mac-winbox&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;tool</span> <span class="pre">mac-server</span> <span class="pre">ping&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;tool</span> <span class="pre">romon&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;tool</span> <span class="pre">sms&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;tool</span> <span class="pre">sniffer&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;tool</span> <span class="pre">traffic-generator&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;user</span> <span class="pre">aaa&quot;</span></code></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;user</span> <span class="pre">group&quot;</span></code></p></li>
</ul>
</div></td>
</tr>
<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-port"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-parameter-port"><strong>port</strong></p>
<a class="ansibleOptionLink" href="#parameter-port" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>RouterOS api port. If <em>tls</em> is set, port will apply to TLS/SSL connection.</p>
<p>Defaults are <code class="docutils literal notranslate"><span class="pre">8728</span></code> for the HTTP API, and <code class="docutils literal notranslate"><span class="pre">8729</span></code> for the HTTPS API.</p>
</div></td>
</tr>
<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-timeout"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-parameter-timeout"><strong>timeout</strong></p>
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
<p><span class="ansible-option-versionadded">added in community.routeros 2.3.0</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Timeout for the request.</p>
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">10</span></code></p>
</div></td>
</tr>
<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-tls"></div>
<div class="ansibleOptionAnchor" id="parameter-ssl"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-parameter-tls"><span id="ansible-collections-community-routeros-api-modify-module-parameter-ssl"></span><strong>tls</strong></p>
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: ssl</span></p>
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>If is set TLS will be used for RouterOS API connection.</p>
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
<ul class="simple">
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">true</span></code></p></li>
</ul>
</div></td>
</tr>
<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-username"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-parameter-username"><strong>username</strong></p>
<a class="ansibleOptionLink" href="#parameter-username" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span> / <span class="ansible-option-required">required</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>RouterOS login user.</p>
</div></td>
</tr>
<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-validate_cert_hostname"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-parameter-validate-cert-hostname"><strong>validate_cert_hostname</strong></p>
<a class="ansibleOptionLink" href="#parameter-validate_cert_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
<p><span class="ansible-option-versionadded">added in community.routeros 1.2.0</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Set to <code class="docutils literal notranslate"><span class="pre">true</span></code> to validate hostnames in certificates.</p>
<p>See also <em>validate_certs</em>. Only used when <em>tls=true</em> and <em>validate_certs=true</em>.</p>
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
<ul class="simple">
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">true</span></code></p></li>
</ul>
</div></td>
</tr>
<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-validate_certs"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-parameter-validate-certs"><strong>validate_certs</strong></p>
<a class="ansibleOptionLink" href="#parameter-validate_certs" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
<p><span class="ansible-option-versionadded">added in community.routeros 1.2.0</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Set to <code class="docutils literal notranslate"><span class="pre">false</span></code> to skip validation of TLS certificates.</p>
<p>See also <em>validate_cert_hostname</em>. Only used when <em>tls=true</em>.</p>
<p><strong>Note:</strong> instead of simply deactivating certificate validations to “make things work”, please consider creating your own CA certificate and using it to sign certificates used for your router. You can tell the module about your CA certificate with the <em>ca_path</em> option.</p>
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
<ul class="simple">
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">true</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
</ul>
</div></td>
</tr>
</tbody>
</table>
</section>
<section id="attributes">
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Attributes</a><a class="headerlink" href="#attributes" title="Permalink to this heading"></a></h2>
<table class="ansible-option-table docutils align-default" style="width: 100%">
<thead>
<tr class="row-odd"><th class="head"><p>Attribute</p></th>
<th class="head"><p>Support</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="attribute-action_group"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-attribute-action-group"><strong>action_group</strong></p>
<a class="ansibleOptionLink" href="#attribute-action_group" title="Permalink to this attribute"></a></div></td>
<td><div class="ansible-option-cell"><p><span class="ansible-attribute-support-property">Action group:</span> <span class="ansible-attribute-support-full">community.routeros.api</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Use <code class="docutils literal notranslate"><span class="pre">group/community.routeros.api</span></code> in <code class="docutils literal notranslate"><span class="pre">module_defaults</span></code> to set defaults for this module.</p>
</div></td>
</tr>
<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="attribute-check_mode"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-attribute-check-mode"><strong>check_mode</strong></p>
<a class="ansibleOptionLink" href="#attribute-check_mode" title="Permalink to this attribute"></a></div></td>
<td><div class="ansible-option-cell"><p><span class="ansible-attribute-support-label">Support: </span><span class="ansible-attribute-support-full">full</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Can run in <code class="docutils literal notranslate"><span class="pre">check_mode</span></code> and return changed status prediction without modifying target.</p>
</div></td>
</tr>
<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="attribute-diff_mode"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-attribute-diff-mode"><strong>diff_mode</strong></p>
<a class="ansibleOptionLink" href="#attribute-diff_mode" title="Permalink to this attribute"></a></div></td>
<td><div class="ansible-option-cell"><p><span class="ansible-attribute-support-label">Support: </span><span class="ansible-attribute-support-full">full</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Will return details on what has changed (or possibly needs changing in <code class="docutils literal notranslate"><span class="pre">check_mode</span></code>), when in diff mode.</p>
</div></td>
</tr>
<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="attribute-platform"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-attribute-platform"><strong>platform</strong></p>
<a class="ansibleOptionLink" href="#attribute-platform" title="Permalink to this attribute"></a></div></td>
<td><div class="ansible-option-cell"><p><span class="ansible-attribute-support-property">Platform:</span> <span class="ansible-attribute-support-full">RouterOS</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Target OS/families that can be operated against.</p>
</div></td>
</tr>
</tbody>
</table>
</section>
<section id="see-also">
<h2><a class="toc-backref" href="#id5" role="doc-backlink">See Also</a><a class="headerlink" href="#see-also" title="Permalink to this heading"></a></h2>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<dl class="simple">
<dt><a class="reference internal" href="api_module.html#ansible-collections-community-routeros-api-module"><span class="std std-ref">community.routeros.api</span></a></dt><dd><p>Ansible module for RouterOS API.</p>
</dd>
<dt><a class="reference internal" href="api_facts_module.html#ansible-collections-community-routeros-api-facts-module"><span class="std std-ref">community.routeros.api_facts</span></a></dt><dd><p>Collect facts from remote devices running MikroTik RouterOS using the API.</p>
</dd>
<dt><a class="reference internal" href="api_find_and_modify_module.html#ansible-collections-community-routeros-api-find-and-modify-module"><span class="std std-ref">community.routeros.api_find_and_modify</span></a></dt><dd><p>Find and modify information using the API.</p>
</dd>
<dt><a class="reference internal" href="api_info_module.html#ansible-collections-community-routeros-api-info-module"><span class="std std-ref">community.routeros.api_info</span></a></dt><dd><p>Retrieve information from API.</p>
</dd>
<dt><a class="reference internal" href="docsite/api-guide.html#ansible-collections-community-routeros-docsite-api-guide"><span class="std std-ref">How to connect to RouterOS devices with the RouterOS API</span></a></dt><dd><p>How to connect to RouterOS devices with the RouterOS API</p>
</dd>
</dl>
</div>
</section>
<section id="examples">
<h2><a class="toc-backref" href="#id6" role="doc-backlink">Examples</a><a class="headerlink" href="#examples" title="Permalink to this heading"></a></h2>
<div class="highlight-yaml+jinja notranslate"><div class="highlight"><pre><span></span><span class="nn">---</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Setup DHCP server networks</span>
<span class="w"> </span><span class="c1"># Ensures that we have exactly two DHCP server networks (in the specified order)</span>
<span class="w"> </span><span class="nt">community.routeros.api_modify</span><span class="p">:</span>
<span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ip dhcp-server network</span>
<span class="w"> </span><span class="nt">handle_absent_entries</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">remove</span>
<span class="w"> </span><span class="nt">handle_entries_content</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">remove_as_much_as_possible</span>
<span class="w"> </span><span class="nt">ensure_order</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="w"> </span><span class="nt">data</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">address</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">192.168.88.0/24</span>
<span class="w"> </span><span class="nt">comment</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">admin network</span>
<span class="w"> </span><span class="nt">dns-server</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">192.168.88.1</span>
<span class="w"> </span><span class="nt">gateway</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">192.168.88.1</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">address</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">192.168.1.0/24</span>
<span class="w"> </span><span class="nt">comment</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">customer network 1</span>
<span class="w"> </span><span class="nt">dns-server</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">192.168.1.1</span>
<span class="w"> </span><span class="nt">gateway</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">192.168.1.1</span>
<span class="w"> </span><span class="nt">netmask</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">24</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Adjust NAT</span>
<span class="w"> </span><span class="nt">community.routeros.api_modify</span><span class="p">:</span>
<span class="w"> </span><span class="nt">hostname</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;</span><span class="cp">{{</span> <span class="nv">hostname</span> <span class="cp">}}</span><span class="s">&quot;</span>
<span class="w"> </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;</span><span class="cp">{{</span> <span class="nv">password</span> <span class="cp">}}</span><span class="s">&quot;</span>
<span class="w"> </span><span class="nt">username</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;</span><span class="cp">{{</span> <span class="nv">username</span> <span class="cp">}}</span><span class="s">&quot;</span>
<span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ip firewall nat</span>
<span class="w"> </span><span class="nt">data</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">action</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">masquerade</span>
<span class="w"> </span><span class="nt">chain</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">srcnat</span>
<span class="w"> </span><span class="nt">comment</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">NAT to WAN</span>
<span class="w"> </span><span class="nt">out-interface-list</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">WAN</span>
<span class="w"> </span><span class="c1"># Three ways to unset values:</span>
<span class="w"> </span><span class="c1"># - nothing after `:`</span>
<span class="w"> </span><span class="c1"># - &quot;empty&quot; value (null/~/None)</span>
<span class="w"> </span><span class="c1"># - prepend &#39;!&#39;</span>
<span class="w"> </span><span class="nt">out-interface</span><span class="p">:</span>
<span class="w"> </span><span class="nt">to-addresses</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">~</span>
<span class="w"> </span><span class="s">&#39;!to-ports&#39;</span><span class="p p-Indicator">:</span>
</pre></div>
</div>
</section>
<section id="return-values">
<h2><a class="toc-backref" href="#id7" role="doc-backlink">Return Values</a><a class="headerlink" href="#return-values" title="Permalink to this heading"></a></h2>
<p>Common return values are documented <a class="reference external" href="https://docs.ansible.com/ansible/devel/reference_appendices/common_return_values.html#common-return-values" title="(in Ansible vdevel)"><span class="xref std std-ref">here</span></a>, the following are the fields unique to this module:</p>
<table class="ansible-option-table docutils align-default" style="width: 100%">
<thead>
<tr class="row-odd"><th class="head"><p>Key</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-new_data"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-return-new-data"><strong>new_data</strong></p>
<a class="ansibleOptionLink" href="#return-new_data" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=dictionary</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>A list of all elements for the current path after a change was made.</p>
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> always</p>
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">[{&quot;.id&quot;:</span> <span class="pre">&quot;*1&quot;,</span> <span class="pre">&quot;actual-interface&quot;:</span> <span class="pre">&quot;bridge&quot;,</span> <span class="pre">&quot;address&quot;:</span> <span class="pre">&quot;192.168.1.1/24&quot;,</span> <span class="pre">&quot;comment&quot;:</span> <span class="pre">&quot;awesome&quot;,</span> <span class="pre">&quot;disabled&quot;:</span> <span class="pre">false,</span> <span class="pre">&quot;dynamic&quot;:</span> <span class="pre">false,</span> <span class="pre">&quot;interface&quot;:</span> <span class="pre">&quot;bridge&quot;,</span> <span class="pre">&quot;invalid&quot;:</span> <span class="pre">false,</span> <span class="pre">&quot;network&quot;:</span> <span class="pre">&quot;192.168.1.0&quot;}]</span></code></p>
</div></td>
</tr>
<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-old_data"></div><p class="ansible-option-title" id="ansible-collections-community-routeros-api-modify-module-return-old-data"><strong>old_data</strong></p>
<a class="ansibleOptionLink" href="#return-old_data" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=dictionary</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>A list of all elements for the current path before a change was made.</p>
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> always</p>
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">[{&quot;.id&quot;:</span> <span class="pre">&quot;*1&quot;,</span> <span class="pre">&quot;actual-interface&quot;:</span> <span class="pre">&quot;bridge&quot;,</span> <span class="pre">&quot;address&quot;:</span> <span class="pre">&quot;192.168.88.1/24&quot;,</span> <span class="pre">&quot;comment&quot;:</span> <span class="pre">&quot;defconf&quot;,</span> <span class="pre">&quot;disabled&quot;:</span> <span class="pre">false,</span> <span class="pre">&quot;dynamic&quot;:</span> <span class="pre">false,</span> <span class="pre">&quot;interface&quot;:</span> <span class="pre">&quot;bridge&quot;,</span> <span class="pre">&quot;invalid&quot;:</span> <span class="pre">false,</span> <span class="pre">&quot;network&quot;:</span> <span class="pre">&quot;192.168.88.0&quot;}]</span></code></p>
</div></td>
</tr>
</tbody>
</table>
<section id="authors">
<h3>Authors<a class="headerlink" href="#authors" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p>Felix Fontein (&#64;felixfontein)</p></li>
</ul>
</section>
<section id="collection-links">
<h3>Collection links<a class="headerlink" href="#collection-links" title="Permalink to this heading"></a></h3>
<p class="ansible-links">
<a href="https://github.com/ansible-collections/community.routeros/issues" aria-role="button" target="_blank" rel="noopener external">Issue Tracker</a>
<a href="https://github.com/ansible-collections/community.routeros" aria-role="button" target="_blank" rel="noopener external">Repository (Sources)</a>
<a href="https://github.com/ansible-collections/community.routeros/issues/new?assignees=&amp;labels=&amp;template=bug_report.md" aria-role="button" target="_blank" rel="noopener external">Submit a bug report</a>
<a href="https://github.com/ansible-collections/community.routeros/issues/new?assignees=&amp;labels=&amp;template=feature_request.md" aria-role="button" target="_blank" rel="noopener external">Request a feature</a>
<a href="./#communication-for-community-routeros" aria-role="button" target="_blank">Communication</a>
</p></section>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="api_info_module.html" class="btn btn-neutral float-left" title="community.routeros.api_info module Retrieve information from API" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="command_module.html" class="btn btn-neutral float-right" title="community.routeros.command module Run commands on remote devices running MikroTik RouterOS" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright Community.Routeros Contributors.</p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script><!-- extra footer elements for Ansible beyond RTD Sphinx Theme -->
</body>
</html>