Merge pull request #167 from sous-chefs/sous-chefs-adoption
Sous Chefs Adoption
This commit is contained in:
commit
c9542d9895
17
.github/workflows/branchcleanup.yml
vendored
17
.github/workflows/branchcleanup.yml
vendored
@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
name: Branch Cleanup
|
|
||||||
# This workflow is triggered on all closed pull requests.
|
|
||||||
# However the script does not do anything if a merge was not performed.
|
|
||||||
"on":
|
|
||||||
pull_request:
|
|
||||||
types: [closed]
|
|
||||||
|
|
||||||
env:
|
|
||||||
NO_BRANCH_DELETED_EXIT_CODE: 0
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: jessfraz/branch-cleanup-action@master
|
|
89
.github/workflows/ci.yml
vendored
Normal file
89
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
---
|
||||||
|
name: ci
|
||||||
|
|
||||||
|
"on":
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
delivery:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@master
|
||||||
|
- name: Run Chef Delivery
|
||||||
|
uses: actionshub/chef-delivery@master
|
||||||
|
env:
|
||||||
|
CHEF_LICENSE: accept-no-persist
|
||||||
|
|
||||||
|
yamllint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@master
|
||||||
|
- name: Run yaml Lint
|
||||||
|
uses: actionshub/yamllint@master
|
||||||
|
|
||||||
|
mdl:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@master
|
||||||
|
- name: Run Markdown Lint
|
||||||
|
uses: actionshub/markdownlint@master
|
||||||
|
|
||||||
|
dokken:
|
||||||
|
needs: [mdl, yamllint, delivery]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- 'amazonlinux-2'
|
||||||
|
- 'debian-9'
|
||||||
|
- 'debian-10'
|
||||||
|
- 'centos-7'
|
||||||
|
- 'centos-8'
|
||||||
|
- 'fedora-latest'
|
||||||
|
- 'ubuntu-1604'
|
||||||
|
- 'ubuntu-1804'
|
||||||
|
- 'ubuntu-2004'
|
||||||
|
- 'opensuse-leap-15'
|
||||||
|
suite:
|
||||||
|
- 'default'
|
||||||
|
- 'aliases'
|
||||||
|
- 'client'
|
||||||
|
- 'server'
|
||||||
|
- 'canonical'
|
||||||
|
- 'sasl-auth-none'
|
||||||
|
- 'sasl-auth-multiple'
|
||||||
|
- 'sasl-auth-one'
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@master
|
||||||
|
- name: Install Chef
|
||||||
|
uses: actionshub/chef-install@master
|
||||||
|
- name: Dokken
|
||||||
|
uses: actionshub/kitchen-dokken@master
|
||||||
|
env:
|
||||||
|
CHEF_LICENSE: accept-no-persist
|
||||||
|
KITCHEN_LOCAL_YAML: kitchen.dokken.yml
|
||||||
|
with:
|
||||||
|
suite: ${{ matrix.suite }}
|
||||||
|
os: ${{ matrix.os }}
|
||||||
|
- name: Print debug output on failure
|
||||||
|
if: failure()
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
sudo journalctl -l --since today
|
||||||
|
KITCHEN_LOCAL_YAML=kitchen.dokken.yml /usr/bin/kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "journalctl -l"
|
||||||
|
|
||||||
|
final:
|
||||||
|
needs: [dokken]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@master
|
16
.github/workflows/delivery.yml
vendored
16
.github/workflows/delivery.yml
vendored
@ -1,16 +0,0 @@
|
|||||||
name: delivery
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
delivery:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@master
|
|
||||||
- name: Run Chef Delivery
|
|
||||||
uses: actionshub/chef-delivery@master
|
|
||||||
env:
|
|
||||||
CHEF_LICENSE: accept-no-persist
|
|
39
.travis.yml
39
.travis.yml
@ -1,39 +0,0 @@
|
|||||||
addons:
|
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
- chef-current-xenial
|
|
||||||
packages:
|
|
||||||
- chef-workstation
|
|
||||||
|
|
||||||
install: echo "skip bundle install"
|
|
||||||
|
|
||||||
env:
|
|
||||||
- CHEF_LICENSE=accept
|
|
||||||
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
|
||||||
services: docker
|
|
||||||
|
|
||||||
env:
|
|
||||||
matrix:
|
|
||||||
- INSTANCE=default-centos-6
|
|
||||||
- INSTANCE=default-centos-7
|
|
||||||
- INSTANCE=default-debian-9
|
|
||||||
- INSTANCE=default-debian-10
|
|
||||||
- INSTANCE=default-ubuntu-1604
|
|
||||||
- INSTANCE=default-ubuntu-1804
|
|
||||||
- INSTANCE=canonical-centos-6
|
|
||||||
- INSTANCE=canonical-centos-7
|
|
||||||
- INSTANCE=canonical-debian-9
|
|
||||||
- INSTANCE=canonical-debian-10
|
|
||||||
- INSTANCE=canonical-ubuntu-1604
|
|
||||||
- INSTANCE=canonical-ubuntu-1804
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
|
|
||||||
- eval "$(chef shell-init bash)"
|
|
||||||
- chef --version
|
|
||||||
|
|
||||||
script: KITCHEN_LOCAL_YAML=kitchen.dokken.yml kitchen verify ${INSTANCE}
|
|
31
CHANGELOG.md
31
CHANGELOG.md
@ -2,6 +2,37 @@
|
|||||||
|
|
||||||
This file is used to list changes made in each version of the postfix cookbook.
|
This file is used to list changes made in each version of the postfix cookbook.
|
||||||
|
|
||||||
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Sous Chefs Adoption
|
||||||
|
- Update to use Sous Chefs GH workflow
|
||||||
|
- Update README to sous-chefs
|
||||||
|
- Update metadata.rb to Sous Chefs
|
||||||
|
- Update test-kitchen to Sous Chefs
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Standardise files with files in sous-chefs/repo-management
|
||||||
|
- Add Ubuntu 20.04 testing
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Cookstyle fixes
|
||||||
|
- ChefSpec fixes
|
||||||
|
- Yamllint fixes
|
||||||
|
- MDL fixes
|
||||||
|
- Fix OpenSUSE installation issues
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
|
||||||
|
- Remove EL 6 testing
|
||||||
|
- Remove Amazon Linux 1 testing
|
||||||
|
|
||||||
## 5.3.1 (2018-07-24)
|
## 5.3.1 (2018-07-24)
|
||||||
|
|
||||||
- Fixed sbin issue with Chef13
|
- Fixed sbin issue with Chef13
|
||||||
|
42
README.md
42
README.md
@ -1,11 +1,19 @@
|
|||||||
# postfix Cookbook
|
# postfix Cookbook
|
||||||
|
|
||||||
[](https://travis-ci.org/chef-cookbooks/postfix) [](https://supermarket.chef.io/cookbooks/postfix)
|
[](https://supermarket.chef.io/cookbooks/postfix)
|
||||||
|
[](https://github.com/sous-chefs/postfix/actions?query=workflow%3Aci)
|
||||||
|
[](#backers)
|
||||||
|
[](#sponsors)
|
||||||
|
[](https://opensource.org/licenses/Apache-2.0)
|
||||||
|
|
||||||
Installs and configures postfix for client or outbound relayhost, or to do SASL authentication.
|
Installs and configures postfix for client or outbound relayhost, or to do SASL authentication.
|
||||||
|
|
||||||
On RHEL-family systems, sendmail will be replaced with postfix.
|
On RHEL-family systems, sendmail will be replaced with postfix.
|
||||||
|
|
||||||
|
## Maintainers
|
||||||
|
|
||||||
|
This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit [sous-chefs.org](https://sous-chefs.org/) or come chat with us on the Chef Community Slack in [#sous-chefs](https://chefcommunity.slack.com/messages/C2V7B88SF).
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
### Platforms
|
### Platforms
|
||||||
@ -443,25 +451,27 @@ override_attributes(
|
|||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Maintainers
|
## Contributors
|
||||||
|
|
||||||
This cookbook is maintained by Chef's Community Cookbook Engineering team. Our goal is to improve cookbook quality and to aid the community in contributing to cookbooks. To learn more about our team, process, and design goals see our [team documentation](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/COOKBOOK_TEAM.MD). To learn more about contributing to cookbooks like this see our [contributing documentation](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD), or if you have general questions about this cookbook come chat with us in #cookbok-engineering on the [Chef Community Slack](http://community-slack.chef.io/)
|
This project exists thanks to all the people who [contribute.](https://opencollective.com/sous-chefs/contributors.svg?width=890&button=false)
|
||||||
|
|
||||||
## License
|
### Backers
|
||||||
|
|
||||||
|
Thank you to all our backers!
|
||||||
|
|
||||||
**Copyright:** 2009-2017, Chef Software, Inc.
|

|
||||||
|
|
||||||
```
|
### Sponsors
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|

|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|

|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|

|
||||||
See the License for the specific language governing permissions and
|

|
||||||
limitations under the License.
|

|
||||||
```
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
@ -105,6 +105,9 @@ when 'rhel'
|
|||||||
default['postfix']['cafile'] = '/etc/pki/tls/cert.pem'
|
default['postfix']['cafile'] = '/etc/pki/tls/cert.pem'
|
||||||
when 'amazon'
|
when 'amazon'
|
||||||
default['postfix']['cafile'] = '/etc/pki/tls/cert.pem'
|
default['postfix']['cafile'] = '/etc/pki/tls/cert.pem'
|
||||||
|
when 'suse'
|
||||||
|
default['postfix']['main']['setgid_group'] = 'maildrop'
|
||||||
|
default['postfix']['main']['daemon_directory'] = '/usr/lib/postfix/bin'
|
||||||
else
|
else
|
||||||
default['postfix']['cafile'] = "#{node['postfix']['conf_dir']}/cacert.pem"
|
default['postfix']['cafile'] = "#{node['postfix']['conf_dir']}/cacert.pem"
|
||||||
end
|
end
|
||||||
|
@ -1,79 +1,73 @@
|
|||||||
|
---
|
||||||
driver:
|
driver:
|
||||||
name: dokken
|
name: dokken
|
||||||
privileged: true # because Docker and SystemD/Upstart
|
privileged: true # because Docker and SystemD
|
||||||
chef_version: <%= ENV['CHEF_VERSION'] || 'current' %>
|
chef_version: <%= ENV['CHEF_VERSION'] || 'current' %>
|
||||||
chef_license: accept-no-persist
|
env: [CHEF_LICENSE=accept]
|
||||||
|
|
||||||
transport:
|
transport:
|
||||||
name: dokken
|
name: dokken
|
||||||
|
|
||||||
provisioner:
|
provisioner:
|
||||||
name: dokken
|
name: dokken
|
||||||
deprecations_as_errors: true
|
|
||||||
|
|
||||||
verifier:
|
|
||||||
name: inspec
|
|
||||||
|
|
||||||
platforms:
|
platforms:
|
||||||
- name: amazonlinux
|
- name: amazonlinux-2
|
||||||
driver:
|
|
||||||
image: dokken/amazonlinux
|
|
||||||
pid_one_command: /sbin/init
|
|
||||||
|
|
||||||
- name: amazonlinux-2
|
|
||||||
driver:
|
driver:
|
||||||
image: dokken/amazonlinux-2
|
image: dokken/amazonlinux-2
|
||||||
pid_one_command: /usr/lib/systemd/systemd
|
pid_one_command: /usr/lib/systemd/systemd
|
||||||
|
|
||||||
- name: debian-9
|
- name: debian-9
|
||||||
driver:
|
driver:
|
||||||
image: dokken/debian-9
|
image: dokken/debian-9
|
||||||
pid_one_command: /bin/systemd
|
pid_one_command: /bin/systemd
|
||||||
intermediate_instructions:
|
intermediate_instructions:
|
||||||
- RUN /usr/bin/apt-get update
|
- RUN /usr/bin/apt-get update
|
||||||
|
|
||||||
- name: debian-10
|
- name: debian-10
|
||||||
driver:
|
driver:
|
||||||
image: dokken/debian-10
|
image: dokken/debian-10
|
||||||
pid_one_command: /bin/systemd
|
pid_one_command: /bin/systemd
|
||||||
intermediate_instructions:
|
intermediate_instructions:
|
||||||
- RUN /usr/bin/apt-get update
|
- RUN /usr/bin/apt-get update
|
||||||
|
|
||||||
- name: centos-6
|
- name: centos-7
|
||||||
driver:
|
|
||||||
image: dokken/centos-6
|
|
||||||
pid_one_command: /sbin/init
|
|
||||||
|
|
||||||
- name: centos-7
|
|
||||||
driver:
|
driver:
|
||||||
image: dokken/centos-7
|
image: dokken/centos-7
|
||||||
pid_one_command: /usr/lib/systemd/systemd
|
pid_one_command: /usr/lib/systemd/systemd
|
||||||
|
|
||||||
- name: centos-8
|
- name: centos-8
|
||||||
driver:
|
driver:
|
||||||
image: dokken/centos-8
|
image: dokken/centos-8
|
||||||
pid_one_command: /usr/lib/systemd/systemd
|
pid_one_command: /usr/lib/systemd/systemd
|
||||||
|
|
||||||
- name: fedora-latest
|
- name: fedora-latest
|
||||||
driver:
|
driver:
|
||||||
image: dokken/fedora-latest
|
image: dokken/fedora-latest
|
||||||
pid_one_command: /usr/lib/systemd/systemd
|
pid_one_command: /usr/lib/systemd/systemd
|
||||||
|
|
||||||
- name: ubuntu-16.04
|
- name: ubuntu-16.04
|
||||||
driver:
|
driver:
|
||||||
image: dokken/ubuntu-16.04
|
image: dokken/ubuntu-16.04
|
||||||
pid_one_command: /bin/systemd
|
pid_one_command: /bin/systemd
|
||||||
intermediate_instructions:
|
intermediate_instructions:
|
||||||
- RUN /usr/bin/apt-get update
|
- RUN /usr/bin/apt-get update
|
||||||
|
|
||||||
- name: ubuntu-18.04
|
- name: ubuntu-18.04
|
||||||
driver:
|
driver:
|
||||||
image: dokken/ubuntu-18.04
|
image: dokken/ubuntu-18.04
|
||||||
pid_one_command: /bin/systemd
|
pid_one_command: /bin/systemd
|
||||||
intermediate_instructions:
|
intermediate_instructions:
|
||||||
- RUN /usr/bin/apt-get update
|
- RUN /usr/bin/apt-get update
|
||||||
|
|
||||||
- name: opensuse-leap-15
|
- name: ubuntu-20.04
|
||||||
|
driver:
|
||||||
|
image: dokken/ubuntu-20.04
|
||||||
|
pid_one_command: /bin/systemd
|
||||||
|
intermediate_instructions:
|
||||||
|
- RUN /usr/bin/apt-get update
|
||||||
|
|
||||||
|
- name: opensuse-leap-15
|
||||||
driver:
|
driver:
|
||||||
image: dokken/opensuse-leap-15
|
image: dokken/opensuse-leap-15
|
||||||
pid_one_command: /bin/systemd
|
pid_one_command: /bin/systemd
|
||||||
|
30
kitchen.yml
30
kitchen.yml
@ -1,51 +1,47 @@
|
|||||||
|
---
|
||||||
driver:
|
driver:
|
||||||
name: vagrant
|
name: vagrant
|
||||||
|
|
||||||
provisioner:
|
provisioner:
|
||||||
name: chef_zero
|
name: chef_zero
|
||||||
|
product_name: chef
|
||||||
|
enforce_idempotency: true
|
||||||
|
multiple_converge: 2
|
||||||
deprecations_as_errors: true
|
deprecations_as_errors: true
|
||||||
chef_license: accept-no-persist
|
|
||||||
|
|
||||||
verifier:
|
verifier:
|
||||||
name: inspec
|
name: inspec
|
||||||
|
|
||||||
platforms:
|
platforms:
|
||||||
- name: amazonlinux
|
|
||||||
driver_config:
|
|
||||||
box: mvbcoding/awslinux
|
|
||||||
- name: amazonlinux-2
|
- name: amazonlinux-2
|
||||||
- name: centos-6
|
|
||||||
- name: centos-7
|
- name: centos-7
|
||||||
- name: centos-8
|
- name: centos-8
|
||||||
- name: debian-9
|
- name: debian-9
|
||||||
run_list: apt::default
|
|
||||||
- name: debian-10
|
- name: debian-10
|
||||||
run_list: apt::default
|
|
||||||
- name: fedora-latest
|
- name: fedora-latest
|
||||||
- name: opensuse-leap-15
|
- name: opensuse-leap-15
|
||||||
- name: ubuntu-16.04
|
- name: ubuntu-16.04
|
||||||
run_list: apt::default
|
|
||||||
- name: ubuntu-18.04
|
- name: ubuntu-18.04
|
||||||
run_list: apt::default
|
- name: ubuntu-20.04
|
||||||
|
|
||||||
suites:
|
suites:
|
||||||
- name: default
|
- name: default
|
||||||
run_list:
|
run_list:
|
||||||
- recipe[postfix]
|
- recipe[postfix]
|
||||||
|
|
||||||
- name: aliases
|
- name: aliases
|
||||||
run_list:
|
run_list:
|
||||||
- recipe[postfix::aliases]
|
- recipe[postfix::aliases]
|
||||||
|
|
||||||
- name: client
|
- name: client
|
||||||
run_list:
|
run_list:
|
||||||
- recipe[postfix::client]
|
- recipe[postfix::client]
|
||||||
|
|
||||||
- name: server
|
- name: server
|
||||||
run_list:
|
run_list:
|
||||||
- recipe[postfix::server]
|
- recipe[postfix::server]
|
||||||
|
|
||||||
- name: canonical
|
- name: canonical
|
||||||
run_list:
|
run_list:
|
||||||
- recipe[postfix]
|
- recipe[postfix]
|
||||||
attributes:
|
attributes:
|
||||||
@ -53,7 +49,7 @@ suites:
|
|||||||
recipient_canonical_map_entries:
|
recipient_canonical_map_entries:
|
||||||
john: john@doe.com
|
john: john@doe.com
|
||||||
|
|
||||||
- name: sasl_auth_none
|
- name: sasl_auth_none
|
||||||
run_list:
|
run_list:
|
||||||
- recipe[postfix::sasl_auth]
|
- recipe[postfix::sasl_auth]
|
||||||
attributes:
|
attributes:
|
||||||
@ -62,7 +58,7 @@ suites:
|
|||||||
relayhost: "localhost"
|
relayhost: "localhost"
|
||||||
smtp_sasl_auth_enable: "yes"
|
smtp_sasl_auth_enable: "yes"
|
||||||
|
|
||||||
- name: sasl_auth_multiple
|
- name: sasl_auth_multiple
|
||||||
run_list:
|
run_list:
|
||||||
- recipe[postfix::sasl_auth]
|
- recipe[postfix::sasl_auth]
|
||||||
attributes:
|
attributes:
|
||||||
@ -78,7 +74,7 @@ suites:
|
|||||||
username: "anotherkitchenuser"
|
username: "anotherkitchenuser"
|
||||||
password: "yet-not-a-real-thing"
|
password: "yet-not-a-real-thing"
|
||||||
|
|
||||||
- name: sasl_auth_one
|
- name: sasl_auth_one
|
||||||
run_list:
|
run_list:
|
||||||
- recipe[postfix::sasl_auth]
|
- recipe[postfix::sasl_auth]
|
||||||
attributes:
|
attributes:
|
||||||
|
24
metadata.rb
24
metadata.rb
@ -1,14 +1,20 @@
|
|||||||
name 'postfix'
|
name 'postfix'
|
||||||
maintainer 'Chef Software, Inc.'
|
maintainer 'Sous Chefs'
|
||||||
maintainer_email 'cookbooks@chef.io'
|
maintainer_email 'help@sous-chefs.org'
|
||||||
license 'Apache-2.0'
|
license 'Apache-2.0'
|
||||||
description 'Installs and configures postfix for client or outbound relayhost, or to do SASL auth'
|
description 'Installs and configures postfix for client or outbound relayhost, or to do SASL auth'
|
||||||
version '5.3.1'
|
version '5.3.1'
|
||||||
|
source_url 'https://github.com/sous-chefs/postfix'
|
||||||
%w(ubuntu debian redhat centos amazon oracle scientific smartos fedora freebsd).each do |os|
|
issues_url 'https://github.com/sous-chefs/postfix/issues'
|
||||||
supports os
|
|
||||||
end
|
|
||||||
|
|
||||||
source_url 'https://github.com/chef-cookbooks/postfix'
|
|
||||||
issues_url 'https://github.com/chef-cookbooks/postfix/issues'
|
|
||||||
chef_version '>= 12.15'
|
chef_version '>= 12.15'
|
||||||
|
|
||||||
|
supports 'amazon'
|
||||||
|
supports 'centos'
|
||||||
|
supports 'debian'
|
||||||
|
supports 'fedora'
|
||||||
|
supports 'freebsd'
|
||||||
|
supports 'oracle'
|
||||||
|
supports 'redhat'
|
||||||
|
supports 'scientific'
|
||||||
|
supports 'smartos'
|
||||||
|
supports 'ubuntu'
|
||||||
|
@ -42,6 +42,8 @@ when 'rhel', 'fedora', 'amazon'
|
|||||||
notifies :start, 'service[postfix]'
|
notifies :start, 'service[postfix]'
|
||||||
not_if '/usr/bin/test /etc/alternatives/mta -ef /usr/sbin/sendmail.postfix'
|
not_if '/usr/bin/test /etc/alternatives/mta -ef /usr/sbin/sendmail.postfix'
|
||||||
end
|
end
|
||||||
|
when 'suse'
|
||||||
|
file '/var/adm/postfix.configured'
|
||||||
when 'omnios'
|
when 'omnios'
|
||||||
manifest_path = ::File.join(Chef::Config[:file_cache_path], 'manifest-postfix.xml')
|
manifest_path = ::File.join(Chef::Config[:file_cache_path], 'manifest-postfix.xml')
|
||||||
|
|
||||||
@ -133,7 +135,7 @@ unless node['postfix']['sender_canonical_map_entries'].empty?
|
|||||||
notifies :reload, 'service[postfix]'
|
notifies :reload, 'service[postfix]'
|
||||||
end
|
end
|
||||||
|
|
||||||
node.normal['postfix']['main']['sender_canonical_maps'] = "hash:#{node['postfix']['conf_dir']}/sender_canonical" unless node['postfix']['main'].key?('sender_canonical_maps')
|
node.default['postfix']['main']['sender_canonical_maps'] = "hash:#{node['postfix']['conf_dir']}/sender_canonical" unless node['postfix']['main'].key?('sender_canonical_maps')
|
||||||
end
|
end
|
||||||
|
|
||||||
execute 'update-postfix-smtp_generic' do
|
execute 'update-postfix-smtp_generic' do
|
||||||
@ -150,7 +152,7 @@ unless node['postfix']['smtp_generic_map_entries'].empty?
|
|||||||
notifies :reload, 'service[postfix]'
|
notifies :reload, 'service[postfix]'
|
||||||
end
|
end
|
||||||
|
|
||||||
node.normal['postfix']['main']['smtp_generic_maps'] = "hash:#{node['postfix']['conf_dir']}/smtp_generic" unless node['postfix']['main'].key?('smtp_generic_maps')
|
node.default['postfix']['main']['smtp_generic_maps'] = "hash:#{node['postfix']['conf_dir']}/smtp_generic" unless node['postfix']['main'].key?('smtp_generic_maps')
|
||||||
end
|
end
|
||||||
|
|
||||||
execute 'update-postfix-recipient_canonical' do
|
execute 'update-postfix-recipient_canonical' do
|
||||||
@ -167,7 +169,7 @@ unless node['postfix']['recipient_canonical_map_entries'].empty?
|
|||||||
notifies :reload, 'service[postfix]'
|
notifies :reload, 'service[postfix]'
|
||||||
end
|
end
|
||||||
|
|
||||||
node.normal['postfix']['main']['recipient_canonical_maps'] = "hash:#{node['postfix']['conf_dir']}/recipient_canonical" unless node['postfix']['main'].key?('recipient_canonical_maps')
|
node.default['postfix']['main']['recipient_canonical_maps'] = "hash:#{node['postfix']['conf_dir']}/recipient_canonical" unless node['postfix']['main'].key?('recipient_canonical_maps')
|
||||||
end
|
end
|
||||||
|
|
||||||
%w( main master ).each do |cfg|
|
%w( main master ).each do |cfg|
|
||||||
|
@ -39,6 +39,6 @@ else
|
|||||||
relayhost = results.map { |n| n['ipaddress'] }.first
|
relayhost = results.map { |n| n['ipaddress'] }.first
|
||||||
end
|
end
|
||||||
|
|
||||||
node.normal['postfix']['main']['relayhost'] = "[#{relayhost}]#{relayhost_port}"
|
node.default['postfix']['main']['relayhost'] = "[#{relayhost}]#{relayhost_port}"
|
||||||
|
|
||||||
include_recipe 'postfix'
|
include_recipe 'postfix'
|
||||||
|
@ -28,11 +28,7 @@ case node['platform_family']
|
|||||||
when 'debian'
|
when 'debian'
|
||||||
sasl_pkgs = %w(libsasl2-2 libsasl2-modules ca-certificates)
|
sasl_pkgs = %w(libsasl2-2 libsasl2-modules ca-certificates)
|
||||||
when 'rhel'
|
when 'rhel'
|
||||||
sasl_pkgs = if node['platform_version'].to_i < 6
|
sasl_pkgs = %w(cyrus-sasl cyrus-sasl-plain ca-certificates)
|
||||||
%w(cyrus-sasl cyrus-sasl-plain openssl)
|
|
||||||
else
|
|
||||||
%w(cyrus-sasl cyrus-sasl-plain ca-certificates)
|
|
||||||
end
|
|
||||||
when 'amazon'
|
when 'amazon'
|
||||||
sasl_pkgs = %w(cyrus-sasl cyrus-sasl-plain ca-certificates)
|
sasl_pkgs = %w(cyrus-sasl cyrus-sasl-plain ca-certificates)
|
||||||
when 'fedora'
|
when 'fedora'
|
||||||
|
@ -5,9 +5,9 @@ describe 'postfix::default' do
|
|||||||
stub_command('/usr/bin/test /etc/alternatives/mta -ef /usr/sbin/sendmail.postfix').and_return(true)
|
stub_command('/usr/bin/test /etc/alternatives/mta -ef /usr/sbin/sendmail.postfix').and_return(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'on Centos 6' do
|
context 'on Centos 8' do
|
||||||
cached(:chef_run) do
|
cached(:chef_run) do
|
||||||
ChefSpec::SoloRunner.new(platform: 'centos', version: 6.9).converge(described_recipe)
|
ChefSpec::SoloRunner.new(platform: 'centos', version: '8').converge(described_recipe)
|
||||||
end
|
end
|
||||||
|
|
||||||
it '[COOK-4423] renders file main.cf with /etc/pki/tls/cert.pem' do
|
it '[COOK-4423] renders file main.cf with /etc/pki/tls/cert.pem' do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user