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 #108.
  • Loading branch information
ralfbosz committed Dec 28, 2018
1 parent 031608d commit f0ae67f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 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
14 changes: 8 additions & 6 deletions manifests/cache_dir.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
order => "50-${order}",
}

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

if $facts['selinux'] == true {
Expand Down

0 comments on commit f0ae67f

Please sign in to comment.