Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if relayhost is defined, then use the satellite profile #310

Closed
wants to merge 50 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
eceb92a
if relayhost is define, then use the satellite profile
Oct 5, 2021
15bac55
ensure relayhost is set to direct when mta is used directly and corre…
Oct 6, 2021
5d162e5
augeasversion not define and validation test fail on travis
Oct 6, 2021
62e9528
Add manage_mailname parameter to README (#186)
Oct 10, 2021
43ac54a
Merge pull request #312 from wobblesprout/master
root-expert Oct 10, 2021
4af101e
Allow smtpd_listener to accept multiple items
Oct 10, 2021
d25330f
Parentheses unnecessary
kapouik Oct 11, 2021
bbfcbbb
Allow multiple smtp_listen IPs as a string
Oct 11, 2021
432a2f7
Add min size for smtp_listen strings
Oct 13, 2021
6cfefb9
Merge pull request #313 from wobblesprout/master
ghoneycutt Oct 14, 2021
d4429a9
rework documentation and error message
Oct 15, 2021
5608bb6
init.pp: correct param numbers and use of optional
kenyon Oct 18, 2021
1ed71c9
init.pp: fix indentation
kenyon Oct 18, 2021
35dae1f
postfix_spec: use better test descriptions
kenyon Oct 18, 2021
7f0b884
init.pp: allow creation of postfix::map resources with hiera
kenyon Oct 18, 2021
0d4e6ad
map: handle regexp type
kenyon Oct 18, 2021
f93a331
remove unneeded tests; provide error message for raise_error
kenyon Oct 18, 2021
9c9b976
Merge pull request #315 from kenyon/fix-param-numbers-and-optional-usage
kenyon Oct 19, 2021
b9b9011
Merge pull request #316 from kenyon/hiera-maps
kenyon Oct 19, 2021
e430a8a
Merge pull request #317 from kenyon/regexp-map-type
kenyon Oct 19, 2021
125d35c
Merge pull request #318 from kenyon/tests-cleanup
kenyon Oct 19, 2021
b41068a
modulesync 5.1.0
bastelfreak Dec 15, 2021
7ef0d76
rubocop:auto_correct results
traylenator Feb 10, 2022
ec1d6ab
RuboCop/Cop/RSpec/EmptyExampleGroup - fixes
traylenator Feb 10, 2022
efe032e
rubocop - ignore - RSpec::MultipleMemoizedHelpers
traylenator Feb 10, 2022
3779c38
rubocop - RSpec/RepeatedExampleGroupBody corrected
traylenator Feb 10, 2022
d1fe9fc
lintfix
traylenator Feb 10, 2022
fd27305
Merge pull request #321 from traylenator/rubo
bastelfreak Feb 10, 2022
d6e6156
Install s-nail package on CentOS/RHEL 9
traylenator Feb 10, 2022
ba2cac9
Declare CentOS 9 support
traylenator Feb 10, 2022
76ebbcc
Merge pull request #322 from traylenator/mailx
traylenator Feb 11, 2022
ddb8dee
Version 4.0.0 of Forge Module puppet-alternatives has been out since …
KoenDierckx Feb 23, 2022
d73f04d
Merge pull request #325 from KoenDierckx/master
ghoneycutt Feb 23, 2022
f397893
Add switches for simple domain masquerade
jcpunk Mar 8, 2022
1cdc9ac
Merge pull request #326 from jcpunk/masqurade
smortex Apr 12, 2022
9a20308
modulesync 5.2.0
bastelfreak May 5, 2022
8d8d8a0
Merge pull request #330 from voxpupuli/modulesync
bastelfreak May 5, 2022
e5753b5
Release 3.0.0
bastelfreak May 5, 2022
2c74445
Merge pull request #331 from bastelfreak/rel300
bastelfreak May 5, 2022
82ab6f6
[blacksmith] Bump version to 3.0.1-rc0
bastelfreak May 5, 2022
f65b39a
Fix typos errors in postfix::satellite from PR 326
cruelsmith Jun 20, 2022
2c295cb
Replace pick_default with lest function
cruelsmith Jun 20, 2022
f6c6eb3
Merge pull request #333 from cruelsmith/fix_typos_of_326
rwaffen Jun 21, 2022
1f50af3
if relayhost is define, then use the satellite profile
Oct 5, 2021
46bc40c
ensure relayhost is set to direct when mta is used directly and corre…
Oct 6, 2021
0e610c6
augeasversion not define and validation test fail on travis
Oct 6, 2021
e104a8c
Parentheses unnecessary
kapouik Oct 11, 2021
5380e67
rework documentation and error message
Oct 15, 2021
071a758
merge after rebase
Jun 27, 2022
a71a821
rebase
Jun 27, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ If you have Ruby 2.x or want a specific version of Puppet,
you must set an environment variable such as:

```sh
export PUPPET_VERSION="~> 5.5.6"
export PUPPET_GEM_VERSION="~> 6.1.0"
```

You can install all needed gems for spec tests into the modules directory by
Expand Down Expand Up @@ -232,17 +232,16 @@ simple tests against it after applying the module. You can run this
with:

```sh
BEAKER_setfile=debian10-x64 bundle exec rake beaker
BEAKER_setfile=debian11-64 bundle exec rake beaker
```

You can replace the string `debian10` with any common operating system.
The following strings are known to work:

* ubuntu1604
* ubuntu1804
* ubuntu2004
* debian9
* debian10
* debian11
* centos7
* centos8

Expand Down
84 changes: 6 additions & 78 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,84 +7,12 @@ name: CI
on: pull_request

concurrency:
group: ${{ github.head_ref }}
group: ${{ github.ref_name }}
cancel-in-progress: true

jobs:
setup_matrix:
name: 'Setup Test Matrix'
runs-on: ubuntu-latest
timeout-minutes: 40
outputs:
puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }}
github_action_test_matrix: ${{ steps.get-outputs.outputs.github_action_test_matrix }}
env:
BUNDLE_WITHOUT: development:system_tests:release
steps:
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
- name: Run static validations
run: bundle exec rake validate lint check
- name: Run rake rubocop
run: bundle exec rake rubocop
- name: Setup Test Matrix
id: get-outputs
run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false

unit:
needs: setup_matrix
runs-on: ubuntu-latest
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}}
env:
BUNDLE_WITHOUT: development:system_tests:release
PUPPET_VERSION: "~> ${{ matrix.puppet }}.0"
name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }})
steps:
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake parallel_spec

acceptance:
needs: setup_matrix
runs-on: ubuntu-latest
env:
BUNDLE_WITHOUT: development:test:release
strategy:
fail-fast: false
matrix:
include: ${{fromJson(needs.setup_matrix.outputs.github_action_test_matrix)}}
name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }}
steps:
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
- name: Run tests
run: bundle exec rake beaker
env:
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet.collection }}
BEAKER_setfile: ${{ matrix.setfile.value }}

tests:
needs:
- unit
- acceptance
runs-on: ubuntu-latest
name: Test suite
steps:
- run: echo Test suite completed
puppet:
name: Puppet
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v1
with:
pidfile_workaround: 'false'
32 changes: 10 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,14 @@ on:
tags:
- '*'

env:
BUNDLE_WITHOUT: development:test:system_tests

jobs:
deploy:
name: 'deploy to forge'
runs-on: ubuntu-latest
if: github.repository_owner == 'voxpupuli'
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- name: Build and Deploy
env:
# Configure secrets here:
# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
BLACKSMITH_FORGE_USERNAME: '${{ secrets.PUPPET_FORGE_USERNAME }}'
BLACKSMITH_FORGE_API_KEY: '${{ secrets.PUPPET_FORGE_API_KEY }}'
run: bundle exec rake module:push
release:
name: Release
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v1
with:
allowed_owner: 'voxpupuli'
secrets:
# Configure secrets here:
# https://docs.github.com/en/actions/security-guides/encrypted-secrets
username: ${{ secrets.PUPPET_FORGE_USERNAME }}
api_key: ${{ secrets.PUPPET_FORGE_API_KEY }}
41 changes: 0 additions & 41 deletions .gitlab-ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

modulesync_config_version: '4.2.0'
modulesync_config_version: '5.2.0'
42 changes: 0 additions & 42 deletions .pdkignore

This file was deleted.

4 changes: 3 additions & 1 deletion .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
--relative
--fail-on-warnings
--no-parameter_documentation-check
--no-parameter_types-check
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,39 @@ All notable changes to this project will be documented in this file.
Each new release typically also includes the latest modulesync defaults.
These should not affect the functionality of the module.

## [v3.0.0](https://github.com/voxpupuli/puppet-postfix/tree/v3.0.0) (2022-05-05)

[Full Changelog](https://github.com/voxpupuli/puppet-postfix/compare/v2.0.0...v3.0.0)

**Breaking changes:**

- Drop support for FreeBSD 11 \(EOL\) [\#306](https://github.com/voxpupuli/puppet-postfix/pull/306) ([smortex](https://github.com/smortex))

**Implemented enhancements:**

- Declare CentOS 9 Support, Install s-nail on 9 [\#322](https://github.com/voxpupuli/puppet-postfix/pull/322) ([traylenator](https://github.com/traylenator))
- Add support for FreeBSD 13 [\#307](https://github.com/voxpupuli/puppet-postfix/pull/307) ([smortex](https://github.com/smortex))
- allow hiera driven transport/virtual/hash/conffile [\#296](https://github.com/voxpupuli/puppet-postfix/pull/296) ([cringdahl](https://github.com/cringdahl))

**Closed issues:**

- increase dependency of puppet/alternatives to next major version [\#324](https://github.com/voxpupuli/puppet-postfix/issues/324)
- smtp\_listen to take multiple addresses [\#203](https://github.com/voxpupuli/puppet-postfix/issues/203)

**Merged pull requests:**

- Add switches for simple domain masquerade [\#326](https://github.com/voxpupuli/puppet-postfix/pull/326) ([jcpunk](https://github.com/jcpunk))
- increase dependency of puppet/alternatives to next major version [\#325](https://github.com/voxpupuli/puppet-postfix/pull/325) ([KoenDierckx](https://github.com/KoenDierckx))
- Comply to rubocop 1.22.3 [\#321](https://github.com/voxpupuli/puppet-postfix/pull/321) ([traylenator](https://github.com/traylenator))
- remove unneeded tests; provide error message for raise\_error [\#318](https://github.com/voxpupuli/puppet-postfix/pull/318) ([kenyon](https://github.com/kenyon))
- map: handle regexp type [\#317](https://github.com/voxpupuli/puppet-postfix/pull/317) ([kenyon](https://github.com/kenyon))
- allow creation of postfix::map resources with hiera [\#316](https://github.com/voxpupuli/puppet-postfix/pull/316) ([kenyon](https://github.com/kenyon))
- init.pp: correct param numbers and use of optional [\#315](https://github.com/voxpupuli/puppet-postfix/pull/315) ([kenyon](https://github.com/kenyon))
- Allow parameter smtp\_listen to accept multiple IPs [\#313](https://github.com/voxpupuli/puppet-postfix/pull/313) ([wobblesprout](https://github.com/wobblesprout))
- Add manage\_mailname parameter to README \(\#186\) [\#312](https://github.com/voxpupuli/puppet-postfix/pull/312) ([wobblesprout](https://github.com/wobblesprout))
- fixtures.yml: Migrate to git URLs [\#309](https://github.com/voxpupuli/puppet-postfix/pull/309) ([bastelfreak](https://github.com/bastelfreak))
- puppet-lint: fix top\_scope\_facts warnings [\#304](https://github.com/voxpupuli/puppet-postfix/pull/304) ([bastelfreak](https://github.com/bastelfreak))

## [v2.0.0](https://github.com/voxpupuli/puppet-postfix/tree/v2.0.0) (2021-08-26)

[Full Changelog](https://github.com/voxpupuli/puppet-postfix/compare/1.12.0...v2.0.0)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /opt/puppet
# https://github.com/puppetlabs/puppet/blob/06ad255754a38f22fb3a22c7c4f1e2ce453d01cb/lib/puppet/provider/service/runit.rb#L39
RUN mkdir -p /etc/sv

ARG PUPPET_VERSION="~> 6.0"
ARG PUPPET_GEM_VERSION="~> 6.0"
ARG PARALLEL_TEST_PROCESSORS=4

# Cache gems
Expand Down
8 changes: 4 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

source ENV['GEM_SOURCE'] || "https://rubygems.org"
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

group :test do
gem 'voxpupuli-test', '~> 2.5', :require => false
gem 'voxpupuli-test', '~> 5.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 1.0', :require => false
Expand All @@ -22,14 +22,14 @@ end

group :release do
gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5'
gem 'voxpupuli-release', '>= 1.0.2', :require => false
gem 'voxpupuli-release', '>= 1.2.0', :require => false
gem 'puppet-strings', '>= 2.2', :require => false
end

gem 'rake', :require => false
gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test]

puppetversion = ENV['PUPPET_VERSION'] || '>= 6.0'
puppetversion = ENV['PUPPET_GEM_VERSION'] || '>= 6.0'
gem 'puppet', puppetversion, :require => false, :groups => [:test]

# vim: syntax=ruby
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,35 @@ A Boolean defining whether the puppet module should replace the configuration fi

Default: true.

##### `manage_mailname`

A Boolean defining whether the puppet module should manage '/etc/mailname'.
See also $manage_conffiles

Default: true.

##### `manage_mailx`

A Boolean defining whether the puppet module should manage the mailx package. See also $mailx_ensure.

Default: true.

##### `masquerade_classes`
An array defining the masquerade_classes to use.
Default: Undefined.
Example: ['envelope_sender', 'envelope_recipient', 'header_sender', 'header_recipient']

##### `masquerade_domains`
An array defining the masquerade_domains to use.
The order of elements matters here, so be aware of how you define the elements.
Default: Undefined.
Example: ['foo.example.com', 'example.com']

##### `masquerade_exceptions`
An array defining the masquerade_exceptions to use.
Default: Undefined.
Example: ['root']

##### `mastercf_source`
A string defining the location of a skeleton master.cf file to be used.
Default: Undefined.
Expand All @@ -136,7 +159,7 @@ Default: Undefined.
Example: 'submission inet n - n - - smtpd'.

##### `mta`
A Boolean to define whether to configure Postfix as a mail transfer agent. This option is mutually exclusive with the satellite Boolean.
A Boolean to define whether to configure Postfix as a mail transfer agent. This option is mutually exclusive with the satellite Boolean and relayhost String.
Default: False.

##### `mydestination`
Expand All @@ -155,7 +178,7 @@ Default: The FQDN of the host.
Example: 'example.com'

##### `relayhost`
A string to define the relayhost parameter (postconf(5)).
A string to define the relayhost parameter (postconf(5)). This setting is mutually exclusive with the mta Boolean.
Default: Undefined.
Example: 'smtp.example.com'.

Expand All @@ -170,11 +193,11 @@ Default: Undefined.
Example: true

##### `satellite`
A Boolean to define whether to configure postfix as a satellite relay host. This setting is mutually exclusive with the mta Boolean.
A Boolean to define whether to configure postfix as a satellite relay host. This setting is mutually exclusive with the mta Boolean.
Default: False.

##### `smtp_listen`
A string to define the IP on which to listen in master.cf. This can also be set to 'all' to listen on all interfaces. If master_smtp is defined smtp_listen will not be used.
A string or an array of strings to define the IPs on which to listen in master.cf. This can also be set to 'all' to listen on all interfaces. If master_smtp is defined smtp_listen will not be used.
Default: '127.0.0.1'.
Example: '::1'.

Expand Down
Loading