Skip to content

Commit

Permalink
Documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
wwkimball committed Aug 19, 2017
1 parent b528693 commit 55a0387
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 66 deletions.
6 changes: 6 additions & 0 deletions .inch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
files:
# define files included in the analysis (defaults to ["{app,lib}/**/*.rb"])
included:
- manifests/**/*.pp
- templates/**/*.erb
- lib/**/*.rb
21 changes: 13 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,16 @@ branches:
notifications:
email: false
deploy:
provider: puppetforge
user: wwkimball
password:
secure: "b+BnUaKYfP6TRHmQWfd63ROr4wxlRzQyzGfJt82PauYqGsYDRAfXpyfnhhuTRj5BqTuDT8PmRCTQKNnkrGJ4DAj0VPLtjuEcXuatjTQ1juSV24l3uPSG0l5WWUE3XQJB4R8FmbWUi/RVAXGQeqHmXIkohx8p5xXs16RgwxZB2e2ShdPbGDJwDuTePdkwNni5aBznhk/o0R4lu8+ezpgaHafD4brg0bSZ8obhZJfqTODQHD5lx2t0NM6hiigolSj5d/f0gN3ldzVFRiz7QO+H6o5GC+coDQib61u8vqi7Rs2ch3D8nrr64wKwG6zVvhjN/fAZdxAFVTwFAHcfB5s5s/hX16FvkhIMijK1ZPvjMO3keT/TlIYOn6G8cHDZMA7OAe7dgWuPXtm0vIm1ayHfjW8lSIftBrTJN+NGSIlTmDBLnHfuxh9IWgnx77rIzFi4ZvHqjptR5f9D/Jt/DkhKDiVtYIX1VoSEJj+UIHov0g04UVfctHPIhvDyyHQtRvaTu8BqevmkyAdelNxrtQSeue7LVFrMH8dqwFG5k5QIjL0ShvmQDz8rOvnlESpfsshN2SVYgkdhg8HCA3F4G/j35uUZkKQpynDYg9tQIn+Y2xX4awtiPX9xOC72fdLeeP9HRpPFAJwUorI5W7z6RB9mVNeNnpTEOCIbZyo1k71VnRM="
on:
tags: true
all_branches: true
condition: "$DEPLOY_TO_FORGE = yes"
- provider: puppetforge
user: wwkimball
password:
secure: "b+BnUaKYfP6TRHmQWfd63ROr4wxlRzQyzGfJt82PauYqGsYDRAfXpyfnhhuTRj5BqTuDT8PmRCTQKNnkrGJ4DAj0VPLtjuEcXuatjTQ1juSV24l3uPSG0l5WWUE3XQJB4R8FmbWUi/RVAXGQeqHmXIkohx8p5xXs16RgwxZB2e2ShdPbGDJwDuTePdkwNni5aBznhk/o0R4lu8+ezpgaHafD4brg0bSZ8obhZJfqTODQHD5lx2t0NM6hiigolSj5d/f0gN3ldzVFRiz7QO+H6o5GC+coDQib61u8vqi7Rs2ch3D8nrr64wKwG6zVvhjN/fAZdxAFVTwFAHcfB5s5s/hX16FvkhIMijK1ZPvjMO3keT/TlIYOn6G8cHDZMA7OAe7dgWuPXtm0vIm1ayHfjW8lSIftBrTJN+NGSIlTmDBLnHfuxh9IWgnx77rIzFi4ZvHqjptR5f9D/Jt/DkhKDiVtYIX1VoSEJj+UIHov0g04UVfctHPIhvDyyHQtRvaTu8BqevmkyAdelNxrtQSeue7LVFrMH8dqwFG5k5QIjL0ShvmQDz8rOvnlESpfsshN2SVYgkdhg8HCA3F4G/j35uUZkKQpynDYg9tQIn+Y2xX4awtiPX9xOC72fdLeeP9HRpPFAJwUorI5W7z6RB9mVNeNnpTEOCIbZyo1k71VnRM="
on:
tags: true
all_branches: true
condition: "$DEPLOY_TO_FORGE = yes"
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
on:
branch: master
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Contributing to wwkimball-postfix
# Contributing to wwkimball-dovecot

Contributors are welcome! The rules for contributing to this project are really quite simple:

1. Put forth your best effort. Your name will be attached to your changes, so do your very best.
2. Be "data-centric". Devise how to use your new feature purely in YAML, then add the code that makes it happen.
3. Branch or fork, then use a Pull Request to have your changes reviewed. Be sure to only open Pull Requests for completed work; no partial efforts.
4. Backward-compatibility adds too much cruft while Puppet major version support is too short-lived to bother. Write for the current version of Puppet, whatever that is when you start adding code.
5. Try to add Unit and Acceptance tests where appropriate, but I won't rule out worthwhile contributions that omit such testing. The reality is that awesome features can be added with as little as 10 minutes of effort but take well over an hour to vette out that feature with additional, comprehensive, automated tests. That's a barrier to entry and a big workflow delay. It's okay to come back to add tests, later, or even to ask someone else to add them, especially if you aren't already fluent in rspec-puppet and Beaker.
5. Try to add Unit and Acceptance tests where appropriate, but I won't rule out worthwhile contributions that omit such testing. The reality is that awesome features can be added with as little as 10 minutes of effort but take well over an hour to vette out that feature with additional, comprehensive, automated tests, especially with rspec-puppet and Beaker (I'm sorry, but they _are_ hard to learn and a serious pain to set up the first few times). That's a barrier to entry and a big workflow delay. It's okay to come back to add tests later, or even to ask someone else to add them, especially if you aren't already fluent in rspec-puppet and Beaker.

Not every Pull Request will be accepted. I'm ultimately responsible for the performance and quality of this code, so I will reject changes that don't meet my standards for either, which I reserve.
Not every Pull Request will be accepted. I'm ultimately responsible for the performance and quality of this code, so I will reject changes that don't meet my standards for either, which I reserve. I will offer feedback via the Pull Request whenever I cannot simply accept the contributions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# postfix

[![Build Status](https://travis-ci.org/wwkimball/wwkimball-postfix.svg?branch=master)](https://travis-ci.org/wwkimball/wwkimball-postfix) [![Documentation Coverage](https://inch-ci.org/github/wwkimball/wwkimball-postfix.svg?branch=master)](https://inch-ci.org/github/wwkimball/wwkimball-postfix) [![Version](https://img.shields.io/puppetforge/v/wwkimball/postfix.svg)](https://forge.puppet.com/wwkimball/postfix)

### Foreword

The author of this module has long promoted a line of thinking that builds off of **Infrastructure As Code** into **Infrastructure As Data**. With Hiera and modules like this, you can express your entire enterprise infrastructure purely as data without any more code for you to write or manage (not even antiquated roles/profiles). As such, all examples in this document and the module's in-file documentation are presented strictly as YAML.
Expand Down Expand Up @@ -58,12 +60,12 @@ Many usage examples are provided via the source code documentation. Refer to th

## Reference

This module is extensively documented via [Puppet Strings](https://github.com/puppetlabs/puppet-strings). Install support for and run the `puppet strings` command to access the navigable documentation.
This module is extensively documented via [Puppet Strings](https://github.com/puppetlabs/puppet-strings). Pre-generated, web-accessible reference documentation can be found at [GitHub Pages for this project](https://wwkimball.github.io/wwkimball-postfix/docs/puppet_classes/postfix.html).

## Limitations

Please refer to the *operatingsystem_support* section of [metadata.json](metadata.json) for OS compatibility. This is not an exhaustive list. You will very likely find that this module runs just fine on other operating system and version combinations, given the proper inputs.

## Development

This module was written so generically that there really shouldn't be any need to change any of the Puppet code. However, there is abundant opportunity to add more default Hiera data for operating systems that I simply don't bother with. Should you find yourself interested in adding support for your favorite operating system -- and the existing defaults specifically do not cover it -- please feel free to open a Pull Request that adds the missing data.
Please refer to [CONTRIBUTING](CONTRIBUTING.md) to learn how to hack this module.
26 changes: 10 additions & 16 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
class postfix::config {
if 'purged' == $postfix::package_ensure {
file { $postfix::config_file_path:
ensure => absent,
force => true,
ensure => absent,
force => true,
}
} else {
$knockout_prefix = $postfix::config_hash_key_knockout_prefix
Expand Down Expand Up @@ -116,26 +116,20 @@

# Manage all auxilliary configuration files
pick($postfix::config_files, {}).each | String $file, Hash $config, | {
file {
default:
ensure => file,
* => $postfix::config_file_attributes,;

"${postfix::config_file_path}/${file}":
content => template("${module_name}/config-file.erb"),;
file { "${postfix::config_file_path}/${file}":
ensure => file,
content => template("${module_name}/config-file.erb"),
* => $postfix::config_file_attributes,
}
}
pick($postfix::check_files, {}).each |
String $file,
Array[String] $rules,
| {
file {
default:
ensure => file,
* => $postfix::config_file_attributes,;

"${postfix::config_file_path}/${file}":
content => template("${module_name}/check-file.erb"),;
file { "${postfix::config_file_path}/${file}":
ensure => file,
content => template("${module_name}/check-file.erb"),
* => $postfix::config_file_attributes,
}
}
}
Expand Down
52 changes: 22 additions & 30 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
#
# @param check_files Set of configuration files that serve as local lookup
# tables for postfix *_check rules (e.g.: header_checks, body_checks, and
# such). The structure of this Hash is as follows:
# ```<br>
# FILENAME:<br>
# - CHECK_RULE<br>
# - ...<br>
# ...<br>
# ```
# such). The structure of this Hash is as follows:<br>
# &nbsp; FILENAME:<br>
# &nbsp;&nbsp;&nbsp; - CHECK_RULE<br>
# &nbsp;&nbsp;&nbsp; - ...<br>
# &nbsp; ...<br>
# Default is found in the data directory of this module's source and is applied
# per this module's hiera.yaml.
# @param config_file_attributes Set of attributes to apply to all configuration
Expand All @@ -34,38 +32,32 @@
# main.cf (controlled via global_parameters), this is a set of additional
# configuration files for Postfix. Such files are typically lookup
# configurations for external services like MySQL, PostgreSQL, and such. This
# Hash has structure:
# ```<br>
# FILENAME:<br>
# KEY: VALUE<br>
# ...<br>
# ...<br>
# ```
# Hash has structure:<br>
# &nbsp; FILENAME:<br>
# &nbsp;&nbsp;&nbsp; KEY: VALUE<br>
# &nbsp;&nbsp;&nbsp; ...<br>
# &nbsp; ...<br>
# Default is found in the data directory of this module's source and is applied
# per this module's hiera.yaml.
# @param config_hash_key_knockout_prefix String of characters which, when
# present as a prefix to any supporting Hash key, will cause that entire key
# and its value to be removed from the resulting rendered configuration file.
# Default is found in the data directory of this module's source and is applied
# per this module's hiera.yaml.
# @param global_parameters Full content of main.cf as a Hash with structure:
# ```<br>
# KEY: VALUE<br>
# ...<br>
# ```
# @param global_parameters Full content of main.cf as a Hash with structure:<br>
# &nbsp; KEY: VALUE<br>
# &nbsp; ...<br>
# Default is found in the data directory of this module's source and is applied
# per this module's hiera.yaml.
# @param master_processes Full content of master.cf as a Hash with structure:
# ```<br>
# service-name/service-type:<br>
# command: command name and its arguments<br>
# private: OPTIONAL, y or n<br>
# unpriv: OPTIONAL, y or n<br>
# chroot: OPTIONAL, y or n<br>
# wakeup: OPTIONAL, any positive number; may end with ?<br>
# maxproc: OPTIONAL, any positive number<br>
# ...<br>
# ```
# @param master_processes Full content of master.cf as a Hash with structure:<br>
# &nbsp; service-name/service-type:<br>
# &nbsp;&nbsp;&nbsp; command: command name and its arguments<br>
# &nbsp;&nbsp;&nbsp; private: OPTIONAL, y or n<br>
# &nbsp;&nbsp;&nbsp; unpriv: OPTIONAL, y or n<br>
# &nbsp;&nbsp;&nbsp; chroot: OPTIONAL, y or n<br>
# &nbsp;&nbsp;&nbsp; wakeup: OPTIONAL, any positive number; may end with ?<br>
# &nbsp;&nbsp;&nbsp; maxproc: OPTIONAL, any positive number<br>
# &nbsp; ...<br>
# Default is found in the data directory of this module's source and is applied
# per this module's hiera.yaml.
# @param package_ensure Precise version number of the postfix package to install
Expand Down
15 changes: 8 additions & 7 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
{
"author": "William Kimball",
"name": "wkimball-postfix",
"version": "0.1.0",
"summary": "Fully manages postfix",
"license": "APLv2",
"project_page": "https://bitbucket.org/kimballstuff/wkimball-postfix/",
"source": "ssh://[email protected]:kimballstuff/wkimball-postfix.git",
"issues_url": "ssh://[email protected]:kimballstuff/wkimball-postfix/issues",
"dependencies": [
{ "name": "puppetlabs/stdlib", "version_requirement": "4.x" }
],
"license": "APLv2",
"name": "wkimball-postfix",
"operatingsystem_support": [
{
"operatingsystem": "RedHat",
Expand All @@ -15,12 +20,8 @@
"operatingsystemrelease": ["6", "7"]
}
],
"project_page": "https://bitbucket.org/kimballstuff/wkimball-postfix/",
"requirements": [
{ "name": "puppet", "version_requirement": ">=5.0.0" }
],
"source": "ssh://[email protected]:kimballstuff/wkimball-postfix.git",
"summary": "Fully manages postfix",
"tags": [],
"version": "0.1.0"
"tags": [ "postfix", "hiera" ]
}

0 comments on commit 55a0387

Please sign in to comment.