Skip to content

Commit

Permalink
Merge pull request #373 from ekohl/fix-canonical-type
Browse files Browse the repository at this point in the history
Remove camptocamp/augeas dependency
  • Loading branch information
bastelfreak authored Nov 21, 2023
2 parents 76bad49 + 84a211b commit 3e09850
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 23 deletions.
1 change: 0 additions & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#### Private Classes

* `postfix::augeas`: Provides augeas lenses for postfix files
* `postfix::files`: Manages the Postfix related files
* `postfix::ldap`: Provides the Postfix LDAP support
* `postfix::mailman`: Configure Postfix to work with mailman
Expand Down
File renamed without changes.
File renamed without changes.
16 changes: 0 additions & 16 deletions manifests/augeas.pp

This file was deleted.

3 changes: 1 addition & 2 deletions manifests/canonical.pp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
String[1] $lookup_table_suffix = 'db',
) {
include postfix
include postfix::augeas

$_file = pick($file, "${postfix::confdir}/canonical")

Expand All @@ -66,7 +65,7 @@

augeas { "Postfix canonical - ${name}":
incl => $_file,
lens => 'Postfix_Canonical.lns',
lens => 'postfix_canonical.lns',
changes => $changes,
require => Package['postfix'],
notify => Exec["generate ${_file}.${lookup_table_suffix}"],
Expand Down
4 changes: 0 additions & 4 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
"name": "puppetlabs/stdlib",
"version_requirement": ">= 4.13.0 < 10.0.0"
},
{
"name": "camptocamp/augeas",
"version_requirement": ">= 1.0.0 < 2.0.0"
},
{
"name": "puppet/alternatives",
"version_requirement": ">= 2.0.0 < 6.0.0"
Expand Down
24 changes: 24 additions & 0 deletions spec/acceptance/canonical_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# frozen_string_literal: true

require 'spec_helper_acceptance'

describe 'postfix::canonical' do
it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<~PUPPET
include postfix
postfix::hash { '/etc/postfix/recipient_canonical':
ensure => present,
}
postfix::config { 'canonical_alias_maps':
value => 'hash:/etc/postfix/recipient_canonical',
}
postfix::canonical { '[email protected]':
file => '/etc/postfix/recipient_canonical',
ensure => present,
destination => 'root',
}
PUPPET
end
end
end

0 comments on commit 3e09850

Please sign in to comment.