Skip to content

Commit

Permalink
(choria-io#207) manage more required directories
Browse files Browse the repository at this point in the history
Signed-off-by: R.I.Pienaar <rip@devco.net>
  • Loading branch information
ripienaar committed Dec 29, 2020
1 parent 67d7fed commit d655566
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 d655566

Please sign in to comment.