Externalize role

This commit is contained in:
Adrien Reslinger 2018-10-08 19:35:15 +02:00
commit dde75d6597
Signed by: adrien
GPG key ID: DA7B27055C66D6DE
13 changed files with 207 additions and 0 deletions

View file

@ -0,0 +1,18 @@
# CentOS-libvirt-latest.repo
#
# Please see http://wiki.centos.org/SpecialInterestGroup/Virtualization for more
# information
[centos-libvirt-latest]
name=CentOS-$releasever - Libvirt
baseurl=http://mirror.centos.org/centos/$releasever/virt/$basearch/libvirt-latest/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Virtualization
[centos-libvirt-latest-test]
name=CentOS-$releasever - Libvirt Testing
baseurl=http://buildlogs.centos.org/centos/$releasever/virt/$basearch/libvirt-latest/
gpgcheck=0
enabled=0

12
templates/kvm.conf.j2 Normal file
View file

@ -0,0 +1,12 @@
# Setting modprobe kvm_intel/kvm_amd nested = 1
# only enables Nested Virtualization until the next reboot or
# module reload. Uncomment the option applicable
# to your system below to enable the feature permanently.
#
# User changes in this file are preserved across upgrades.
#
# For Intel
options kvm_intel nested=1
#
# For AMD
options kvm_amd nested=1

View file

@ -0,0 +1,14 @@
<network>
<name>default</name>
<forward mode='nat'>
<nat>
<port start='1024' end='65535'/>
</nat>
</forward>
<bridge name="virbr0" stp='on' delay='0'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start="192.168.122.128" end="192.168.122.254"/>
</dhcp>
</ip>
</network>

View file

@ -0,0 +1,21 @@
<network>
<name>{{ item.name }}</name>
<forward mode='bridge'/>
<bridge name='{{ item.bridgename }}'/>
<virtualport type='openvswitch'>
</virtualport>
{% if item.vlan is defined %}
{% if item.vlan|length > 1 %}
<vlan trunk='yes'>
{% else %}
<vlan>
{% endif %}
{% if item.nativevlan is defined %}
<tag id='{{ item.nativevlan }}' nativeMode='untagged'/>
{% endif %}
{% for tagvlan in item.vlan %}
<tag id='{{ tagvlan }}'/>
{% endfor %}
</vlan>
{% endif %}
</network>

View file

@ -0,0 +1,9 @@
<network>
<name>private</name>
<bridge name="virbr2"/>
<ip address="192.168.152.1" netmask="255.255.255.0">
<dhcp>
<range start="192.168.152.128" end="192.168.152.254"/>
</dhcp>
</ip>
</network>