Skip to content

Commit

Permalink
Merge pull request #213 from ripienaar/207.1
Browse files Browse the repository at this point in the history
(#207) manage more required directories
  • Loading branch information
ripienaar authored Dec 29, 2020
2 parents 67d7fed + d655566 commit 45db61a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

$_config_dir = dirname($choria::server_config_file)

file{[$_config_dir, "${_config_dir}/policies", "${_config_dir}/plugin.d"]:
file{[$_config_dir, "${_config_dir}/policies", "${_config_dir}/policies/rego", "${_config_dir}/plugin.d"]:
ensure => "directory",
owner => $choria::config_user,
group => $choria::config_group,
Expand Down
3 changes: 3 additions & 0 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
it { is_expected.to contain_file("C:/ProgramData/choria/etc").with_ensure("directory") }
it { is_expected.to contain_file("C:/ProgramData/choria/etc/machine").with_ensure("directory") }
it { is_expected.to contain_file("C:/ProgramData/choria/etc/policies").with_ensure("directory") }
it { is_expected.to contain_file("C:/ProgramData/choria/etc/policies/rego").with_ensure("directory") }
it { is_expected.to contain_file("C:/ProgramData/choria/etc/plugin.d").with_ensure("directory") }
it { is_expected.to contain_file("C:/ProgramData/choria/etc/overrides.json") }
it { is_expected.to contain_file("C:/ProgramData/choria/etc/server.conf") }
Expand All @@ -45,6 +46,7 @@
it { is_expected.to contain_file("/etc/choria").with_ensure("directory") }
it { is_expected.to contain_file("/etc/choria/plugin.d").with_ensure("directory") }
it { is_expected.to contain_file("/etc/choria/policies").with_ensure("directory") }
it { is_expected.to contain_file("/etc/choria/policies/rego").with_ensure("directory") }
it { is_expected.to contain_file("/etc/choria/machine").with_ensure("directory") }
end
context "on FreeBSD", if: facts[:os]["name"] == "FreeBSD" do
Expand All @@ -53,6 +55,7 @@
it { is_expected.to contain_file("/usr/local/etc/choria").with_ensure("directory") }
it { is_expected.to contain_file("/usr/local/etc/choria/plugin.d").with_ensure("directory") }
it { is_expected.to contain_file("/usr/local/etc/choria/policies").with_ensure("directory") }
it { is_expected.to contain_file("/usr/local/etc/choria/policies/rego").with_ensure("directory") }
it { is_expected.to contain_file("/usr/local/etc/choria/server.conf") }
it { is_expected.to contain_file("/usr/local/etc/choria/machine").with_ensure("directory") }
end
Expand Down

0 comments on commit 45db61a

Please sign in to comment.