initial boilerplate
authorJosh Farwell <jfarwell@linuxfoundation.org>
Thu, 21 May 2015 23:23:21 +0000 (16:23 -0700)
committerJosh Farwell <jfarwell@linuxfoundation.org>
Thu, 21 May 2015 23:23:21 +0000 (16:23 -0700)
Change-Id: Idfcced7a981bc1542ee2f3de49ae9a8ebc862541
Signed-off-by: Josh Farwell <jfarwell@linuxfoundation.org>
.fixtures.yml [new file with mode: 0644]
.gitignore [new file with mode: 0644]
Gemfile [new file with mode: 0644]
README.md [new file with mode: 0644]
Rakefile [new file with mode: 0644]
manifests/init.pp [new file with mode: 0644]
metadata.json [new file with mode: 0644]
spec/classes/init_spec.rb [new file with mode: 0644]
spec/spec_helper.rb [new file with mode: 0644]
tests/init.pp [new file with mode: 0644]

diff --git a/.fixtures.yml b/.fixtures.yml
new file mode 100644 (file)
index 0000000..0ca2750
--- /dev/null
@@ -0,0 +1,7 @@
+fixtures:
+  # use the forge modules so we can easily pin to a specific version
+  forge_modules:
+    stdlib: "puppetlabs/stdlib"
+
+  symlinks:
+    mailman3: "#{source_dir}"
diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..4ee6d71
--- /dev/null
@@ -0,0 +1,5 @@
+*.swp
+.ruby-version
+.ruby-gemset
+Gemfile.lock
+pkg
diff --git a/Gemfile b/Gemfile
new file mode 100644 (file)
index 0000000..b33108e
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,7 @@
+source 'https://rubygems.org'
+
+puppetversion = ENV.key?('PUPPET_VERSION') ? "#{ENV['PUPPET_VERSION']}" : ['>= 3.3']
+gem 'puppet', puppetversion
+gem 'puppetlabs_spec_helper', '>= 0.8.2'
+gem 'puppet-lint', '>= 1.0.0'
+gem 'facter', '>= 1.7.0'
diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..734d085
--- /dev/null
+++ b/README.md
@@ -0,0 +1,79 @@
+# mailman3
+
+#### Table of Contents
+
+1. [Overview](#overview)
+2. [Module Description - What the module does and why it is useful](#module-description)
+3. [Setup - The basics of getting started with mailman3](#setup)
+    * [What mailman3 affects](#what-mailman3-affects)
+    * [Setup requirements](#setup-requirements)
+    * [Beginning with mailman3](#beginning-with-mailman3)
+4. [Usage - Configuration options and additional functionality](#usage)
+5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
+5. [Limitations - OS compatibility, etc.](#limitations)
+6. [Development - Guide for contributing to the module](#development)
+
+## Overview
+
+A one-maybe-two sentence summary of what the module does/what problem it solves.
+This is your 30 second elevator pitch for your module. Consider including
+OS/Puppet version it works with.
+
+## Module Description
+
+If applicable, this section should have a brief description of the technology
+the module integrates with and what that integration enables. This section
+should answer the questions: "What does this module *do*?" and "Why would I use
+it?"
+
+If your module has a range of functionality (installation, configuration,
+management, etc.) this is the time to mention it.
+
+## Setup
+
+### What mailman3 affects
+
+* A list of files, packages, services, or operations that the module will alter,
+  impact, or execute on the system it's installed on.
+* This is a great place to stick any warnings.
+* Can be in list or paragraph form.
+
+### Setup Requirements **OPTIONAL**
+
+If your module requires anything extra before setting up (pluginsync enabled,
+etc.), mention it here.
+
+### Beginning with mailman3
+
+The very basic steps needed for a user to get the module up and running.
+
+If your most recent release breaks compatibility or requires particular steps
+for upgrading, you may wish to include an additional section here: Upgrading
+(For an example, see http://forge.puppetlabs.com/puppetlabs/firewall).
+
+## Usage
+
+Put the classes, types, and resources for customizing, configuring, and doing
+the fancy stuff with your module here.
+
+## Reference
+
+Here, list the classes, types, providers, facts, etc contained in your module.
+This section should include all of the under-the-hood workings of your module so
+people know what the module is touching on their system but don't need to mess
+with things. (We are working on automating this section!)
+
+## Limitations
+
+This is where you list OS compatibility, version compatibility, etc.
+
+## Development
+
+Since your module is awesome, other users will want to play with it. Let them
+know what the ground rules for contributing are.
+
+## Release Notes/Contributors/Etc **Optional**
+
+If you aren't using changelog, put your release notes here (though you should
+consider using changelog). You may also add any additional sections you feel are
+necessary or important to include here. Please use the `## ` header.
diff --git a/Rakefile b/Rakefile
new file mode 100644 (file)
index 0000000..2e0ac6f
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,19 @@
+require 'puppetlabs_spec_helper/rake_tasks'
+require 'puppet-lint/tasks/puppet-lint'
+PuppetLint.configuration.send('disable_80chars')
+PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
+
+desc "Validate manifests, templates, and ruby files"
+task :validate do
+  Dir['manifests/**/*.pp'].each do |manifest|
+    sh "puppet parser validate --noop #{manifest}"
+  end
+  Dir['spec/**/*.rb','lib/**/*.rb'].each do |ruby_file|
+    sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/
+  end
+  Dir['templates/**/*.erb'].each do |template|
+    sh "erb -P -x -T '-' #{template} | ruby -c"
+  end
+end
+
+task :default => [:validate, :spec, :lint]
diff --git a/manifests/init.pp b/manifests/init.pp
new file mode 100644 (file)
index 0000000..dd0ab0c
--- /dev/null
@@ -0,0 +1,41 @@
+# == Class: mailman3
+#
+# Full description of class mailman3 here.
+#
+# === Parameters
+#
+# Document parameters here.
+#
+# [*sample_parameter*]
+#   Explanation of what this parameter affects and what it defaults to.
+#   e.g. "Specify one or more upstream ntp servers as an array."
+#
+# === Variables
+#
+# Here you should define a list of variables that this module would require.
+#
+# [*sample_variable*]
+#   Explanation of how this variable affects the function of this class and if
+#   it has a default. e.g. "The parameter enc_ntp_servers must be set by the
+#   External Node Classifier as a comma separated list of hostnames." (Note,
+#   global variables should be avoided in favor of class parameters as
+#   of Puppet 2.6.)
+#
+# === Examples
+#
+#  class { 'mailman3':
+#    servers => [ 'pool.ntp.org', 'ntp.local.company.com' ],
+#  }
+#
+# === Authors
+#
+# Author Name <author@domain.com>
+#
+# === Copyright
+#
+# Copyright 2015 Your name here, unless otherwise noted.
+#
+class mailman3 {
+
+
+}
diff --git a/metadata.json b/metadata.json
new file mode 100644 (file)
index 0000000..e769c81
--- /dev/null
@@ -0,0 +1,14 @@
+{
+  "name": "linuxfoundation-mailman3",
+  "version": "0.1.0",
+  "author": "Josh Farwell",
+  "summary": "Module for installing and managing Mailman3 Core, Postorius and Hyperkitty.",
+  "license": "Apache-2.0",
+  "source": "https://gerrit.linuxfoundation.org/infra/puppet/modules/mailman3",
+  "project_page": "TBD",
+  "issues_url": "TBD",
+  "dependencies": [
+    {"name":"puppetlabs-stdlib","version_requirement":">= 1.0.0"}
+  ]
+}
+
diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb
new file mode 100644 (file)
index 0000000..d1a9f5f
--- /dev/null
@@ -0,0 +1,7 @@
+require 'spec_helper'
+describe 'mailman3' do
+
+  context 'with defaults for all parameters' do
+    it { should contain_class('mailman3') }
+  end
+end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
new file mode 100644 (file)
index 0000000..2c6f566
--- /dev/null
@@ -0,0 +1 @@
+require 'puppetlabs_spec_helper/module_spec_helper'
diff --git a/tests/init.pp b/tests/init.pp
new file mode 100644 (file)
index 0000000..3475ac0
--- /dev/null
@@ -0,0 +1,12 @@
+# The baseline for module testing used by Puppet Labs is that each manifest
+# should have a corresponding test manifest that declares that class or defined
+# type.
+#
+# Tests are then run by using puppet apply --noop (to check for compilation
+# errors and view a log of events) or by fully applying the test in a virtual
+# environment (to compare the resulting system state to the desired state).
+#
+# Learn more about module testing here:
+# http://docs.puppetlabs.com/guides/tests_smoke.html
+#
+include mailman3