diff --git a/data/common.yaml b/data/common.yaml index e232924..ffc628f 100644 --- a/data/common.yaml +++ b/data/common.yaml @@ -1,4 +1,3 @@ --- augeas::aio_lens_dir: /opt/puppetlabs/puppet/share/augeas/lenses -augeas::pe_lens_dir: /opt/puppet/share/augeas/lenses augeas::system_lens_dir: /usr/share/augeas/lenses diff --git a/data/os/Archlinux.yaml b/data/os/Archlinux.yaml deleted file mode 100644 index 00dcc09..0000000 --- a/data/os/Archlinux.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -augeas::pe_lens_dir: /usr/share/augeas/lenses diff --git a/data/os/FreeBSD.yaml b/data/os/FreeBSD.yaml index 3c6cd57..858632a 100644 --- a/data/os/FreeBSD.yaml +++ b/data/os/FreeBSD.yaml @@ -1,4 +1,3 @@ --- augeas::files_group: "wheel" -augeas::pe_lens_dir: /usr/local/share/augeas/lenses augeas::system_lens_dir: /usr/local/share/augeas/lenses diff --git a/functions/lens_dir.pp b/functions/lens_dir.pp index aa89ba2..7bde6ca 100644 --- a/functions/lens_dir.pp +++ b/functions/lens_dir.pp @@ -4,10 +4,8 @@ function augeas::lens_dir() >> String { if $augeas::lens_dir { $augeas::lens_dir - } elsif versioncmp($facts['puppetversion'], '4.0.0') >= 0 and 'aio_agent_version' in $facts { + } elsif 'aio_agent_version' in $facts { $augeas::aio_lens_dir - } elsif 'is_pe' in $facts and $facts['is_pe'] { - $augeas::pe_lens_dir } else { $augeas::system_lens_dir } diff --git a/manifests/init.pp b/manifests/init.pp index 1555158..05dde6b 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -7,7 +7,6 @@ # ['purge'] - whether to purge lens directories class augeas ( Stdlib::Absolutepath $aio_lens_dir, - Stdlib::Absolutepath $pe_lens_dir, Stdlib::Absolutepath $system_lens_dir, String $files_owner = 'root', String $files_group = 'root', diff --git a/spec/classes/augeas_spec.rb b/spec/classes/augeas_spec.rb index f31d6b3..c6e9a3f 100644 --- a/spec/classes/augeas_spec.rb +++ b/spec/classes/augeas_spec.rb @@ -83,36 +83,6 @@ ).without(:recurse) } end - - context 'with Puppet Enterprise' do - let(:facts) do - facts.merge(is_pe: true) - end - - it { - is_expected.to contain_file(lens_dir).with( - ensure: 'directory', - force: 'true', - recurse: 'true', - recurselimit: 1 - ) - } - - it { - is_expected.to contain_file("#{lens_dir}/dist").with( - ensure: 'directory', - purge: 'false' - ) - } - - it { - is_expected.to contain_file("#{lens_dir}/tests").with( - ensure: 'directory', - force: 'true', - purge: 'true' - ).without(:recurse) - } - end end end end