Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a797802

Browse files
kenyonsamccann
authored andcommitted
playbooks_filters_ipaddr.rst: fix syntax, indentation (ansible#65208)
1 parent f9f19d1 commit a797802

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

docs/docsite/rst/user_guide/playbooks_filters_ipaddr.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -268,24 +268,24 @@ In Debian-based systems, the network configuration stored in the ``/etc/network/
268268
In the above example, we needed to handle the fact that values were stored in
269269
a list, which is unusual in IPv4 networks, where only a single IP address can be
270270
set on an interface. However, IPv6 networks can have multiple IP addresses set
271-
on an interface::
271+
on an interface:
272272

273-
.. code-block:: jinja
273+
.. code-block:: jinja
274274
275275
# Jinja2 template
276276
iface eth0 inet6 static
277-
{% set ipv6_list = host_prefix | unique | ipv6('host/prefix') %}
278-
address {{ ipv6_list[0] }}
279-
{% if ipv6_list | length > 1 %}
280-
{% for subnet in ipv6_list[1:] %}
281-
up /sbin/ip address add {{ subnet }} dev eth0
282-
down /sbin/ip address del {{ subnet }} dev eth0
283-
{% endfor %}
284-
{% endif %}
277+
{% set ipv6_list = host_prefix | unique | ipv6('host/prefix') %}
278+
address {{ ipv6_list[0] }}
279+
{% if ipv6_list | length > 1 %}
280+
{% for subnet in ipv6_list[1:] %}
281+
up /sbin/ip address add {{ subnet }} dev eth0
282+
down /sbin/ip address del {{ subnet }} dev eth0
283+
{% endfor %}
284+
{% endif %}
285285
286286
# Generated configuration file
287287
iface eth0 inet6 static
288-
address 2001:db8:deaf:be11::ef3/64
288+
address 2001:db8:deaf:be11::ef3/64
289289
290290
If needed, you can extract subnet and prefix information from the 'host/prefix' value::
291291

0 commit comments

Comments
 (0)