Skip to content

Commit

Permalink
Merge pull request #201 from igalic/require
Browse files Browse the repository at this point in the history
fix(validate_rd_policy) expand relative path for require
  • Loading branch information
bastelfreak committed Mar 11, 2016
2 parents e90dab8 + 0ebddde commit 647ea85
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/puppet/parser/functions/validate_rd_policy.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'puppetx/rundeck/acl'
require File.expand_path('../../../../puppetx/rundeck/acl', __FILE__)

# Validates the rundeck ACL policies
# Usage:
Expand Down
13 changes: 11 additions & 2 deletions manifests/config/global/ssl.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,17 @@

$properties_file = "${properties_dir}/ssl/ssl.properties"

ensure_resource('file', $properties_dir, {'ensure' => 'directory', 'owner' => $user, 'group' => $group} )
ensure_resource('file', "${properties_dir}/ssl", {'ensure' => 'directory', 'owner' => $user, 'group' => $group, 'require' => File[$properties_dir]} )
ensure_resource('file', $properties_dir, {
'ensure' => 'directory',
'owner' => $user,
'group' => $group
} )
ensure_resource('file', "${properties_dir}/ssl", {
'ensure' => 'directory',
'owner' => $user,
'group' => $group,
'require' => File[$properties_dir]
} )

Ini_setting {
notify => Service[$service_name],
Expand Down
13 changes: 11 additions & 2 deletions manifests/config/resource_source.pp
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,17 @@
validate_re($user, '[a-zA-Z0-9]{3,}')
validate_re($group, '[a-zA-Z0-9]{3,}')

ensure_resource('file', "${projects_dir}/${project_name}", {'ensure' => 'directory', 'owner' => $user, 'group' => $group} )
ensure_resource('file', "${projects_dir}/${project_name}/etc", {'ensure' => 'directory', 'owner' => $user, 'group' => $group, 'require' => File["${projects_dir}/${project_name}"]} )
ensure_resource('file', "${projects_dir}/${project_name}", {
'ensure' => 'directory',
'owner' => $user,
'group' => $group
} )
ensure_resource('file', "${projects_dir}/${project_name}/etc", {
'ensure' => 'directory',
'owner' => $user,
'group' => $group,
'require' => File["${projects_dir}/${project_name}"]
} )

$properties_dir = "${projects_dir}/${project_name}/etc"
$properties_file = "${properties_dir}/project.properties"
Expand Down

0 comments on commit 647ea85

Please sign in to comment.