Fixed SELinux contexts from git datadirectories.
This commit is contained in:
parent
44bbad6862
commit
caee979ec1
1 changed files with 18 additions and 4 deletions
|
@ -39,10 +39,24 @@ class git::server {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
file { "/srv/git":
|
file { "/srv/git":
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
mode => 0755,
|
mode => 0755,
|
||||||
owner => root,
|
owner => root,
|
||||||
group => root,
|
group => root,
|
||||||
|
seltype => "httpd_sys_content_t",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if "${selinux}" == "true" {
|
||||||
|
selinux::manage_fcontext { "/srv/git(/.*)?":
|
||||||
|
type => "httpd_sys_content_t",
|
||||||
|
before => File["/srv/git"],
|
||||||
|
}
|
||||||
|
if $git_datadir {
|
||||||
|
selinux::manage_fcontext { "${git_datadir}(/.*)?":
|
||||||
|
type => "httpd_sys_content_t",
|
||||||
|
before => File["${git_datadir}"],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue