# profiles::cobbler::install class profiles::cobbler::install { include profiles::cobbler::params $packages = $profiles::cobbler::params::packages ensure_packages($packages, { ensure => 'present' }) # move the /var/www/cobbler directory to /data/cobbler if ! $facts['cobbler_var_www_islink'] and ! $facts['cobbler_data_exists'] { exec {'move_cobbler_data': command => 'mv /var/www/cobbler /data/cobbler', onlyif => 'test -d /var/www/cobbler', path => ['/bin', '/usr/bin'], before => Service['cobblerd'], } file { '/var/www/cobbler': ensure => 'link', target => '/data/cobbler', require => Exec['move_cobbler_data'], before => Service['httpd'], notify => Service['httpd'], } } if ! $facts['cobbler_var_www_exists'] and $facts['cobbler_data_exists'] { file { '/var/www/cobbler': ensure => 'link', target => '/data/cobbler', before => Service['httpd'], notify => Service['httpd'], } } }