vm settings

This commit is contained in:
Erik Bergström 2018-05-03 11:29:20 +02:00
parent de3c8c470f
commit 856cca5fcf
2 changed files with 3 additions and 20 deletions

View file

@ -25,7 +25,6 @@ kvmfe-fre-3.komreg.net:
vms:
fe-fre-3.komreg.net:
mac: '52:54:20:01:00:01'
dhcp: false
ip: '94.176.224.165'
netmask: '255.255.255.240'
gateway: '94.176.224.161'

View file

@ -4,15 +4,12 @@ define eid::cloudimage(
String $cpus = '1',
String $memory = '1024',
String $description = undef,
Boolean $dhcp = true,
Optional[String] $ip = undef,
Optional[String] $netmask = undef,
Optional[String] $gateway = undef,
Optional[String] $ip6 = undef,
Optional[String] $netmask6 = '64',
Optional[String] $gateway6 = undef,
Optional[Array] $resolver = undef,
Array[String] $search = ['komreg.net'],
String $bridge = 'br0',
String $size = '40G',
String $local_size = '0',
@ -22,19 +19,6 @@ define eid::cloudimage(
$_ssh_key = hiera('ssh_authorized_keys')['mariah+CA747E57']
$cloudimage_ssh_keys = [sprintf('%s %s %s', $_ssh_key['type'], $_ssh_key['key'], $_ssh_key['name'])]
$_v6_resolver = $ip6 ? {
undef => undef,
default => ['2001:6b0:1e::14',
'2001:6b0:1e::99',
],
}
$_resolver1 = pick($resolver, $_v6_resolver, 'NOT_SET')
$_resolver = $_resolver1 ? {
'NOT_SET' => undef,
default => $_resolver1,
}
sunet::cloudimage { $name:
image_url => $image_url,
ssh_keys => $cloudimage_ssh_keys,
@ -42,7 +26,7 @@ define eid::cloudimage(
disable_ec2 => true,
#
bridge => $bridge,
dhcp => $dhcp,
dhcp => false,
mac => $mac,
ip => $ip,
netmask => $netmask,
@ -50,8 +34,8 @@ define eid::cloudimage(
ip6 => $ip6,
netmask6 => $netmask6,
gateway6 => $gateway6,
resolver => $_resolver,
search => $search,
resolver => ['130.242.80.14', '130.242.80.99'],
search => ['komreg.net'],
#
repo => $::cosmos_repo_origin_url,
tagpattern => $::cosmos_tag_pattern,