Skip to content

Commit

Permalink
Merge pull request #4 from philippeganz/bugfix/service_notify
Browse files Browse the repository at this point in the history
Bugfix/service notify
  • Loading branch information
philippeganz committed Nov 3, 2023
2 parents b66a2b2 + 8665f98 commit f87e29e
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 61 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
.vscode/
.cache/
.config/
5 changes: 4 additions & 1 deletion .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
# for the default values.
---
.gitignore:
paths: [".vscode/"]
paths:
- ".vscode/"
- ".cache/"
- ".config/"
Rakefile:
default_disabled_lint_checks:
- 140chars
Expand Down
27 changes: 2 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,16 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

### Added

### Changed

### Deprecated

### Removed

### Fixed

### Security
* Services are now correctly notified on cert changes
* Ensure absent now correctly removes the service on linux

## [3.0.1] - 2023-07-17

### Added

### Changed

### Deprecated

### Removed

### Fixed
* New release for Puppet Forge

### Security

## [3.0.0] - 2023-07-14

### Added
Expand All @@ -47,18 +30,12 @@ All notable changes to this project will be documented in this file.
* Certificate as content or path
* Stunnel config template has been rewritten in epp

### Deprecated

### Removed
* Certificate concatenation functionnality
* Config class has been moved to init class
* Data class has been moved to hiera 5 data
* Install class has been moved to init class

### Fixed

### Security

## [2.2.0] - 2016-04-08

* stunnel::tun options parameter now handles an array for multiple options (mjs510)
Expand Down
70 changes: 35 additions & 35 deletions manifests/connection.pp
Original file line number Diff line number Diff line change
Expand Up @@ -216,17 +216,15 @@
if $ca_file_content {
$ca_file_ensure = file
}
} elsif $ca_file_content {
$ca_file = "${stunnel::cert_dir}${path_connector}${stunnel_name}_CA.pem"
$ca_file_ensure = file
} else {
if $ca_file_content {
$ca_file = "${stunnel::cert_dir}${path_connector}${stunnel_name}_CA.pem"
$ca_file_ensure = file
} else {
file { "${stunnel::cert_dir}${path_connector}${stunnel_name}_CA.pem":
ensure => absent,
}
$ca_file = undef
$ca_file_ensure = undef
file { "${stunnel::cert_dir}${path_connector}${stunnel_name}_CA.pem":
ensure => absent,
}
$ca_file = undef
$ca_file_ensure = undef
}
if $ca_file_ensure {
file { $ca_file:
Expand All @@ -241,17 +239,15 @@
if $cert_file_content {
$cert_file_ensure = file
}
} elsif $cert_file_content {
$cert_file = "${stunnel::cert_dir}${path_connector}${stunnel_name}_cert.pem"
$cert_file_ensure = file
} else {
if $cert_file_content {
$cert_file = "${stunnel::cert_dir}${path_connector}${stunnel_name}_cert.pem"
$cert_file_ensure = file
} else {
file { "${stunnel::cert_dir}${path_connector}${stunnel_name}_cert.pem":
ensure => absent,
}
$cert_file = undef
$cert_file_ensure = undef
file { "${stunnel::cert_dir}${path_connector}${stunnel_name}_cert.pem":
ensure => absent,
}
$cert_file = undef
$cert_file_ensure = undef
}
if $cert_file_ensure {
file { $cert_file:
Expand All @@ -266,17 +262,15 @@
if $key_file_content {
$key_file_ensure = file
}
} elsif $key_file_content {
$key_file = "${stunnel::cert_dir}${path_connector}${stunnel_name}.key"
$key_file_ensure = file
} else {
if $key_file_content {
$key_file = "${stunnel::cert_dir}${path_connector}${stunnel_name}.key"
$key_file_ensure = file
} else {
file { "${stunnel::cert_dir}${path_connector}${stunnel_name}.key":
ensure => absent,
}
$key_file = undef
$key_file_ensure = undef
file { "${stunnel::cert_dir}${path_connector}${stunnel_name}.key":
ensure => absent,
}
$key_file = undef
$key_file_ensure = undef
}
if $key_file_ensure {
file { $key_file:
Expand Down Expand Up @@ -332,8 +326,14 @@
install_entry => {
'WantedBy' => 'multi-user.target',
},
active => $active,
enable => $enable,
active => case $ensure {
'present' : { $active }
default : { false }
},
enable => case $ensure {
'present' : { $enable }
default : { false }
},
}
}
'windows' : {
Expand Down Expand Up @@ -365,14 +365,14 @@
}
if $enable != undef or $active != undef {
File[$config_file] ~> Service[$service_name]
if $ca_file_path {
File[$ca_file_path] ~> Service[$service_name]
if $ca_file {
File[$ca_file] ~> Service[$service_name]
}
if $cert_file_path {
File[$cert_file_path] ~> Service[$service_name]
if $cert_file {
File[$cert_file] ~> Service[$service_name]
}
if $key_file_path {
File[$key_file_path] ~> Service[$service_name]
if $key_file {
File[$key_file] ~> Service[$service_name]
}
}
}
Expand Down

0 comments on commit f87e29e

Please sign in to comment.