From f2da08baf6042c3931617ce348e04401fabe385e Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 11 Jun 2018 16:11:09 -0300 Subject: KVM: image, interface handling and other improvements --- manifests/kvm/instance.pp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'manifests/kvm/instance.pp') diff --git a/manifests/kvm/instance.pp b/manifests/kvm/instance.pp index 562d8d3..6341289 100644 --- a/manifests/kvm/instance.pp +++ b/manifests/kvm/instance.pp @@ -1,4 +1,5 @@ define virtual::kvm::instance( + $iface, $udev = false, $shell = undef, ) { @@ -17,6 +18,15 @@ define virtual::kvm::instance( require => User[$name], } + file { "/etc/network/interfaces.d/${name}": + ensure => present, + owner => root, + group => root, + mode => '0644', + content => template('virtual/interface.erb'), + require => User[$name], + } + if $udev == true { file { "/etc/udev/rules.d/92-kvm-${name}.rules": ensure => present, -- cgit v1.2.3