Skip to content

Commit

Permalink
Add support for overriding service restart command
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Cabezas authored and alexjfisher committed May 16, 2019
1 parent 8804089 commit 84824ca
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Parameters to the squid class almost map 1 to 1 to squid.conf parameters themsel
* `ssl_bump` defaults to undef. If you pass in a hash of ssl_bump entries, they will be defined automatically. [ssl_bump entries](http://www.squid-cache.org/Doc/config/ssl_bump/).
* `sslproxy_cert_error` defaults to undef. If you pass in a hash of sslproxy_cert_error entries, they will be defined automatically. [sslproxy_cert_error entries](http://www.squid-cache.org/Doc/config/sslproxy_cert_error/).
* `extra_config_sections` defaults to empty hash. If you pass in a hash of `extra_config_section` resources, they will be defined automatically.
* `service_restart` defaults to undef. Overrides service resource restart command to be executed. It can be used to perform a soft reload of the squid service.
* `squid_bin_path` path to the squid binary, default depends on `$operatingsystem`

```puppet
Expand Down
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
Optional[Hash] $ssl_bump = $squid::params::ssl_bump,
Optional[Hash] $sslproxy_cert_error = $squid::params::sslproxy_cert_error,
Optional[Integer] $workers = $squid::params::workers,
Optional[String] $service_restart = $squid::params::service_restart,
) inherits ::squid::params {

anchor{'squid::begin':}
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
$logformat = undef
$error_directory = undef
$err_page_stylesheet = undef
$service_restart = undef
$package_ensure = 'present'

case $::operatingsystem {
Expand Down
5 changes: 3 additions & 2 deletions manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
class squid::service inherits squid {

service{$::squid::service_name:
ensure => $squid::ensure_service,
enable => $squid::enable_service,
ensure => $squid::ensure_service,
enable => $squid::enable_service,
restart => $squid::service_restart,
}

}

0 comments on commit 84824ca

Please sign in to comment.