Skip to content

Commit

Permalink
Remove deprecated source_permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
jkroepke committed Nov 9, 2019
1 parent 1bf3b6b commit 74306f9
Showing 1 changed file with 37 additions and 13 deletions.
50 changes: 37 additions & 13 deletions manifests/ca.pp
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,45 @@
mode => '0750'
})

file { "${etc_directory}/openvpn/${name}/easy-rsa" :
ensure => directory,
recurse => true,
links => 'follow',
source_permissions => 'use',
group => 0,
source => "file:${openvpn::easyrsa_source}",
require => File["${etc_directory}/openvpn/${name}"],
}

file { "${etc_directory}/openvpn/${name}/easy-rsa/revoked":
file { "${etc_directory}/openvpn/${name}/easy-rsa":
ensure => directory,
mode => '0750',
recurse => true,
require => File["${etc_directory}/openvpn/${name}/easy-rsa"],
links => 'follow',
ignore => '*.cnf',
owner => 0,
group => 0,
mode => '0755',
source => "file:${openvpn::easyrsa_source}",
require => File["${etc_directory}/openvpn/${name}"],
}

exec { "copy *.cnf files from easyrsa source to ${name}":
command => "cp '${openvpn::easyrsa_source}/'*.cnf .",
cwd => "${etc_directory}/openvpn/${name}/easy-rsa",
unless => 'ls *.cnf',
provider => 'shell',
require => File["${etc_directory}/openvpn/${name}/easy-rsa"],
before => Exec["initca ${name}"];
}

file {
"${etc_directory}/openvpn/${name}/easy-rsa/.rnd":
ensure => present,
owner => 0,
group => 0,
mode => '0600',
require => File["${etc_directory}/openvpn/${name}/easy-rsa"];
"${etc_directory}/openvpn/${name}/easy-rsa/keys":
ensure => directory,
owner => 0,
group => 0,
mode => '0700',
require => File["${etc_directory}/openvpn/${name}/easy-rsa"];
"${etc_directory}/openvpn/${name}/easy-rsa/revoked":
ensure => directory,
mode => '0750',
recurse => true,
require => File["${etc_directory}/openvpn/${name}/easy-rsa"];
}

case $openvpn::easyrsa_version {
Expand Down

0 comments on commit 74306f9

Please sign in to comment.