I'm new to puppet and would like to read variables into my manifest
from the puppet dashboard.
I'm would like to create solaris zones from the dashboard. My scenario
is:
>From dashboard add node with parameter set for ip.
I know that the /var/log/pe-puppet-dashboard/production.log has the
information from the dashboard.
I want to be able to pull the node and ipaddress into my install
manifest
I already have scripts that install my zones already and will leverage
them to create the zones.
Here is my install manifest -
$HOSTNAME=''#Zone name from Dashboard
$IPADDRESS=''#IP Address from Dashboard
class install {
file { 'zonecfg':
ensure => present,
owner => root,
group => root,
mode => 0755,
source => '/usr/nbox/bin/zonecfg.sh',
}
file { 's10':
ensure => present,
owner => 'nobody4',
group => 'root',
mode => '0755',
source => '/usr/nbox/install/s10-puppet.sh'
}
file { 'login':
ensure => present,
source => '/usr/nbox/install/flatfileofglobalnodes'
}
#Login to Global Zone
exec {'login':
command =>'/bin/ssh pe-puppet@$(flatfileofglobalnodes)',
required => File['login']
}
#Run Zone Create Script With Needed Parameters
exec {'zonecfg':
command =>'/usr/nbox/bin/zonecfg.sh $HOSTNAME $IPADDRESS',
require => File['login']
}
#Login To Created Zone
exec { 'zlogin':
command => '/usr/sbin/zlogin $HOSTNAME',
require => File['zonecfg']
}
#Mount Sysadmin Directory
exec { 'mount':
command => '/usr/sbin/mount -F nfs 10.128.10.93:/vol/tmp /usr/
nbox',
require => Exec['zlogin']
}
#Run Post Script To Set Environments and Install Puppet Agent
exec { 's10':
command => '/usr/nbox/install/s10-puppet.sh'
require => Exec['mount']
}
#Reboot Created Zone
exec { 'reboot':
command => '/usr/sbin/zoneadm -z $HOSTNAME reboot
required => Exec['s10']
}
}
Thanks
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.