promote develop to master #6
@ -30,6 +30,7 @@ class profiles::base (
|
|||||||
include profiles::accounts::sysadmin
|
include profiles::accounts::sysadmin
|
||||||
include profiles::ntp::client
|
include profiles::ntp::client
|
||||||
include profiles::dns::base
|
include profiles::dns::base
|
||||||
|
include profiles::cloudinit::init
|
||||||
|
|
||||||
# include the python class
|
# include the python class
|
||||||
class { 'python':
|
class { 'python':
|
||||||
@ -44,4 +45,8 @@ class profiles::base (
|
|||||||
secure_path => '/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/opt/puppetlabs/bin'
|
secure_path => '/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/opt/puppetlabs/bin'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# manage virtualised guest agents
|
||||||
|
if $::facts['is_virtual'] and $::facts['dmi']['manufacturer'] == 'QEMU' {
|
||||||
|
include profiles::qemu::agent
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
28
site/profiles/manifests/cloudinit/init.pp
Normal file
28
site/profiles/manifests/cloudinit/init.pp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# profiles::cloudinit::init
|
||||||
|
class profiles::cloudinit::init (
|
||||||
|
Boolean $enabled = false,
|
||||||
|
String $package = 'cloud-init',
|
||||||
|
String $service = 'cloud-init',
|
||||||
|
){
|
||||||
|
|
||||||
|
if $enabled {
|
||||||
|
package { $package:
|
||||||
|
ensure => installed,
|
||||||
|
}
|
||||||
|
|
||||||
|
service { $service:
|
||||||
|
ensure => running,
|
||||||
|
enable => true,
|
||||||
|
require => Package[$package],
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
service { $service:
|
||||||
|
ensure => stopped,
|
||||||
|
enable => false,
|
||||||
|
}
|
||||||
|
|
||||||
|
package { $package:
|
||||||
|
ensure => absent,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
28
site/profiles/manifests/qemu/agent.pp
Normal file
28
site/profiles/manifests/qemu/agent.pp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# profiles::qemu::agent
|
||||||
|
class profiles::qemu::agent (
|
||||||
|
Boolean $enabled = true,
|
||||||
|
String $package = 'qemu-guest-agent',
|
||||||
|
String $service = 'qemu-guest-agent',
|
||||||
|
){
|
||||||
|
|
||||||
|
if $enabled {
|
||||||
|
package { $package:
|
||||||
|
ensure => installed,
|
||||||
|
}
|
||||||
|
|
||||||
|
service { $service:
|
||||||
|
ensure => running,
|
||||||
|
enable => true,
|
||||||
|
require => Package[$package],
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
service { $service:
|
||||||
|
ensure => stopped,
|
||||||
|
enable => false,
|
||||||
|
}
|
||||||
|
|
||||||
|
package { $package:
|
||||||
|
ensure => absent,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user