Open LBanzato opened 5 years ago
Hi Luigi, You need to set the overrides as either an environment variable :
FACTER_override_wls_domains_file=/opt/oracle/wls_domains.yaml FACTER_override_wls_setting_file=/opt/oracle/wls_setting.yaml
or in your manifest which calls Edwins module:
if ebsEnabled == "true" then
Facter.add(:override_wls_domains_file) do
setcode do
override_wls_domains_file="/opt/weblogic/user_projects/wls_domains.yaml"
end
end
Facter.add(:override_wls_setting_file) do
setcode do
override_wls_setting_file="/opt/weblogic/user_projects/wls_settings.yaml"
end
end
end
However, there is a bug in the module. The domains file override doesn't work. In the copydomain.pp and domain.pp the value is hardcoded:
String $wls_domains_file = /etc/wls_domains.yaml',
I'm going to write a separate bug to Edwin to confirm this.
We have a scenario where we use the orawls (release 2.0.19) module and where puppet is run as a non-root user. Due to the limited permissions of the user running puppet it doesn't have access to /etc, so we defined the override_wls_setting_file to create the wls_settings.yaml file somewhere else:
However, it seems the module is not picking that up and using its default (thus failing due to the lack for permissions):
If I do a hiera lookup, it does find my custom location (/opt/oracle instead of /etc):
As a work around I changed both ruby scripts to use the location we want as a default: orawls/lib/puppet/type/wls_setting.rb orawls/lib/utils/settings.rb
But I am curious to know if you came across any similar issues.
Thanks, Luigi