Skip to content

Commit

Permalink
Fix facter path for Solaris
Browse files Browse the repository at this point in the history
  • Loading branch information
sst-yde committed Jan 29, 2018
1 parent bf503ee commit 16d791a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
9 changes: 7 additions & 2 deletions manifests/defaults.pp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,13 @@
'datadir' => '/etc/puppetlabs/code/hieradata/%{environment}'
}
}
$facterbasepath = '/opt/puppetlabs/facter'
$reports_dir = '/opt/puppetlabs/server/data/reports'
if $::osfamily == 'Solaris' {
$facterbasepath = '/var/puppetlabs/puppet/cache'
$reports_dir = '/var/puppetlabs/puppet/cache/reports'
} else {
$facterbasepath = '/opt/puppetlabs/facter'
$reports_dir = '/opt/puppetlabs/server/data/reports'
}
$terminus_package = 'puppetdb-termini'
$puppetdb_etcdir = '/etc/puppetlabs/puppetdb'
$puppetdb_test_url = '/pdb/meta/v1/version'
Expand Down
7 changes: 6 additions & 1 deletion spec/classes/puppet_facts_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@
end
it { is_expected.to compile.with_all_deps }
if Puppet.version.to_f >= 4.0
facterbasepath = '/opt/puppetlabs/facter'
case facts[:osfamily]
when 'Solaris'
facterbasepath = '/var/puppetlabs/puppet/cache'
else
facterbasepath = '/opt/puppetlabs/facter'
end
else
facterbasepath = '/etc/facter'
end
Expand Down
7 changes: 6 additions & 1 deletion spec/classes/puppet_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@
end
it { is_expected.to compile.with_all_deps }
if Puppet.version.to_f >= 4.0
facterbasepath = '/opt/puppetlabs/facter'
case facts[:osfamily]
when 'Solaris'
facterbasepath = '/var/puppetlabs/puppet/cache'
else
facterbasepath = '/opt/puppetlabs/facter'
end
facterbasepath_group = 'root'
else
facterbasepath = '/etc/facter'
Expand Down
7 changes: 6 additions & 1 deletion spec/defines/fact_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@
end

if Puppet.version.to_f >= 4.0
facterbasepath = '/opt/puppetlabs/facter'
case facts[:osfamily]
when 'Solaris'
facterbasepath = '/var/puppetlabs/puppet/cache'
else
facterbasepath = '/opt/puppetlabs/facter'
end
facterbasepath_group = 'root'
else
facterbasepath = '/etc/facter'
Expand Down

0 comments on commit 16d791a

Please sign in to comment.