Ftzgrld
unread,Feb 3, 2012, 2:00:51 PM2/3/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Puppet Users
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