feat: complete cobbler automation
- add facts to manage the /var/www/cobbler and /data/cobbler directories - move /var/www/cobbler -> /data/cobbler - create symlink from /var/www/cobbler -> /data/cobbler - ensure that cobbler nodes are set to permissive selinux mode
This commit is contained in:
@@ -26,6 +26,11 @@ class profiles::cobbler::selinux inherits profiles::cobbler::params {
|
||||
seltype => 'cobbler_var_lib_t',
|
||||
pathspec => "${tftpboot_path}(/.*)?",
|
||||
}
|
||||
selinux::fcontext { '/data/cobbler':
|
||||
ensure => 'present',
|
||||
seltype => 'cobbler_var_lib_t',
|
||||
pathspec => '/data/cobbler(/.*)?',
|
||||
}
|
||||
|
||||
exec { "restorecon_${tftpboot_path}":
|
||||
path => ['/bin', '/usr/bin', '/sbin', '/usr/sbin'],
|
||||
@@ -33,5 +38,11 @@ class profiles::cobbler::selinux inherits profiles::cobbler::params {
|
||||
refreshonly => true,
|
||||
subscribe => Selinux::Fcontext[$tftpboot_path],
|
||||
}
|
||||
exec { 'restorecon_/data/cobbler':
|
||||
path => ['/bin', '/usr/bin', '/sbin', '/usr/sbin'],
|
||||
command => 'restorecon -Rv /data/cobbler',
|
||||
refreshonly => true,
|
||||
subscribe => Selinux::Fcontext['/data/cobbler'],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user