Skip to content

Commit

Permalink
This commit puts a defined in cache_dir.pp
Browse files Browse the repository at this point in the history
Making it possible to create your own cache_dir
outside of the Squid module. Fixing issue voxpupuli#108.
  • Loading branch information
ralfbosz committed Jan 11, 2019
1 parent 031608d commit b557f42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ endif
in a `if $proceess_number` statement so the cache will be used by only
one process. Default is undef.

NOTE: When creating a custom 'cache_dir' using Puppet (like a seperate mount) this module WILL NOT create the dir (so no duplicate error occurs), be sure the created directory is owned by the user/group 'squid'.

### Defined Type squid::cache
Defines [cache entries](http://www.squid-cache.org/Doc/config/cache/) for a squid server.

Expand Down
4 changes: 2 additions & 2 deletions manifests/cache_dir.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
order => "50-${order}",
}

file{$path:
ensure_resource('file', $path, {
ensure => directory,
owner => $::squid::daemon_user,
group => $::squid::daemon_group,
mode => '0750',
require => Package[$::squid::package_name],
}
})

if $facts['selinux'] == true {
selinux::fcontext{"selinux fcontext squid_cache_t ${path}":
Expand Down

0 comments on commit b557f42

Please sign in to comment.