Permalink
Browse files

adding pkg built with puppet-module

  • Loading branch information...
1 parent cb13233 commit bf61cce98c1d79b37f607afdf3cb99906a1b69bb @ghoneycutt ghoneycutt committed Jun 24, 2010
Binary file not shown.
@@ -0,0 +1,5 @@
+name 'ghoneycutt-xinetd'
+version '1.0.0'
+
+## Add dependencies, if any:
+# dependency 'username/name', '>= 1.2.0'
@@ -0,0 +1,5 @@
+xinetd
+
+This is the xinetd module.
+
+Released 20100624 - Garrett Honeycutt - GPLv2
@@ -0,0 +1,52 @@
+# This file is being maintained by Puppet.
+# DO NOT EDIT
+#
+# This is the master xinetd configuration file. Settings in the
+# default section will be inherited by all service configurations
+# unless explicitly overridden in the service configuration. See
+# xinetd.conf in the man pages for a more detailed explanation of
+# these attributes.
+
+defaults
+{
+# The next two items are intended to be a quick access place to
+# temporarily enable or disable services.
+#
+# enabled =
+# disabled =
+
+# Define general logging characteristics.
+ log_type = SYSLOG daemon info
+ log_on_failure = HOST
+ log_on_success = PID HOST DURATION EXIT
+
+# Define access restriction defaults
+#
+# no_access =
+# only_from =
+# max_load = 0
+ cps = 50 10
+ instances = 50
+ per_source = 10
+
+# Address and networking defaults
+#
+# bind =
+# mdns = yes
+ v6only = no
+
+# setup environmental attributes
+#
+# passenv =
+ groups = yes
+ umask = 002
+
+# Generally, banners are not used. This sets up their global defaults
+#
+# banner =
+# banner_fail =
+# banner_success =
+}
+
+includedir /etc/xinetd.d
+
@@ -0,0 +1,44 @@
+# Class: xinetd
+#
+# This module manages xinetd
+#
+# Sample Usage:
+# xinetd::service {"rsync":
+# port => "873",
+# server => "/usr/bin/rsync",
+# server_args => "--daemon --config /etc/rsync.conf",
+# }
+#
+class xinetd {
+
+ # xinetd::service sets up a xinetd service
+ # $cps, $flags, $per_source, $server_args, and $wait are optional
+ define service ($cps = undef, $flags = undef, $per_source = undef, $port, $server, $server_args = undef, $disable = "no", $socket_type = "stream", $protocol = "tcp", $user = "root", $group = "root", $instances = "UNLIMITED", $wait = undef) {
+ if $wait {
+ $mywait = $wait
+ } else {
+ $mywait = $protocol ? {
+ tcp => "no",
+ udp => "yes"
+ }
+ } # fi $wait
+
+ file { "/etc/xinetd.d/$name":
+ content => template("xinetd/service.erb"),
+ notify => Service["xinetd"],
+ } # file
+ } # define service
+
+ package { "xinetd": }
+
+ file { "/etc/xinetd.conf":
+ source => "puppet:///modules/xinetd/xinetd.conf",
+ } # file
+
+ service { "xinetd":
+ ensure => running,
+ enable => true,
+ require => [ Package["xinetd"], File["/etc/xinetd.conf"] ],
+ restart => "/etc/init.d/xinetd reload",
+ } # service
+} # class xinetd
@@ -0,0 +1,21 @@
+{
+ "version": "1.0.0",
+ "dependencies": [
+
+ ],
+ "name": "ghoneycutt-xinetd",
+ "checksums": {
+ "spec/spec_helper.rb": "ca19ec4f451ebc7fdb035b52eae6e909",
+ "files/xinetd.conf": "fd3a3f449d68e05921246867d4fa8c16",
+ "README": "fab9b9dac59101b09bdfb220639e70d0",
+ "tests/init.pp": "c31f20acadb59d84cc56ebe12a138a03",
+ "templates/service.erb": "f650746d79e827684f3a4fc89a4bca88",
+ "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c",
+ "metadata.json": "d34d0b70aba36510fbc2df4e667479ef",
+ "Modulefile": "dd3943cee106dee950b9b5261348d1e9",
+ "manifests/init.pp": "c711b56ac000bc2f54a92d8adc220ba7"
+ },
+ "types": [
+
+ ]
+}
@@ -0,0 +1,6 @@
+--format
+s
+--colour
+--loadby
+mtime
+--backtrace
@@ -0,0 +1,18 @@
+require 'pathname'
+dir = Pathname.new(__FILE__).parent
+$LOAD_PATH.unshift(dir, dir + 'lib', dir + '../lib')
+
+require 'mocha'
+require 'puppet'
+gem 'rspec', '=1.2.9'
+require 'spec/autorun'
+
+Spec::Runner.configure do |config|
+ config.mock_with :mocha
+end
+
+# We need this because the RAL uses 'should' as a method. This
+# allows us the same behaviour but with a different method name.
+class Object
+ alias :must :should
+end
@@ -0,0 +1,17 @@
+# This file is being maintained by Puppet.
+# DO NOT EDIT
+
+service <%= name %>
+{
+ disable = <%= disable %>
+ socket_type = <%= socket_type %>
+ protocol = <%= protocol %>
+ wait = <%= mywait %>
+ user = <%= user %>
+ group = <%= group %>
+ server = <%= server %>
+<% if server_args != :undef %> server_args = <%= server_args %><% end %>
+<% if per_source != :undef %> per_source = <%= per_source %><% end %>
+<% if cps != :undef %> cps = <%= cps %><% end %>
+<% if flags != :undef %> flags = <%= flags %><% end %>
+}
@@ -0,0 +1 @@
+include xinetd

0 comments on commit bf61cce

Please sign in to comment.