From 482c911dba137a06da709994c348d313e3111142 Mon Sep 17 00:00:00 2001 From: Sylvain Baubeau Date: Fri, 7 Mar 2014 16:46:43 +0100 Subject: [PATCH] Allow registration to RHN --- manifests/init.pp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 3d45c866..71832351 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -18,7 +18,9 @@ # Installs the private cloud system requirements # -class cloud { +class cloud( + $rhn_registration = $os_params::rhn_registration, +) { if ! ($::osfamily in [ 'RedHat', 'Debian' ]) { fail("module puppet-cloud only support ${::osfamily}, only Red Hat or Debian") @@ -70,4 +72,9 @@ This node is under the control of Puppet ${::puppetversion}. enable => true } + if $::osfamily == 'RedHat' and $rhn_registration { + create_resources('rhn_register', { + "${::hostname}" => $rhn_registration + } ) + } }