diff options
31 files changed, 1264 insertions, 29 deletions
@@ -29,6 +29,14 @@ Name | Description --- | --- [vyos.vyos.vyos](https://github.com/ansible-collections/vyos.vyos/blob/main/docs/vyos.vyos.vyos_cliconf.rst)|Use vyos cliconf to run command on VyOS platform +### Filter plugins +Name | Description +--- | --- + +### Inventory plugins +Name | Description +--- | --- + ### Modules Name | Description --- | --- @@ -50,6 +58,7 @@ Name | Description [vyos.vyos.vyos_lldp_interface](https://github.com/ansible-collections/vyos.vyos/blob/main/docs/vyos.vyos.vyos_lldp_interface_module.rst)|(deprecated, removed after 2022-06-01) Manage LLDP interfaces configuration on VyOS network devices [vyos.vyos.vyos_lldp_interfaces](https://github.com/ansible-collections/vyos.vyos/blob/main/docs/vyos.vyos.vyos_lldp_interfaces_module.rst)|LLDP interfaces resource module [vyos.vyos.vyos_logging](https://github.com/ansible-collections/vyos.vyos/blob/main/docs/vyos.vyos.vyos_logging_module.rst)|Manage logging on network devices +[vyos.vyos.vyos_ospf_interfaces](https://github.com/ansible-collections/vyos.vyos/blob/main/docs/vyos.vyos.vyos_ospf_interfaces_module.rst)|OSPF Interfaces Resource Module. [vyos.vyos.vyos_ospfv2](https://github.com/ansible-collections/vyos.vyos/blob/main/docs/vyos.vyos.vyos_ospfv2_module.rst)|OSPFv2 resource module [vyos.vyos.vyos_ospfv3](https://github.com/ansible-collections/vyos.vyos/blob/main/docs/vyos.vyos.vyos_ospfv3_module.rst)|OSPFV3 resource module [vyos.vyos.vyos_ping](https://github.com/ansible-collections/vyos.vyos/blob/main/docs/vyos.vyos.vyos_ping_module.rst)|Tests reachability using ping from VyOS network devices diff --git a/changelogs/CHANGELOG.rst b/changelogs/CHANGELOG.rst index eec86f1..f886491 100644 --- a/changelogs/CHANGELOG.rst +++ b/changelogs/CHANGELOG.rst @@ -5,6 +5,20 @@ Vyos Collection Release Notes .. contents:: Topics +v1.1.0 +====== + +Minor Changes +------------- + +- Added ospf_interfaces resource module. + +New Modules +----------- + +- vyos_ospf_interfaces - OSPF Interfaces Resource Module + + v1.0.5 ====== diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 3146bdd..fe41c82 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -148,3 +148,14 @@ releases: - local_auth_timeout.yaml - terminal-escape-codes.yaml release_date: '2020-10-08' + 1.1.0: + changes: + minor_changes: + - Added ospf_interfaces resource module. + modules: + - description: OSPF Interfaces resource module + name: vyos_ospf_interfaces + namespace: '' + fragments: + - vyos_ospf_interfaces_rm.yaml + release_date: '2020-10-30' diff --git a/changelogs/fragments/vyos_ospf_interfaces_rm.yaml b/changelogs/fragments/vyos_ospf_interfaces_rm.yaml deleted file mode 100644 index c2dcdc2..0000000 --- a/changelogs/fragments/vyos_ospf_interfaces_rm.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -minor_changes: - - Added ospf_interfaces resource module. diff --git a/docs/vyos.vyos.vyos_banner_module.rst b/docs/vyos.vyos.vyos_banner_module.rst index 8e14ce3..d046cc4 100644 --- a/docs/vyos.vyos.vyos_banner_module.rst +++ b/docs/vyos.vyos.vyos_banner_module.rst @@ -220,7 +220,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml - name: configure the pre-login banner vyos.vyos.vyos_banner: diff --git a/docs/vyos.vyos.vyos_command_module.rst b/docs/vyos.vyos.vyos_command_module.rst index 41041bc..36ae764 100644 --- a/docs/vyos.vyos.vyos_command_module.rst +++ b/docs/vyos.vyos.vyos_command_module.rst @@ -255,7 +255,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml - name: show configuration on ethernet devices eth0 and eth1 vyos.vyos.vyos_command: diff --git a/docs/vyos.vyos.vyos_config_module.rst b/docs/vyos.vyos.vyos_config_module.rst index 0914d8e..d6f2f6b 100644 --- a/docs/vyos.vyos.vyos_config_module.rst +++ b/docs/vyos.vyos.vyos_config_module.rst @@ -333,7 +333,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml - name: configure the remote device vyos.vyos.vyos_config: diff --git a/docs/vyos.vyos.vyos_facts_module.rst b/docs/vyos.vyos.vyos_facts_module.rst index d285864..3177888 100644 --- a/docs/vyos.vyos.vyos_facts_module.rst +++ b/docs/vyos.vyos.vyos_facts_module.rst @@ -199,7 +199,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml # Gather all facts - vyos.vyos.vyos_facts: diff --git a/docs/vyos.vyos.vyos_firewall_global_module.rst b/docs/vyos.vyos.vyos_firewall_global_module.rst index 30f7ecf..b37cf02 100644 --- a/docs/vyos.vyos.vyos_firewall_global_module.rst +++ b/docs/vyos.vyos.vyos_firewall_global_module.rst @@ -783,7 +783,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml # Using merged # diff --git a/docs/vyos.vyos.vyos_firewall_interfaces_module.rst b/docs/vyos.vyos.vyos_firewall_interfaces_module.rst index 7c55b04..8a18fc6 100644 --- a/docs/vyos.vyos.vyos_firewall_interfaces_module.rst +++ b/docs/vyos.vyos.vyos_firewall_interfaces_module.rst @@ -216,7 +216,7 @@ Parameters Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml # Using merged # diff --git a/docs/vyos.vyos.vyos_firewall_rules_module.rst b/docs/vyos.vyos.vyos_firewall_rules_module.rst index 15073b1..cebe64c 100644 --- a/docs/vyos.vyos.vyos_firewall_rules_module.rst +++ b/docs/vyos.vyos.vyos_firewall_rules_module.rst @@ -1327,7 +1327,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml # Using deleted to delete firewall rules based on rule-set name # diff --git a/docs/vyos.vyos.vyos_interface_module.rst b/docs/vyos.vyos.vyos_interface_module.rst index 111ff31..46af72d 100644 --- a/docs/vyos.vyos.vyos_interface_module.rst +++ b/docs/vyos.vyos.vyos_interface_module.rst @@ -572,7 +572,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml - name: configure interface vyos.vyos.vyos_interface: diff --git a/docs/vyos.vyos.vyos_interfaces_module.rst b/docs/vyos.vyos.vyos_interfaces_module.rst index 5bf5d23..52ae1cc 100644 --- a/docs/vyos.vyos.vyos_interfaces_module.rst +++ b/docs/vyos.vyos.vyos_interfaces_module.rst @@ -319,7 +319,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml # Using merged # diff --git a/docs/vyos.vyos.vyos_l3_interface_module.rst b/docs/vyos.vyos.vyos_l3_interface_module.rst index a8fe604..8c76dcb 100644 --- a/docs/vyos.vyos.vyos_l3_interface_module.rst +++ b/docs/vyos.vyos.vyos_l3_interface_module.rst @@ -322,7 +322,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml - name: Set eth0 IPv4 address vyos.vyos.vyos_l3_interface: diff --git a/docs/vyos.vyos.vyos_l3_interfaces_module.rst b/docs/vyos.vyos.vyos_l3_interfaces_module.rst index 38dd3e9..94b3d58 100644 --- a/docs/vyos.vyos.vyos_l3_interfaces_module.rst +++ b/docs/vyos.vyos.vyos_l3_interfaces_module.rst @@ -303,7 +303,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml # Using merged # diff --git a/docs/vyos.vyos.vyos_lag_interfaces_module.rst b/docs/vyos.vyos.vyos_lag_interfaces_module.rst index 153e20e..52da867 100644 --- a/docs/vyos.vyos.vyos_lag_interfaces_module.rst +++ b/docs/vyos.vyos.vyos_lag_interfaces_module.rst @@ -273,7 +273,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml # Using merged # diff --git a/docs/vyos.vyos.vyos_linkagg_module.rst b/docs/vyos.vyos.vyos_linkagg_module.rst index ae7eea7..f7586d6 100644 --- a/docs/vyos.vyos.vyos_linkagg_module.rst +++ b/docs/vyos.vyos.vyos_linkagg_module.rst @@ -348,7 +348,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml - name: configure link aggregation group vyos.vyos.vyos_linkagg: diff --git a/docs/vyos.vyos.vyos_lldp_global_module.rst b/docs/vyos.vyos.vyos_lldp_global_module.rst index 9224421..851ed20 100644 --- a/docs/vyos.vyos.vyos_lldp_global_module.rst +++ b/docs/vyos.vyos.vyos_lldp_global_module.rst @@ -180,7 +180,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml # Using merged # diff --git a/docs/vyos.vyos.vyos_lldp_interface_module.rst b/docs/vyos.vyos.vyos_lldp_interface_module.rst index 1c860e7..0103664 100644 --- a/docs/vyos.vyos.vyos_lldp_interface_module.rst +++ b/docs/vyos.vyos.vyos_lldp_interface_module.rst @@ -264,7 +264,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml - name: Enable LLDP on eth1 net_lldp_interface: diff --git a/docs/vyos.vyos.vyos_lldp_interfaces_module.rst b/docs/vyos.vyos.vyos_lldp_interfaces_module.rst index c5ea47b..030cd73 100644 --- a/docs/vyos.vyos.vyos_lldp_interfaces_module.rst +++ b/docs/vyos.vyos.vyos_lldp_interfaces_module.rst @@ -370,7 +370,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml # Using merged # diff --git a/docs/vyos.vyos.vyos_lldp_module.rst b/docs/vyos.vyos.vyos_lldp_module.rst index 92aa732..88d0211 100644 --- a/docs/vyos.vyos.vyos_lldp_module.rst +++ b/docs/vyos.vyos.vyos_lldp_module.rst @@ -209,7 +209,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml - name: Enable LLDP service vyos.vyos.vyos_lldp: diff --git a/docs/vyos.vyos.vyos_logging_module.rst b/docs/vyos.vyos.vyos_logging_module.rst index f651b7a..9cb024d 100644 --- a/docs/vyos.vyos.vyos_logging_module.rst +++ b/docs/vyos.vyos.vyos_logging_module.rst @@ -360,7 +360,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml - name: configure console logging vyos.vyos.vyos_logging: diff --git a/docs/vyos.vyos.vyos_ospf_interfaces_module.rst b/docs/vyos.vyos.vyos_ospf_interfaces_module.rst new file mode 100644 index 0000000..0417088 --- /dev/null +++ b/docs/vyos.vyos.vyos_ospf_interfaces_module.rst @@ -0,0 +1,1204 @@ +.. _vyos.vyos.vyos_ospf_interfaces_module: + + +****************************** +vyos.vyos.vyos_ospf_interfaces +****************************** + +**OSPF Interfaces Resource Module.** + + +Version added: 1.2.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- This module manages OSPF configuration of interfaces on devices running VYOS. + + + + +Parameters +---------- + +.. raw:: html + + <table border=0 cellpadding=0 class="documentation-table"> + <tr> + <th colspan="5">Parameter</th> + <th>Choices/<font color="blue">Defaults</font></th> + <th width="100%">Comments</th> + </tr> + <tr> + <td colspan="5"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>config</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + / <span style="color: purple">elements=dictionary</span> + </div> + </td> + <td> + </td> + <td> + <div>A list of OSPF configuration for interfaces.</div> + </td> + </tr> + <tr> + <td class="elbow-placeholder"></td> + <td colspan="4"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>address_family</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + / <span style="color: purple">elements=dictionary</span> + </div> + </td> + <td> + </td> + <td> + <div>OSPF settings on the interfaces in address-family context.</div> + </td> + </tr> + <tr> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td colspan="3"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>afi</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">string</span> + / <span style="color: red">required</span> + </div> + </td> + <td> + <ul style="margin: 0; padding: 0"><b>Choices:</b> + <li>ipv4</li> + <li>ipv6</li> + </ul> + </td> + <td> + <div>Address Family Identifier (AFI) for OSPF settings on the interfaces.</div> + </td> + </tr> + <tr> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td colspan="3"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>authentication</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">dictionary</span> + </div> + </td> + <td> + </td> + <td> + <div>Authentication settings on the interface.</div> + </td> + </tr> + <tr> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td colspan="2"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>md5_key</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">dictionary</span> + </div> + </td> + <td> + </td> + <td> + <div>md5 parameters.</div> + </td> + </tr> + <tr> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>key</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">string</span> + </div> + </td> + <td> + </td> + <td> + <div>md5 key.</div> + </td> + </tr> + <tr> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>key_id</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">integer</span> + </div> + </td> + <td> + </td> + <td> + <div>key id.</div> + </td> + </tr> + + <tr> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td colspan="2"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>plaintext_password</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">string</span> + </div> + </td> + <td> + </td> + <td> + <div>Plain Text password.</div> + </td> + </tr> + + <tr> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td colspan="3"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>bandwidth</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">integer</span> + </div> + </td> + <td> + </td> + <td> + <div>Bandwidth of interface (kilobits/sec)</div> + </td> + </tr> + <tr> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td colspan="3"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>cost</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">integer</span> + </div> + </td> + <td> + </td> + <td> + <div>metric associated with interface.</div> + </td> + </tr> + <tr> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td colspan="3"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>dead_interval</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">integer</span> + </div> + </td> + <td> + </td> + <td> + <div>Time interval to detect a dead router.</div> + </td> + </tr> + <tr> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td colspan="3"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>hello_interval</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">integer</span> + </div> + </td> + <td> + </td> + <td> + <div>Timer interval between transmission of hello packets.</div> + </td> + </tr> + <tr> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td colspan="3"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>ifmtu</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">integer</span> + </div> + </td> + <td> + </td> + <td> + <div>interface MTU.</div> + </td> + </tr> + <tr> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td colspan="3"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>instance</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">string</span> + </div> + </td> + <td> + </td> + <td> + <div>Instance ID.</div> + </td> + </tr> + <tr> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td colspan="3"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>mtu_ignore</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">boolean</span> + </div> + </td> + <td> + <ul style="margin: 0; padding: 0"><b>Choices:</b> + <li>no</li> + <li>yes</li> + </ul> + </td> + <td> + <div>if True, Disable MTU check for Database Description packets.</div> + </td> + </tr> + <tr> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td colspan="3"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>network</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">string</span> + </div> + </td> + <td> + </td> + <td> + <div>Interface type.</div> + </td> + </tr> + <tr> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td colspan="3"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>passive</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">boolean</span> + </div> + </td> + <td> + <ul style="margin: 0; padding: 0"><b>Choices:</b> + <li>no</li> + <li>yes</li> + </ul> + </td> + <td> + <div>If True, disables forming adjacency.</div> + </td> + </tr> + <tr> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td colspan="3"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>priority</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">integer</span> + </div> + </td> + <td> + </td> + <td> + <div>Interface priority.</div> + </td> + </tr> + <tr> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td colspan="3"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>retransmit_interval</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">integer</span> + </div> + </td> + <td> + </td> + <td> + <div>LSA retransmission interval.</div> + </td> + </tr> + <tr> + <td class="elbow-placeholder"></td> + <td class="elbow-placeholder"></td> + <td colspan="3"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>transmit_delay</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">integer</span> + </div> + </td> + <td> + </td> + <td> + <div>LSA transmission delay.</div> + </td> + </tr> + + <tr> + <td class="elbow-placeholder"></td> + <td colspan="4"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>name</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">string</span> + </div> + </td> + <td> + </td> + <td> + <div>Name/Identifier of the interface.</div> + </td> + </tr> + + <tr> + <td colspan="5"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>running_config</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">string</span> + </div> + </td> + <td> + </td> + <td> + <div>This option is used only with state <em>parsed</em>.</div> + <div>The value of this option should be the output received from the IOS device by executing the command <b>sh running-config | section ^interface</b>.</div> + <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module's argspec and the value is then returned in the <em>parsed</em> key within the result.</div> + </td> + </tr> + <tr> + <td colspan="5"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>state</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">string</span> + </div> + </td> + <td> + <ul style="margin: 0; padding: 0"><b>Choices:</b> + <li><div style="color: blue"><b>merged</b> ←</div></li> + <li>replaced</li> + <li>overridden</li> + <li>deleted</li> + <li>gathered</li> + <li>parsed</li> + <li>rendered</li> + </ul> + </td> + <td> + <div>The state the configuration should be left in.</div> + </td> + </tr> + </table> + <br/> + + + + +Examples +-------- + +.. code-block:: yaml + + # Using merged + # + # Before state: + # ------------- + # + + # @vyos:~$ show configuration commands | match "ospf" + + - name: Merge provided configuration with device configuration + vyos.vyos.vyos_ospf_interfaces: + config: + - name: "eth1" + address_family: + - afi: "ipv4" + transmit_delay: 50 + priority: 26 + network: "point-to-point" + - afi: "ipv6" + dead_interval: 39 + - name: "bond2" + address_family: + - afi: "ipv4" + transmit_delay: 45 + bandwidth: 70 + authentication: + md5_key: + key_id: 10 + key: "1111111111232345" + - afi: "ipv6" + passive: True + state: merged + + # After State: + # -------------- + + # vyos@vyos:~$ show configuration commands | match "ospf" + # set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key '1111111111232345' + # set interfaces bonding bond2 ip ospf bandwidth '70' + # set interfaces bonding bond2 ip ospf transmit-delay '45' + # set interfaces bonding bond2 ipv6 ospfv3 'passive' + # set interfaces ethernet eth1 ip ospf network 'point-to-point' + # set interfaces ethernet eth1 ip ospf priority '26' + # set interfaces ethernet eth1 ip ospf transmit-delay '50' + # set interfaces ethernet eth1 ipv6 ospfv3 dead-interval '39' + + # "after": [ + # " + # "address_family": [ + # { + # "afi": "ipv4", + # "authentication": { + # "md5_key": { + # "key": "1111111111232345", + # "key_id": 10 + # } + # }, + # "bandwidth": 70, + # "transmit_delay": 45 + # }, + # { + # "afi": "ipv6", + # "passive": true + # } + # ], + # "name": "bond2" + # }, + # { + # "name": "eth0" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "network": "point-to-point", + # "priority": 26, + # "transmit_delay": 50 + # }, + # { + # "afi": "ipv6", + # "dead_interval": 39 + # } + # ], + # "name": "eth1" + # }, + # { + # "name": "eth2" + # }, + # { + # "name": "eth3" + # } + # ], + # "before": [ + # { + # "name": "eth0" + # }, + # { + # "name": "eth1" + # }, + # { + # "name": "eth2" + # }, + # { + # "name": "eth3" + # } + # ], + # "changed": true, + # "commands": [ + # "set interfaces ethernet eth1 ip ospf transmit-delay 50", + # "set interfaces ethernet eth1 ip ospf priority 26", + # "set interfaces ethernet eth1 ip ospf network point-to-point", + # "set interfaces ethernet eth1 ipv6 ospfv3 dead-interval 39", + # "set interfaces bonding bond2 ip ospf transmit-delay 45", + # "set interfaces bonding bond2 ip ospf bandwidth 70", + # "set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key 1111111111232345", + # "set interfaces bonding bond2 ipv6 ospfv3 passive" + # ], + + + + + # Using replaced: + + # Before State: + # ------------ + + # vyos@vyos:~$ show configuration commands | match "ospf" + # set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key '1111111111232345' + # set interfaces bonding bond2 ip ospf bandwidth '70' + # set interfaces bonding bond2 ip ospf transmit-delay '45' + # set interfaces bonding bond2 ipv6 ospfv3 'passive' + # set interfaces ethernet eth1 ip ospf network 'point-to-point' + # set interfaces ethernet eth1 ip ospf priority '26' + # set interfaces ethernet eth1 ip ospf transmit-delay '50' + # set interfaces ethernet eth1 ipv6 ospfv3 dead-interval '39' + + - name: Replace provided configuration with device configuration + vyos.vyos.vyos_ospf_interfaces: + config: + - name: "eth1" + address_family: + - afi: "ipv4" + cost: 100 + - afi: "ipv6" + ifmtu: 33 + - name: "bond2" + address_family: + - afi: "ipv4" + transmit_delay: 45 + - afi: "ipv6" + passive: True + state: replaced + + # After State: + # ----------- + + # vyos@vyos:~$ show configuration commands | match "ospf" + # set interfaces bonding bond2 ip ospf transmit-delay '45' + # set interfaces bonding bond2 ipv6 ospfv3 'passive' + # set interfaces ethernet eth1 ip ospf cost '100' + # set interfaces ethernet eth1 ipv6 ospfv3 ifmtu '33' + # vyos@vyos:~$ + + # Module Execution + # ---------------- + # "after": [ + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "transmit_delay": 45 + # }, + # { + # "afi": "ipv6", + # "passive": true + # } + # ], + # "name": "bond2" + # }, + # { + # "name": "eth0" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "cost": 100 + # }, + # { + # "afi": "ipv6", + # "ifmtu": 33 + # } + # ], + # "name": "eth1" + # }, + # { + # "name": "eth2" + # }, + # { + # "name": "eth3" + # } + # ], + # "before": [ + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "authentication": { + # "md5_key": { + # "key": "1111111111232345", + # "key_id": 10 + # } + # }, + # "bandwidth": 70, + # "transmit_delay": 45 + # }, + # { + # "afi": "ipv6", + # "passive": true + # } + # ], + # "name": "bond2" + # }, + # { + # "name": "eth0" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "network": "point-to-point", + # "priority": 26, + # "transmit_delay": 50 + # }, + # { + # "afi": "ipv6", + # "dead_interval": 39 + # } + # ], + # "name": "eth1" + # }, + # { + # "name": "eth2" + # }, + # { + # "name": "eth3" + # } + # ], + # "changed": true, + # "commands": [ + # "set interfaces ethernet eth1 ip ospf cost 100", + # "set interfaces ethernet eth1 ipv6 ospfv3 ifmtu 33", + # "delete interfaces ethernet eth1 ip ospf network point-to-point", + # "delete interfaces ethernet eth1 ip ospf priority 26", + # "delete interfaces ethernet eth1 ip ospf transmit-delay 50", + # "delete interfaces ethernet eth1 ipv6 ospfv3 dead-interval 39", + # "delete interfaces bonding bond2 ip ospf authentication", + # "delete interfaces bonding bond2 ip ospf bandwidth 70" + # ], + # + + # Using Overridden: + # ----------------- + + # Before State: + # ------------ + + # vyos@vyos:~$ show configuration commands | match "ospf" + # set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key '1111111111232345' + # set interfaces bonding bond2 ip ospf bandwidth '70' + # set interfaces bonding bond2 ip ospf transmit-delay '45' + # set interfaces bonding bond2 ipv6 ospfv3 'passive' + # set interfaces ethernet eth1 ip ospf cost '100' + # set interfaces ethernet eth1 ip ospf network 'point-to-point' + # set interfaces ethernet eth1 ip ospf priority '26' + # set interfaces ethernet eth1 ip ospf transmit-delay '50' + # set interfaces ethernet eth1 ipv6 ospfv3 dead-interval '39' + # set interfaces ethernet eth1 ipv6 ospfv3 ifmtu '33' + # vyos@vyos:~$ + + - name: Override device configuration with provided configuration + vyos.vyos.vyos_ospf_interfaces: + config: + - name: "eth0" + address_family: + - afi: "ipv4" + cost: 100 + - afi: "ipv6" + ifmtu: 33 + passive: True + state: overridden + # After State: + # ----------- + + # 200~vyos@vyos:~$ show configuration commands | match "ospf" + # set interfaces ethernet eth0 ip ospf cost '100' + # set interfaces ethernet eth0 ipv6 ospfv3 ifmtu '33' + # set interfaces ethernet eth0 ipv6 ospfv3 'passive' + # vyos@vyos:~$ + # + # + # "after": [ + # { + # "name": "bond2" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "cost": 100 + # }, + # { + # "afi": "ipv6", + # "ifmtu": 33, + # "passive": true + # } + # ], + # "name": "eth0" + # }, + # { + # "name": "eth1" + # }, + # { + # "name": "eth2" + # }, + # { + # "name": "eth3" + # } + # ], + # "before": [ + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "authentication": { + # "md5_key": { + # "key": "1111111111232345", + # "key_id": 10 + # } + # }, + # "bandwidth": 70, + # "transmit_delay": 45 + # }, + # { + # "afi": "ipv6", + # "passive": true + # } + # ], + # "name": "bond2" + # }, + # { + # "name": "eth0" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "cost": 100, + # "network": "point-to-point", + # "priority": 26, + # "transmit_delay": 50 + # }, + # { + # "afi": "ipv6", + # "dead_interval": 39, + # "ifmtu": 33 + # } + # ], + # "name": "eth1" + # }, + # { + # "name": "eth2" + # }, + # { + # "name": "eth3" + # } + # ], + # "changed": true, + # "commands": [ + # "delete interfaces bonding bond2 ip ospf", + # "delete interfaces bonding bond2 ipv6 ospfv3", + # "delete interfaces ethernet eth1 ip ospf", + # "delete interfaces ethernet eth1 ipv6 ospfv3", + # "set interfaces ethernet eth0 ip ospf cost 100", + # "set interfaces ethernet eth0 ipv6 ospfv3 ifmtu 33", + # "set interfaces ethernet eth0 ipv6 ospfv3 passive" + # ], + # + + # Using deleted: + # ------------- + + # before state: + # ------------- + + # vyos@vyos:~$ show configuration commands | match "ospf" + # set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key '1111111111232345' + # set interfaces bonding bond2 ip ospf bandwidth '70' + # set interfaces bonding bond2 ip ospf transmit-delay '45' + # set interfaces bonding bond2 ipv6 ospfv3 'passive' + # set interfaces ethernet eth0 ip ospf cost '100' + # set interfaces ethernet eth0 ipv6 ospfv3 ifmtu '33' + # set interfaces ethernet eth0 ipv6 ospfv3 'passive' + # set interfaces ethernet eth1 ip ospf network 'point-to-point' + # set interfaces ethernet eth1 ip ospf priority '26' + # set interfaces ethernet eth1 ip ospf transmit-delay '50' + # set interfaces ethernet eth1 ipv6 ospfv3 dead-interval '39' + # vyos@vyos:~$ + + - name: Delete device configuration + vyos.vyos.vyos_ospf_interfaces: + config: + - name: "eth0" + state: deleted + + # After State: + # ----------- + + # vyos@vyos:~$ show configuration commands | match "ospf" + # set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key '1111111111232345' + # set interfaces bonding bond2 ip ospf bandwidth '70' + # set interfaces bonding bond2 ip ospf transmit-delay '45' + # set interfaces bonding bond2 ipv6 ospfv3 'passive' + # set interfaces ethernet eth1 ip ospf network 'point-to-point' + # set interfaces ethernet eth1 ip ospf priority '26' + # set interfaces ethernet eth1 ip ospf transmit-delay '50' + # set interfaces ethernet eth1 ipv6 ospfv3 dead-interval '39' + # vyos@vyos:~$ + # + # + # "after": [ + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "authentication": { + # "md5_key": { + # "key": "1111111111232345", + # "key_id": 10 + # } + # }, + # "bandwidth": 70, + # "transmit_delay": 45 + # }, + # { + # "afi": "ipv6", + # "passive": true + # } + # ], + # "name": "bond2" + # }, + # { + # "name": "eth0" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "network": "point-to-point", + # "priority": 26, + # "transmit_delay": 50 + # }, + # { + # "afi": "ipv6", + # "dead_interval": 39 + # } + # ], + # "name": "eth1" + # }, + # { + # "name": "eth2" + # }, + # { + # "name": "eth3" + # } + # ], + # "before": [ + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "authentication": { + # "md5_key": { + # "key": "1111111111232345", + # "key_id": 10 + # } + # }, + # "bandwidth": 70, + # "transmit_delay": 45 + # }, + # { + # "afi": "ipv6", + # "passive": true + # } + # ], + # "name": "bond2" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "cost": 100 + # }, + # { + # "afi": "ipv6", + # "ifmtu": 33, + # "passive": true + # } + # ], + # "name": "eth0" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "network": "point-to-point", + # "priority": 26, + # "transmit_delay": 50 + # }, + # { + # "afi": "ipv6", + # "dead_interval": 39 + # } + # ], + # "name": "eth1" + # }, + # { + # "name": "eth2" + # }, + # { + # "name": "eth3" + # } + # ], + # "changed": true, + # "commands": [ + # "delete interfaces ethernet eth0 ip ospf", + # "delete interfaces ethernet eth0 ipv6 ospfv3" + # ], + # + # Using parsed: + # parsed.cfg: + + # set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key '1111111111232345' + # set interfaces bonding bond2 ip ospf bandwidth '70' + # set interfaces bonding bond2 ip ospf transmit-delay '45' + # set interfaces bonding bond2 ipv6 ospfv3 'passive' + # set interfaces ethernet eth0 ip ospf cost '50' + # set interfaces ethernet eth0 ip ospf priority '26' + # set interfaces ethernet eth0 ipv6 ospfv3 instance-id '33' + # set interfaces ethernet eth0 ipv6 ospfv3 'mtu-ignore' + # set interfaces ethernet eth1 ip ospf network 'point-to-point' + # set interfaces ethernet eth1 ip ospf priority '26' + # set interfaces ethernet eth1 ip ospf transmit-delay '50' + # set interfaces ethernet eth1 ipv6 ospfv3 dead-interval '39' + # + + - name: parse configs + vyos.vyos.vyos_ospf_interfaces: + running_config: "{{ lookup('file', './parsed.cfg') }}" + state: parsed + + # Module Execution: + # ---------------- + + # "parsed": [ + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "authentication": { + # "md5_key": { + # "key": "1111111111232345", + # "key_id": 10 + # } + # }, + # "bandwidth": 70, + # "transmit_delay": 45 + # }, + # { + # "afi": "ipv6", + # "passive": true + # } + # ], + # "name": "bond2" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "cost": 50, + # "priority": 26 + # }, + # { + # "afi": "ipv6", + # "instance": "33", + # "mtu_ignore": true + # } + # ], + # "name": "eth0" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "network": "point-to-point", + # "priority": 26, + # "transmit_delay": 50 + # }, + # { + # "afi": "ipv6", + # "dead_interval": 39 + # } + # ], + # "name": "eth1" + # } + # ] + + # Using rendered: + # -------------- + + - name: Render + vyos.vyos.vyos_ospf_interfaces: + config: + - name: "eth1" + address_family: + - afi: "ipv4" + transmit_delay: 50 + priority: 26 + network: "point-to-point" + - afi: "ipv6" + dead_interval: 39 + - name: "bond2" + address_family: + - afi: "ipv4" + transmit_delay: 45 + bandwidth: 70 + authentication: + md5_key: + key_id: 10 + key: "1111111111232345" + - afi: "ipv6" + passive: True + state: rendered + + # Module Execution: + # ---------------- + + # "rendered": [ + # "set interfaces ethernet eth1 ip ospf transmit-delay 50", + # "set interfaces ethernet eth1 ip ospf priority 26", + # "set interfaces ethernet eth1 ip ospf network point-to-point", + # "set interfaces ethernet eth1 ipv6 ospfv3 dead-interval 39", + # "set interfaces bonding bond2 ip ospf transmit-delay 45", + # "set interfaces bonding bond2 ip ospf bandwidth 70", + # "set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key 1111111111232345", + # "set interfaces bonding bond2 ipv6 ospfv3 passive" + # ] + # + + # Using Gathered: + # -------------- + + # Native Config: + + # vyos@vyos:~$ show configuration commands | match "ospf" + # set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key '1111111111232345' + # set interfaces bonding bond2 ip ospf bandwidth '70' + # set interfaces bonding bond2 ip ospf transmit-delay '45' + # set interfaces bonding bond2 ipv6 ospfv3 'passive' + # set interfaces ethernet eth1 ip ospf network 'point-to-point' + # set interfaces ethernet eth1 ip ospf priority '26' + # set interfaces ethernet eth1 ip ospf transmit-delay '50' + # set interfaces ethernet eth1 ipv6 ospfv3 dead-interval '39' + # vyos@vyos:~$ + + - name: gather configs + vyos.vyos.vyos_ospf_interfaces: + state: gathered + + # Module Execution: + # ----------------- + + # "gathered": [ + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "authentication": { + # "md5_key": { + # "key": "1111111111232345", + # "key_id": 10 + # } + # }, + # "bandwidth": 70, + # "transmit_delay": 45 + # }, + # { + # "afi": "ipv6", + # "passive": true + # } + # ], + # "name": "bond2" + # }, + # { + # "name": "eth0" + # }, + # { + # "address_family": [ + # { + # "afi": "ipv4", + # "network": "point-to-point", + # "priority": 26, + # "transmit_delay": 50 + # }, + # { + # "afi": "ipv6", + # "dead_interval": 39 + # } + # ], + # "name": "eth1" + # }, + # { + # "name": "eth2" + # }, + # { + # "name": "eth3" + # } + # ], + + + + +Status +------ + + +Authors +~~~~~~~ + +- Gomathi Selvi Srinivasan (@GomathiselviS) diff --git a/docs/vyos.vyos.vyos_ospfv2_module.rst b/docs/vyos.vyos.vyos_ospfv2_module.rst index 50ed5d3..9433538 100644 --- a/docs/vyos.vyos.vyos_ospfv2_module.rst +++ b/docs/vyos.vyos.vyos_ospfv2_module.rst @@ -1649,7 +1649,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml # Using merged # diff --git a/docs/vyos.vyos.vyos_ospfv3_module.rst b/docs/vyos.vyos.vyos_ospfv3_module.rst index d1ee1b1..568dbab 100644 --- a/docs/vyos.vyos.vyos_ospfv3_module.rst +++ b/docs/vyos.vyos.vyos_ospfv3_module.rst @@ -348,7 +348,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml # Using merged # diff --git a/docs/vyos.vyos.vyos_ping_module.rst b/docs/vyos.vyos.vyos_ping_module.rst index 7fafb7e..f9c4a68 100644 --- a/docs/vyos.vyos.vyos_ping_module.rst +++ b/docs/vyos.vyos.vyos_ping_module.rst @@ -284,7 +284,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml - name: Test reachability to 10.10.10.10 vyos.vyos.vyos_ping: diff --git a/docs/vyos.vyos.vyos_static_route_module.rst b/docs/vyos.vyos.vyos_static_route_module.rst index 74f296d..69afb56 100644 --- a/docs/vyos.vyos.vyos_static_route_module.rst +++ b/docs/vyos.vyos.vyos_static_route_module.rst @@ -354,7 +354,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml - name: configure static route vyos.vyos.vyos_static_route: diff --git a/docs/vyos.vyos.vyos_static_routes_module.rst b/docs/vyos.vyos.vyos_static_routes_module.rst index 53942a5..5a6884b 100644 --- a/docs/vyos.vyos.vyos_static_routes_module.rst +++ b/docs/vyos.vyos.vyos_static_routes_module.rst @@ -343,7 +343,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml # Using merged # diff --git a/docs/vyos.vyos.vyos_system_module.rst b/docs/vyos.vyos.vyos_system_module.rst index a71303c..bc521f0 100644 --- a/docs/vyos.vyos.vyos_system_module.rst +++ b/docs/vyos.vyos.vyos_system_module.rst @@ -248,7 +248,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml - name: configure hostname and domain-name vyos.vyos.vyos_system: diff --git a/docs/vyos.vyos.vyos_user_module.rst b/docs/vyos.vyos.vyos_user_module.rst index 04a7a6e..f47ab01 100644 --- a/docs/vyos.vyos.vyos_user_module.rst +++ b/docs/vyos.vyos.vyos_user_module.rst @@ -408,7 +408,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml - name: create a new user vyos.vyos.vyos_user: diff --git a/docs/vyos.vyos.vyos_vlan_module.rst b/docs/vyos.vyos.vyos_vlan_module.rst index d00260e..b6e3ccf 100644 --- a/docs/vyos.vyos.vyos_vlan_module.rst +++ b/docs/vyos.vyos.vyos_vlan_module.rst @@ -434,7 +434,7 @@ Notes Examples -------- -.. code-block:: yaml+jinja +.. code-block:: yaml - name: Create vlan vyos.vyos.vyos_vlan: |