Commit 0485a8d2 authored by Mickaël Canévet's avatar Mickaël Canévet
Browse files

Use file() instead of fileserver

parent f48cbe51
...@@ -9,6 +9,8 @@ matrix: ...@@ -9,6 +9,8 @@ matrix:
include: include:
- rvm: 1.8.7 - rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 3.0" FACTER_GEM_VERSION="~> 1.7.0" env: PUPPET_GEM_VERSION="~> 3.0" FACTER_GEM_VERSION="~> 1.7.0"
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3.6.0"
- rvm: 1.9.3 - rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3.0" env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 2.0.0 - rvm: 2.0.0
......
...@@ -2,21 +2,23 @@ ...@@ -2,21 +2,23 @@
# This class provides the augeas lenses used by the postfix class # This class provides the augeas lenses used by the postfix class
# #
class postfix::augeas { class postfix::augeas {
$module_path = get_module_path($module_name)
augeas::lens {'postfix_transport': augeas::lens {'postfix_transport':
ensure => present, ensure => present,
lens_source => 'puppet:///modules/postfix/lenses/postfix_transport.aug', lens_content => file("${module_path}/files/lenses/postfix_transport.aug"),
test_source => 'puppet:///modules/postfix/lenses/test_postfix_transport.aug', test_content => file("${module_path}/files/lenses/test_postfix_transport.aug"),
stock_since => '1.0.0', stock_since => '1.0.0',
} }
augeas::lens {'postfix_virtual': augeas::lens {'postfix_virtual':
ensure => present, ensure => present,
lens_source => 'puppet:///modules/postfix/lenses/postfix_virtual.aug', lens_content => file("${module_path}/files/lenses/postfix_virtual.aug"),
test_source => 'puppet:///modules/postfix/lenses/test_postfix_virtual.aug', test_content => file("${module_path}/files/lenses/test_postfix_virtual.aug"),
stock_since => '1.0.0', stock_since => '1.0.0',
} }
augeas::lens {'postfix_canonical': augeas::lens {'postfix_canonical':
ensure => present, ensure => present,
lens_source => 'puppet:///modules/postfix/lenses/postfix_canonical.aug', lens_content => file("${module_path}/files/lenses/postfix_canonical.aug"),
test_source => 'puppet:///modules/postfix/lenses/test_postfix_canonical.aug', test_content => file("${module_path}/files/lenses/test_postfix_canonical.aug"),
} }
} }
...@@ -18,14 +18,14 @@ describe 'postfix::augeas' do ...@@ -18,14 +18,14 @@ describe 'postfix::augeas' do
it { is_expected.to contain_augeas__lens('postfix_transport').with({ it { is_expected.to contain_augeas__lens('postfix_transport').with({
:ensure => 'present', :ensure => 'present',
:lens_source => 'puppet:///modules/postfix/lenses/postfix_transport.aug', :lens_content => %r{Parses /etc/postfix/transport},
:test_source => 'puppet:///modules/postfix/lenses/test_postfix_transport.aug', :test_content => %r{Provides unit tests and examples for the <Postfix_Transport> lens.},
:stock_since => '1.0.0', :stock_since => '1.0.0',
} ) } } ) }
it { is_expected.to contain_augeas__lens('postfix_virtual').with({ it { is_expected.to contain_augeas__lens('postfix_virtual').with({
:ensure => 'present', :ensure => 'present',
:lens_source => 'puppet:///modules/postfix/lenses/postfix_virtual.aug', :lens_content => %r{Parses /etc/postfix/virtual},
:test_source => 'puppet:///modules/postfix/lenses/test_postfix_virtual.aug', :test_content => %r{Provides unit tests and examples for the <Postfix_Virtual> lens.},
:stock_since => '1.0.0', :stock_since => '1.0.0',
}) } }) }
end end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment