forked from stackhpc/ansible-role-libvirt-host
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[travis skip] rebase with oss upstream
- Loading branch information
Showing
2 changed files
with
32 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,29 @@ | ||
<network connections='1'> | ||
<network {% if item.ipv6 is defined %}ipv6='yes'{% endif %} connections='1'> | ||
<name>{{ item.name }}</name> | ||
<forward mode='{{ item.mode }}'/> | ||
<bridge name='{{ item.bridge }}'/> | ||
{% if item.mode == 'route' or item.mode == 'nat' %} | ||
<bridge name='{{ item.bridge }}'{% if item.zone is defined %} zone='{{ item.zone }}'{% endif %}/> | ||
{% if item.mode == 'route' or item.mode == 'nat' %} | ||
<domain name='{{ item.domain|default(item.name) }}'/> | ||
<ip address='{{ item.ip }}' netmask='{{ item.netmask }}'> | ||
{% if item.dhcp_start is defined and item.dhcp_end is defined %} | ||
<dhcp> | ||
<range start='{{ item.dhcp_start }}' end='{{ item.dhcp_end }}'/> | ||
</dhcp> | ||
<dhcp> | ||
<range start='{{ item.dhcp_start }}' end='{{ item.dhcp_end }}'/> | ||
</dhcp> | ||
{% endif %} | ||
</ip> | ||
{% if item.routes is defined %} | ||
{% for route in item.routes %} | ||
<route address="{{ route.address }}" prefix="{{ route.prefix }}" gateway="{{ route.gateway }}" {% if route.metric is defined %} metric='{{ route.metric }}' {% endif %}/> | ||
{% endfor %} | ||
{% endif %} | ||
{% if item.ipv6 is defined and item.ipv6_prefix is defined %} | ||
<ip family='ipv6' address='{{ item.ipv6 }}' prefix='{{ item.ipv6_prefix }}'> | ||
</ip> | ||
{% endif %} | ||
{% if item.routesv6 is defined %} | ||
{% for route in item.routesv6 %} | ||
<route family="ipv6" address="{{ route.address }}" prefix="{{ route.prefix }}" gateway="{{ route.gateway }}" {% if route.metric is defined %} metric='{{ route.metric }}' {% endif %}/> | ||
{% endfor %} | ||
{% endif %} | ||
{% endif %} | ||
</network> |