Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Puppet Camptocamp Postfix
Commits
0485a8d2
Commit
0485a8d2
authored
Apr 14, 2015
by
Mickaël Canévet
Browse files
Use file() instead of fileserver
parent
f48cbe51
Changes
3
Hide whitespace changes
Inline
Side-by-side
.travis.yml
View file @
0485a8d2
...
...
@@ -9,6 +9,8 @@ matrix:
include
:
-
rvm
:
1.8.7
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
env
:
PUPPET_GEM_VERSION="~> 3.0"
-
rvm
:
2.0.0
...
...
manifests/augeas.pp
View file @
0485a8d2
...
...
@@ -2,21 +2,23 @@
# This class provides the augeas lenses used by the postfix class
#
class
postfix::augeas
{
$module_path
=
get_module_path
(
$module_name
)
augeas::lens
{
'postfix_transport'
:
ensure
=>
present
,
lens_
source
=>
'puppet:///modules/postfix
/lenses/postfix_transport.aug
'
,
test_
source
=>
'puppet:///modules/postfix
/lenses/test_postfix_transport.aug
'
,
stock_since
=>
'1.0.0'
,
ensure
=>
present
,
lens_
content
=>
file
(
"
${module_path}
/files
/lenses/postfix_transport.aug
"
)
,
test_
content
=>
file
(
"
${module_path}
/files
/lenses/test_postfix_transport.aug
"
)
,
stock_since
=>
'1.0.0'
,
}
augeas::lens
{
'postfix_virtual'
:
ensure
=>
present
,
lens_
source
=>
'puppet:///modules/postfix
/lenses/postfix_virtual.aug
'
,
test_
source
=>
'puppet:///modules/postfix
/lenses/test_postfix_virtual.aug
'
,
stock_since
=>
'1.0.0'
,
ensure
=>
present
,
lens_
content
=>
file
(
"
${module_path}
/files
/lenses/postfix_virtual.aug
"
)
,
test_
content
=>
file
(
"
${module_path}
/files
/lenses/test_postfix_virtual.aug
"
)
,
stock_since
=>
'1.0.0'
,
}
augeas::lens
{
'postfix_canonical'
:
ensure
=>
present
,
lens_
source
=>
'puppet:///modules/postfix
/lenses/postfix_canonical.aug
'
,
test_
source
=>
'puppet:///modules/postfix
/lenses/test_postfix_canonical.aug
'
,
ensure
=>
present
,
lens_
content
=>
file
(
"
${module_path}
/files
/lenses/postfix_canonical.aug
"
)
,
test_
content
=>
file
(
"
${module_path}
/files
/lenses/test_postfix_canonical.aug
"
)
,
}
}
spec/classes/postfix_augeas_spec.rb
View file @
0485a8d2
...
...
@@ -17,16 +17,16 @@ describe 'postfix::augeas' do
it
{
is_expected
.
to
compile
.
with_all_deps
}
it
{
is_expected
.
to
contain_augeas__lens
(
'postfix_transport'
).
with
({
:ensure
=>
'present'
,
:lens_
source
=>
'puppet:///modules/postfix/lenses
/postfix
_
transport
.aug'
,
:test_
source
=>
'puppet:///modules/postfix/lenses/test_p
ostfix_
t
ransport
.aug'
,
:stock_since
=>
'1.0.0'
,
:ensure
=>
'present'
,
:lens_
content
=>
%r{Parses /etc
/postfix
/
transport
}
,
:test_
content
=>
%r{Provides unit tests and examples for the <P
ostfix_
T
ransport
> lens.}
,
:stock_since
=>
'1.0.0'
,
}
)
}
it
{
is_expected
.
to
contain_augeas__lens
(
'postfix_virtual'
).
with
({
:ensure
=>
'present'
,
:lens_
source
=>
'puppet:///modules/postfix/lenses
/postfix
_
virtual
.aug'
,
:test_
source
=>
'puppet:///modules/postfix/lenses/test_p
ostfix_
v
irtual
.aug'
,
:stock_since
=>
'1.0.0'
,
:ensure
=>
'present'
,
:lens_
content
=>
%r{Parses /etc
/postfix
/
virtual
}
,
:test_
content
=>
%r{Provides unit tests and examples for the <P
ostfix_
V
irtual
> lens.}
,
:stock_since
=>
'1.0.0'
,
})
}
end
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment