Commit 9fadcb74cd7c2a067b5ccb315cd439ca95c947bd

Authored by Sergio Oliveira
1 parent 89f781d0

Removed modules from repo. We'll use it from forge.

Showing 326 changed files with 0 additions and 14031 deletions   Show diff stats

Too many changes.

To preserve performance only 100 of 326 files displayed.

puppet/modules/apt/.bundle/config
@@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
1 ----  
2 -BUNDLE_WITHOUT: development  
puppet/modules/apt/.fixtures.yml
@@ -1,5 +0,0 @@ @@ -1,5 +0,0 @@
1 -fixtures:  
2 - repositories:  
3 - "stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git"  
4 - symlinks:  
5 - "apt": "#{source_dir}"  
puppet/modules/apt/.forge-release/pom.xml
@@ -1,29 +0,0 @@ @@ -1,29 +0,0 @@
1 -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
2 - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">  
3 - <modelVersion>4.0.0</modelVersion>  
4 - <groupId>puppetlabs</groupId>  
5 - <artifactId>ghpublisher</artifactId>  
6 - <version>1.0.0</version>  
7 - <packaging>puppet-module</packaging>  
8 - <name>ghpublisher</name>  
9 -  
10 - <properties>  
11 - <forge.login>${env.PUBLISHER_LOGIN}</forge.login>  
12 - <forge.password>${env.PUBLISHER_PASSWORD}</forge.password>  
13 - </properties>  
14 -  
15 - <build>  
16 - <plugins>  
17 - <plugin>  
18 - <groupId>org.cloudsmith.geppetto</groupId>  
19 - <artifactId>forge-maven-plugin</artifactId>  
20 - <version>3.2.0</version>  
21 - <extensions>true</extensions>  
22 - <configuration>  
23 - <enablePuppetLintValidation>false</enablePuppetLintValidation>  
24 - <cacheLocation>${project.build.directory}/forgeCache</cacheLocation>  
25 - </configuration>  
26 - </plugin>  
27 - </plugins>  
28 - </build>  
29 -</project>  
puppet/modules/apt/.forge-release/publish
@@ -1,18 +0,0 @@ @@ -1,18 +0,0 @@
1 -#!/bin/sh  
2 -#  
3 -# Perform GitHub publish  
4 -if [ -z "$PUBLISHER_LOGIN" ]  
5 -then  
6 - echo "Environment variable PUBLISHER_LOGIN must be set"  
7 - exit 1  
8 -fi  
9 -  
10 -if [ -z "$PUBLISHER_PASSWORD" ]  
11 -then  
12 - echo "Environment variable PUBLISHER_PASSWORD must be set"  
13 - exit 1  
14 -fi  
15 -  
16 -MODULES_ROOT=`pwd`  
17 -cd $(dirname $0)  
18 -mvn -q -s settings.xml -Dforge.modules.root="$MODULES_ROOT" deploy  
19 \ No newline at end of file 0 \ No newline at end of file
puppet/modules/apt/.forge-release/settings.xml
@@ -1,34 +0,0 @@ @@ -1,34 +0,0 @@
1 -<settings>  
2 - <profiles>  
3 - <profile>  
4 - <id>cloudsmith</id>  
5 - <repositories>  
6 - <repository>  
7 - <id>cloudsmith</id>  
8 - <url>https://am0.cloudsmith.com/nexus/content/repositories/releases/</url>  
9 - <releases>  
10 - <enabled>true</enabled>  
11 - </releases>  
12 - <snapshots>  
13 - <enabled>false</enabled>  
14 - </snapshots>  
15 - </repository>  
16 - </repositories>  
17 - <pluginRepositories>  
18 - <pluginRepository>  
19 - <id>cloudsmith</id>  
20 - <url>https://am0.cloudsmith.com/nexus/content/repositories/releases/</url>  
21 - <releases>  
22 - <enabled>true</enabled>  
23 - </releases>  
24 - <snapshots>  
25 - <enabled>false</enabled>  
26 - </snapshots>  
27 - </pluginRepository>  
28 - </pluginRepositories>  
29 - </profile>  
30 - </profiles>  
31 - <activeProfiles>  
32 - <activeProfile>cloudsmith</activeProfile>  
33 - </activeProfiles>  
34 -</settings>  
puppet/modules/apt/.forge-release/validate
@@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
1 -#!/bin/sh  
2 -#  
3 -# Perform GitHub publish  
4 -MODULES_ROOT=`pwd`  
5 -cd $(dirname $0)  
6 -mvn -q -s settings.xml -Dforge.modules.root="$MODULES_ROOT" compile  
7 \ No newline at end of file 0 \ No newline at end of file
puppet/modules/apt/.nodeset.yml
@@ -1,19 +0,0 @@ @@ -1,19 +0,0 @@
1 ----  
2 -default_set: 'ubuntu-server-12042-x64'  
3 -sets:  
4 - 'debian-607-x64':  
5 - nodes:  
6 - "main.foo.vm":  
7 - prefab: 'debian-607-x64'  
8 - 'debian-70rc1-x64':  
9 - nodes:  
10 - "main.foo.vm":  
11 - prefab: 'debian-70rc1-x64'  
12 - 'ubuntu-server-10044-x64':  
13 - nodes:  
14 - "main.foo.vm":  
15 - prefab: 'ubuntu-server-10044-x64'  
16 - 'ubuntu-server-12042-x64':  
17 - nodes:  
18 - "main.foo.vm":  
19 - prefab: 'ubuntu-server-12042-x64'  
puppet/modules/apt/.travis.yml
@@ -1,40 +0,0 @@ @@ -1,40 +0,0 @@
1 ----  
2 -branches:  
3 - only:  
4 - - master  
5 -language: ruby  
6 -bundler_args: --without development  
7 -script: bundle exec rake spec SPEC_OPTS='--format documentation'  
8 -after_success:  
9 - - git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-release  
10 - - .forge-release/publish  
11 -rvm:  
12 - - 1.8.7  
13 - - 1.9.3  
14 - - 2.0.0  
15 -env:  
16 - matrix:  
17 - - PUPPET_GEM_VERSION="~> 2.7.0"  
18 - - PUPPET_GEM_VERSION="~> 3.0.0"  
19 - - PUPPET_GEM_VERSION="~> 3.1.0"  
20 - - PUPPET_GEM_VERSION="~> 3.2.0"  
21 - global:  
22 - - PUBLISHER_LOGIN=puppetlabs  
23 - - secure: |-  
24 - ipB/CV1rVSTXU9ZDuzrFOlzJrRmJob36tKns2xszuH4r9s5P9qivNAngRGdV  
25 - msb69xvOlzQykM0WRF+4kJ6TZ7AbMiDI+VZ8GDtsRaU5/q3BpsvFe8aato+6  
26 - QeyFtBG62OsosTEhGws4mqiFsPDu3dHlakuJc9zevlTuhNwbKSs=  
27 -matrix:  
28 - exclude:  
29 - - rvm: 1.9.3  
30 - env: PUPPET_GEM_VERSION="~> 2.7.0"  
31 - - rvm: 2.0.0  
32 - env: PUPPET_GEM_VERSION="~> 2.7.0"  
33 - - rvm: 2.0.0  
34 - env: PUPPET_GEM_VERSION="~> 3.0.0"  
35 - - rvm: 2.0.0  
36 - env: PUPPET_GEM_VERSION="~> 3.1.0"  
37 - - rvm: 1.8.7  
38 - env: PUPPET_GEM_VERSION="~> 3.2.0"  
39 -notifications:  
40 - email: false  
puppet/modules/apt/CHANGELOG
@@ -1,183 +0,0 @@ @@ -1,183 +0,0 @@
1 -2013-10-08 1.4.0  
2 -  
3 -Summary:  
4 -  
5 -Minor bugfix and allow the timeout to be adjusted.  
6 -  
7 -Features:  
8 -- Add an `updates_timeout` to apt::params  
9 -  
10 -Fixes:  
11 -- Ensure apt::ppa can readd a ppa removed by hand.  
12 -  
13 -Summary  
14 -  
15 -1.3.0  
16 -=====  
17 -  
18 -Summary:  
19 -  
20 -This major feature in this release is the new apt::unattended_upgrades class,  
21 -allowing you to handle Ubuntu's unattended feature. This allows you to select  
22 -specific packages to automatically upgrade without any further user  
23 -involvement.  
24 -  
25 -In addition we extend our Wheezy support, add proxy support to apt:ppa and do  
26 -various cleanups and tweaks.  
27 -  
28 -Features:  
29 -- Add apt::unattended_upgrades support for Ubuntu.  
30 -- Add wheezy backports support.  
31 -- Use the geoDNS http.debian.net instead of the main debian ftp server.  
32 -- Add `options` parameter to apt::ppa in order to pass options to apt-add-repository command.  
33 -- Add proxy support for apt::ppa (uses proxy_host and proxy_port from apt).  
34 -  
35 -Bugfixes:  
36 -- Fix regsubst() calls to quote single letters (for future parser).  
37 -- Fix lint warnings and other misc cleanup.  
38 -  
39 -1.2.0  
40 -=====  
41 -  
42 -Features:  
43 -- Add geppetto `.project` natures  
44 -- Add GH auto-release  
45 -- Add `apt::key::key_options` parameter  
46 -- Add complex pin support using distribution properties for `apt::pin` via new properties:  
47 - - `apt::pin::codename`  
48 - - `apt::pin::release_version`  
49 - - `apt::pin::component`  
50 - - `apt::pin::originator`  
51 - - `apt::pin::label`  
52 -- Add source architecture support to `apt::source::architecture`  
53 -  
54 -Bugfixes:  
55 -- Use apt-get instead of aptitude in apt::force  
56 -- Update default backports location  
57 -- Add dependency for required packages before apt-get update  
58 -  
59 -  
60 -1.1.1  
61 -=====  
62 -  
63 -This is a bug fix release that resolves a number of issues:  
64 -  
65 -* By changing template variable usage, we remove the deprecation warnings  
66 - for Puppet 3.2.x  
67 -* Fixed proxy file removal, when proxy absent  
68 -  
69 -Some documentation, style and whitespaces changes were also merged. This  
70 -release also introduced proper rspec-puppet unit testing on Travis-CI to help  
71 -reduce regression.  
72 -  
73 -Thanks to all the community contributors below that made this patch possible.  
74 -  
75 -#### Detail Changes  
76 -  
77 -* fix minor comment type (Chris Rutter)  
78 -* whitespace fixes (Michael Moll)  
79 -* Update travis config file (William Van Hevelingen)  
80 -* Build all branches on travis (William Van Hevelingen)  
81 -* Standardize travis.yml on pattern introduced in stdlib (William Van Hevelingen)  
82 -* Updated content to conform to README best practices template (Lauren Rother)  
83 -* Fix apt::release example in readme (Brian Galey)  
84 -* add @ to variables in template (Peter Hoeg)  
85 -* Remove deprecation warnings for pin.pref.erb as well (Ken Barber)  
86 -* Update travis.yml to latest versions of puppet (Ken Barber)  
87 -* Fix proxy file removal (Scott Barber)  
88 -* Add spec test for removing proxy configuration (Dean Reilly)  
89 -* Fix apt::key listing longer than 8 chars (Benjamin Knofe)  
90 -  
91 -  
92 ----------------------------------------  
93 -  
94 -1.1.0  
95 -=====  
96 -  
97 -This release includes Ubuntu 12.10 (Quantal) support for PPAs.  
98 -  
99 ----------------------------------------  
100 -  
101 -2012-05-25 Puppet Labs <info@puppetlabs.com> - 0.0.4  
102 - * Fix ppa list filename when there is a period in the PPA name  
103 - * Add .pref extension to apt preferences files  
104 - * Allow preferences to be purged  
105 - * Extend pin support  
106 -  
107 -2012-05-04 Puppet Labs <info@puppetlabs.com> - 0.0.3  
108 - * only invoke apt-get update once  
109 - * only install python-software-properties if a ppa is added  
110 - * support 'ensure => absent' for all defined types  
111 - * add apt::conf  
112 - * add apt::backports  
113 - * fixed Modulefile for module tool dependency resolution  
114 - * configure proxy before doing apt-get update  
115 - * use apt-get update instead of aptitude for apt::ppa  
116 - * add support to pin release  
117 -  
118 -  
119 -2012-03-26 Puppet Labs <info@puppetlabs.com> - 0.0.2  
120 -41cedbb (#13261) Add real examples to smoke tests.  
121 -d159a78 (#13261) Add key.pp smoke test  
122 -7116c7a (#13261) Replace foo source with puppetlabs source  
123 -1ead0bf Ignore pkg directory.  
124 -9c13872 (#13289) Fix some more style violations  
125 -0ea4ffa (#13289) Change test scaffolding to use a module & manifest dir fixture path  
126 -a758247 (#13289) Clean up style violations and fix corresponding tests  
127 -99c3fd3 (#13289) Add puppet lint tests to Rakefile  
128 -5148cbf (#13125) Apt keys should be case insensitive  
129 -b9607a4 Convert apt::key to use anchors  
130 -  
131 -2012-03-07 Puppet Labs <info@puppetlabs.com> - 0.0.1  
132 -d4fec56 Modify apt::source release parameter test  
133 -1132a07 (#12917) Add contributors to README  
134 -8cdaf85 (#12823) Add apt::key defined type and modify apt::source to use it  
135 -7c0d10b (#12809) $release should use $lsbdistcodename and fall back to manual input  
136 -be2cc3e (#12522) Adjust spec test for splitting purge  
137 -7dc60ae (#12522) Split purge option to spare sources.list  
138 -9059c4e Fix source specs to test all key permutations  
139 -8acb202 Add test for python-software-properties package  
140 -a4af11f Check if python-software-properties is defined before attempting to define it.  
141 -1dcbf3d Add tests for required_packages change  
142 -f3735d2 Allow duplicate $required_packages  
143 -74c8371 (#12430) Add tests for changes to apt module  
144 -97ebb2d Test two sources with the same key  
145 -1160bcd (#12526) Add ability to reverse apt { disable_keys => true }  
146 -2842d73 Add Modulefile to puppet-apt  
147 -c657742 Allow the use of the same key in multiple sources  
148 -8c27963 (#12522) Adding purge option to apt class  
149 -997c9fd (#12529) Add unit test for apt proxy settings  
150 -50f3cca (#12529) Add parameter to support setting a proxy for apt  
151 -d522877 (#12094) Replace chained .with_* with a hash  
152 -8cf1bd0 (#12094) Remove deprecated spec.opts file  
153 -2d688f4 (#12094) Add rspec-puppet tests for apt  
154 -0fb5f78 (#12094) Replace name with path in file resources  
155 -f759bc0 (#11953) Apt::force passes $version to aptitude  
156 -f71db53 (#11413) Add spec test for apt::force to verify changes to unless  
157 -2f5d317 (#11413) Update dpkg query used by apt::force  
158 -cf6caa1 (#10451) Add test coverage to apt::ppa  
159 -0dd697d include_src parameter in example; Whitespace cleanup  
160 -b662eb8 fix typos in "repositories"  
161 -1be7457 Fix (#10451) - apt::ppa fails to "apt-get update" when new PPA source is added  
162 -864302a Set the pin priority before adding the source (Fix #10449)  
163 -1de4e0a Refactored as per mlitteken  
164 -1af9a13 Added some crazy bash madness to check if the ppa is installed already. Otherwise the manifest tries to add it on every run!  
165 -52ca73e (#8720) Replace Apt::Ppa with Apt::Builddep  
166 -5c05fa0 added builddep command.  
167 -a11af50 added the ability to specify the content of a key  
168 -c42db0f Fixes ppa test.  
169 -77d2b0d reformatted whitespace to match recommended style of 2 space indentation.  
170 -27ebdfc ignore swap files.  
171 -377d58a added smoke tests for module.  
172 -18f614b reformatted apt::ppa according to recommended style.  
173 -d8a1e4e Created a params class to hold global data.  
174 -636ae85 Added two params for apt class  
175 -148fc73 Update LICENSE.  
176 -ed2d19e Support ability to add more than one PPA  
177 -420d537 Add call to apt-update after add-apt-repository in apt::ppa  
178 -945be77 Add package definition for python-software-properties  
179 -71fc425 Abs paths for all commands  
180 -9d51cd1 Adding LICENSE  
181 -71796e3 Heading fix in README  
182 -87777d8 Typo in README  
183 -f848bac First commit  
puppet/modules/apt/Gemfile
@@ -1,16 +0,0 @@ @@ -1,16 +0,0 @@
1 -source 'https://rubygems.org'  
2 -  
3 -group :development, :test do  
4 - gem 'rake', :require => false  
5 - gem 'rspec-puppet', :require => false  
6 - gem 'puppetlabs_spec_helper', :require => false  
7 - gem 'rspec-system', :require => false  
8 - gem 'rspec-system-puppet', :require => false  
9 - gem 'rspec-system-serverspec', :require => false  
10 -end  
11 -  
12 -if puppetversion = ENV['PUPPET_GEM_VERSION']  
13 - gem 'puppet', puppetversion, :require => false  
14 -else  
15 - gem 'puppet', :require => false  
16 -end  
puppet/modules/apt/Gemfile.lock
@@ -1,70 +0,0 @@ @@ -1,70 +0,0 @@
1 -GEM  
2 - remote: https://rubygems.org/  
3 - specs:  
4 - builder (3.2.2)  
5 - diff-lcs (1.2.4)  
6 - facter (1.6.18)  
7 - hiera (1.0.0)  
8 - highline (1.6.19)  
9 - kwalify (0.7.2)  
10 - metaclass (0.0.1)  
11 - mocha (0.14.0)  
12 - metaclass (~> 0.0.1)  
13 - net-scp (1.1.2)  
14 - net-ssh (>= 2.6.5)  
15 - net-ssh (2.7.0)  
16 - nokogiri (1.5.10)  
17 - puppet (3.0.2)  
18 - facter (~> 1.6.11)  
19 - hiera (~> 1.0.0)  
20 - puppetlabs_spec_helper (0.4.1)  
21 - mocha (>= 0.10.5)  
22 - rake  
23 - rspec (>= 2.9.0)  
24 - rspec-puppet (>= 0.1.1)  
25 - rake (10.1.0)  
26 - rbvmomi (1.6.0)  
27 - builder  
28 - nokogiri (>= 1.4.1)  
29 - trollop  
30 - rspec (2.14.1)  
31 - rspec-core (~> 2.14.0)  
32 - rspec-expectations (~> 2.14.0)  
33 - rspec-mocks (~> 2.14.0)  
34 - rspec-core (2.14.5)  
35 - rspec-expectations (2.14.3)  
36 - diff-lcs (>= 1.1.3, < 2.0)  
37 - rspec-mocks (2.14.3)  
38 - rspec-puppet (0.1.6)  
39 - rspec  
40 - rspec-system (2.3.0)  
41 - kwalify (~> 0.7.2)  
42 - net-scp (~> 1.1)  
43 - net-ssh (~> 2.6)  
44 - nokogiri (~> 1.5.9)  
45 - rbvmomi (~> 1.6)  
46 - rspec (~> 2.13)  
47 - systemu (~> 2.5)  
48 - rspec-system-puppet (2.2.0)  
49 - rspec-system (~> 2.0)  
50 - rspec-system-serverspec (1.0.1)  
51 - rspec-system (~> 2.0)  
52 - serverspec (~> 0.0)  
53 - serverspec (0.10.5)  
54 - highline  
55 - net-ssh  
56 - rspec (>= 2.13.0)  
57 - systemu (2.5.2)  
58 - trollop (2.0)  
59 -  
60 -PLATFORMS  
61 - ruby  
62 -  
63 -DEPENDENCIES  
64 - puppet (~> 3.0.0)  
65 - puppetlabs_spec_helper  
66 - rake  
67 - rspec-puppet  
68 - rspec-system  
69 - rspec-system-puppet  
70 - rspec-system-serverspec  
puppet/modules/apt/LICENSE
@@ -1,19 +0,0 @@ @@ -1,19 +0,0 @@
1 -Copyright (c) 2011 Evolving Web Inc.  
2 -  
3 -Permission is hereby granted, free of charge, to any person obtaining a copy  
4 -of this software and associated documentation files (the "Software"), to deal  
5 -in the Software without restriction, including without limitation the rights  
6 -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell  
7 -copies of the Software, and to permit persons to whom the Software is  
8 -furnished to do so, subject to the following conditions:  
9 -  
10 -The above copyright notice and this permission notice shall be included in  
11 -all copies or substantial portions of the Software.  
12 -  
13 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR  
14 -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,  
15 -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE  
16 -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER  
17 -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,  
18 -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN  
19 -THE SOFTWARE.  
puppet/modules/apt/Modulefile
@@ -1,14 +0,0 @@ @@ -1,14 +0,0 @@
1 -name 'puppetlabs-apt'  
2 -version '1.4.0'  
3 -source 'https://github.com/puppetlabs/puppetlabs-apt'  
4 -author 'Evolving Web / Puppet Labs'  
5 -license 'Apache License 2.0'  
6 -summary 'Puppet Labs Apt Module'  
7 -description 'APT Module for Puppet'  
8 -project_page 'https://github.com/puppetlabs/puppetlabs-apt'  
9 -  
10 -## Add dependencies, if any:  
11 -#dependency 'puppetlabs/stdlib', '2.x'  
12 -# The dependency should be written as above but librarian-puppet  
13 -# does not support the expression as the PMT does.  
14 -dependency 'puppetlabs/stdlib', '>= 2.2.1'  
puppet/modules/apt/README.md
@@ -1,226 +0,0 @@ @@ -1,226 +0,0 @@
1 -apt  
2 -===  
3 -  
4 -[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-apt.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-apt)  
5 -  
6 -## Description  
7 -Provides helpful definitions for dealing with Apt.  
8 -=======  
9 -Overview  
10 ---------  
11 -  
12 -The APT module provides a simple interface for managing APT source, key, and definitions with Puppet.  
13 -  
14 -Module Description  
15 -------------------  
16 -  
17 -APT automates obtaining and installing software packages on *nix systems.  
18 -  
19 -Setup  
20 ------  
21 -  
22 -**What APT affects:**  
23 -  
24 -* package/service/configuration files for APT  
25 -* your system's `sources.list` file and `sources.list.d` directory  
26 - * NOTE: Setting the `purge_sources_list` and `purge_sources_list_d` parameters to 'true' will destroy any existing content that was not declared with Puppet. The default for these parameters is 'false'.  
27 -* system repositories  
28 -* authentication keys  
29 -* wget (optional)  
30 -  
31 -###Beginning with APT  
32 -  
33 -To begin using the APT module with default parameters, declare the class  
34 -  
35 - class { 'apt': }  
36 -  
37 -Puppet code that uses anything from the APT module requires that the core apt class be declared.  
38 -  
39 -Usage  
40 ------  
41 -  
42 -Using the APT module consists predominantly in declaring classes that provide desired functionality and features.  
43 -  
44 -###apt  
45 -  
46 -`apt` provides a number of common resources and options that are shared by the various defined types in this module, so you MUST always include this class in your manifests.  
47 -  
48 -The parameters for `apt` are not required in general and are predominantly for development environment use-cases.  
49 -  
50 - class { 'apt':  
51 - always_apt_update => false,  
52 - disable_keys => undef,  
53 - proxy_host => false,  
54 - proxy_port => '8080',  
55 - purge_sources_list => false,  
56 - purge_sources_list_d => false,  
57 - purge_preferences_d => false,  
58 - update_timeout => undef  
59 - }  
60 -  
61 -Puppet will manage your system's `sources.list` file and `sources.list.d` directory but will do its best to respect existing content.  
62 -  
63 -If you declare your apt class with `purge_sources_list` and `purge_sources_list_d` set to 'true', Puppet will unapologetically purge any existing content it finds that wasn't declared with Puppet.  
64 -  
65 -###apt::builddep  
66 -  
67 -Installs the build depends of a specified package.  
68 -  
69 - apt::builddep { 'glusterfs-server': }  
70 -  
71 -###apt::force  
72 -  
73 -Forces a package to be installed from a specific release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu.  
74 -  
75 - apt::force { 'glusterfs-server':  
76 - release => 'unstable',  
77 - version => '3.0.3',  
78 - require => Apt::Source['debian_unstable'],  
79 - }  
80 -  
81 -###apt::key  
82 -  
83 -Adds a key to the list of keys used by APT to authenticate packages.  
84 -  
85 - apt::key { 'puppetlabs':  
86 - key => '4BD6EC30',  
87 - key_server => 'pgp.mit.edu',  
88 - }  
89 -  
90 - apt::key { 'jenkins':  
91 - key => 'D50582E6',  
92 - key_source => 'http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key',  
93 - }  
94 -  
95 -Note that use of `key_source` requires wget to be installed and working.  
96 -  
97 -###apt::pin  
98 -  
99 -Adds an apt pin for a certain release.  
100 -  
101 - apt::pin { 'karmic': priority => 700 }  
102 - apt::pin { 'karmic-updates': priority => 700 }  
103 - apt::pin { 'karmic-security': priority => 700 }  
104 -  
105 -Note you can also specifying more complex pins using distribution properties.  
106 -  
107 - apt::pin { 'stable':  
108 - priority => -10,  
109 - originator => 'Debian',  
110 - release_version => '3.0',  
111 - component => 'main',  
112 - label => 'Debian'  
113 - }  
114 -  
115 -###apt::ppa  
116 -  
117 -Adds a ppa repository using `add-apt-repository`.  
118 -  
119 - apt::ppa { 'ppa:drizzle-developers/ppa': }  
120 -  
121 -###apt::release  
122 -  
123 -Sets the default apt release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu.  
124 -  
125 - class { 'apt::release':  
126 - release_id => 'precise',  
127 - }  
128 -  
129 -###apt::source  
130 -  
131 -Adds an apt source to `/etc/apt/sources.list.d/`.  
132 -  
133 - apt::source { 'debian_unstable':  
134 - location => 'http://debian.mirror.iweb.ca/debian/',  
135 - release => 'unstable',  
136 - repos => 'main contrib non-free',  
137 - required_packages => 'debian-keyring debian-archive-keyring',  
138 - key => '55BE302B',  
139 - key_server => 'subkeys.pgp.net',  
140 - pin => '-10',  
141 - include_src => true  
142 - }  
143 -  
144 -If you would like to configure your system so the source is the Puppet Labs APT repository  
145 -  
146 - apt::source { 'puppetlabs':  
147 - location => 'http://apt.puppetlabs.com',  
148 - repos => 'main',  
149 - key => '4BD6EC30',  
150 - key_server => 'pgp.mit.edu',  
151 - }  
152 -  
153 -###Testing  
154 -  
155 -The APT module is mostly a collection of defined resource types, which provide reusable logic that can be leveraged to manage APT. It does provide smoke tests for testing functionality on a target system, as well as spec tests for checking a compiled catalog against an expected set of resources.  
156 -  
157 -####Example Test  
158 -  
159 -This test will set up a Puppet Labs apt repository. Start by creating a new smoke test in the apt module's test folder. Call it puppetlabs-apt.pp. Inside, declare a single resource representing the Puppet Labs APT source and gpg key  
160 -  
161 - apt::source { 'puppetlabs':  
162 - location => 'http://apt.puppetlabs.com',  
163 - repos => 'main',  
164 - key => '4BD6EC30',  
165 - key_server => 'pgp.mit.edu',  
166 - }  
167 -  
168 -This resource creates an apt source named puppetlabs and gives Puppet information about the repository's location and key used to sign its packages. Puppet leverages Facter to determine the appropriate release, but you can set it directly by adding the release type.  
169 -  
170 -Check your smoke test for syntax errors  
171 -  
172 - $ puppet parser validate tests/puppetlabs-apt.pp  
173 -  
174 -If you receive no output from that command, it means nothing is wrong. Then apply the code  
175 -  
176 - $ puppet apply --verbose tests/puppetlabs-apt.pp  
177 - notice: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]/ensure: defined content as '{md5}3be1da4923fb910f1102a233b77e982e'  
178 - info: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]: Scheduling refresh of Exec[puppetlabs apt update]  
179 - notice: /Stage[main]//Apt::Source[puppetlabs]/Exec[puppetlabs apt update]: Triggered 'refresh' from 1 events>  
180 -  
181 -The above example used a smoke test to easily lay out a resource declaration and apply it on your system. In production, you may want to declare your APT sources inside the classes where they’re needed.  
182 -  
183 -Implementation  
184 ---------------  
185 -  
186 -###apt::backports  
187 -  
188 -Adds the necessary components to get backports for Ubuntu and Debian. The release name defaults to `$lsbdistcodename`. Setting this manually can cause undefined behavior (read: universe exploding).  
189 -  
190 -Limitations  
191 ------------  
192 -  
193 -This module should work across all versions of Debian/Ubuntu and support all major APT repository management features.  
194 -  
195 -Development  
196 -------------  
197 -  
198 -Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.  
199 -  
200 -We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.  
201 -  
202 -You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing)  
203 -  
204 -Contributors  
205 -------------  
206 -  
207 -A lot of great people have contributed to this module. A somewhat current list follows:  
208 -  
209 -* Ben Godfrey <ben.godfrey@wonga.com>  
210 -* Branan Purvine-Riley <branan@puppetlabs.com>  
211 -* Christian G. Warden <cwarden@xerus.org>  
212 -* Dan Bode <bodepd@gmail.com> <dan@puppetlabs.com>  
213 -* Garrett Honeycutt <github@garretthoneycutt.com>  
214 -* Jeff Wallace <jeff@evolvingweb.ca> <jeff@tjwallace.ca>  
215 -* Ken Barber <ken@bob.sh>  
216 -* Matthaus Litteken <matthaus@puppetlabs.com> <mlitteken@gmail.com>  
217 -* Matthias Pigulla <mp@webfactory.de>  
218 -* Monty Taylor <mordred@inaugust.com>  
219 -* Peter Drake <pdrake@allplayers.com>  
220 -* Reid Vandewiele <marut@cat.pdx.edu>  
221 -* Robert Navarro <rnavarro@phiivo.com>  
222 -* Ryan Coleman <ryan@puppetlabs.com>  
223 -* Scott McLeod <scott.mcleod@theice.com>  
224 -* Spencer Krum <spencer@puppetlabs.com>  
225 -* William Van Hevelingen <blkperl@cat.pdx.edu> <wvan13@gmail.com>  
226 -* Zach Leslie <zach@puppetlabs.com>  
puppet/modules/apt/Rakefile
@@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
1 -require 'puppetlabs_spec_helper/rake_tasks'  
2 -require 'rspec-system/rake_task'  
puppet/modules/apt/manifests/backports.pp
@@ -1,48 +0,0 @@ @@ -1,48 +0,0 @@
1 -# This adds the necessary components to get backports for ubuntu and debian  
2 -#  
3 -# == Parameters  
4 -#  
5 -# [*release*]  
6 -# The ubuntu/debian release name. Defaults to $lsbdistcodename. Setting this  
7 -# manually can cause undefined behavior. (Read: universe exploding)  
8 -#  
9 -# == Examples  
10 -#  
11 -# include apt::backports  
12 -#  
13 -# class { 'apt::backports':  
14 -# release => 'natty',  
15 -# }  
16 -#  
17 -# == Authors  
18 -#  
19 -# Ben Hughes, I think. At least blame him if this goes wrong.  
20 -# I just added puppet doc.  
21 -#  
22 -# == Copyright  
23 -#  
24 -# Copyright 2011 Puppet Labs Inc, unless otherwise noted.  
25 -class apt::backports(  
26 - $release = $::lsbdistcodename,  
27 - $location = $apt::params::backports_location  
28 -) inherits apt::params {  
29 -  
30 - $release_real = downcase($release)  
31 - $key = $::lsbdistid ? {  
32 - 'debian' => '55BE302B',  
33 - 'ubuntu' => '437D05B5',  
34 - }  
35 - $repos = $::lsbdistid ? {  
36 - 'debian' => 'main contrib non-free',  
37 - 'ubuntu' => 'main universe multiverse restricted',  
38 - }  
39 -  
40 - apt::source { 'backports':  
41 - location => $location,  
42 - release => "${release_real}-backports",  
43 - repos => $repos,  
44 - key => $key,  
45 - key_server => 'pgp.mit.edu',  
46 - pin => '200',  
47 - }  
48 -}  
puppet/modules/apt/manifests/builddep.pp
@@ -1,16 +0,0 @@ @@ -1,16 +0,0 @@
1 -# builddep.pp  
2 -  
3 -define apt::builddep() {  
4 - include apt::update  
5 -  
6 - exec { "apt-builddep-${name}":  
7 - command => "/usr/bin/apt-get -y --force-yes build-dep ${name}",  
8 - logoutput => 'on_failure',  
9 - notify => Exec['apt_update'],  
10 - }  
11 -  
12 - # Need anchor to provide containment for dependencies.  
13 - anchor { "apt::builddep::${name}":  
14 - require => Class['apt::update'],  
15 - }  
16 -}  
puppet/modules/apt/manifests/conf.pp
@@ -1,18 +0,0 @@ @@ -1,18 +0,0 @@
1 -define apt::conf (  
2 - $content,  
3 - $ensure = present,  
4 - $priority = '50'  
5 -) {  
6 -  
7 - include apt::params  
8 -  
9 - $apt_conf_d = $apt::params::apt_conf_d  
10 -  
11 - file { "${apt_conf_d}/${priority}${name}":  
12 - ensure => $ensure,  
13 - content => $content,  
14 - owner => root,  
15 - group => root,  
16 - mode => '0644',  
17 - }  
18 -}  
puppet/modules/apt/manifests/debian/testing.pp
@@ -1,21 +0,0 @@ @@ -1,21 +0,0 @@
1 -# testing.pp  
2 -  
3 -class apt::debian::testing {  
4 - include apt  
5 -  
6 - # deb http://debian.mirror.iweb.ca/debian/ testing main contrib non-free  
7 - # deb-src http://debian.mirror.iweb.ca/debian/ testing main contrib non-free  
8 - # Key: 55BE302B Server: subkeys.pgp.net  
9 - # debian-keyring  
10 - # debian-archive-keyring  
11 -  
12 - apt::source { 'debian_testing':  
13 - location => 'http://debian.mirror.iweb.ca/debian/',  
14 - release => 'testing',  
15 - repos => 'main contrib non-free',  
16 - required_packages => 'debian-keyring debian-archive-keyring',  
17 - key => '55BE302B',  
18 - key_server => 'subkeys.pgp.net',  
19 - pin => '-10',  
20 - }  
21 -}  
puppet/modules/apt/manifests/debian/unstable.pp
@@ -1,21 +0,0 @@ @@ -1,21 +0,0 @@
1 -# unstable.pp  
2 -  
3 -class apt::debian::unstable {  
4 - include apt  
5 -  
6 - # deb http://debian.mirror.iweb.ca/debian/ unstable main contrib non-free  
7 - # deb-src http://debian.mirror.iweb.ca/debian/ unstable main contrib non-free  
8 - # Key: 55BE302B Server: subkeys.pgp.net  
9 - # debian-keyring  
10 - # debian-archive-keyring  
11 -  
12 - apt::source { 'debian_unstable':  
13 - location => 'http://debian.mirror.iweb.ca/debian/',  
14 - release => 'unstable',  
15 - repos => 'main contrib non-free',  
16 - required_packages => 'debian-keyring debian-archive-keyring',  
17 - key => '55BE302B',  
18 - key_server => 'subkeys.pgp.net',  
19 - pin => '-10',  
20 - }  
21 -}  
puppet/modules/apt/manifests/force.pp
@@ -1,24 +0,0 @@ @@ -1,24 +0,0 @@
1 -# force.pp  
2 -# force a package from a specific release  
3 -  
4 -define apt::force(  
5 - $release = 'testing',  
6 - $version = false,  
7 - $timeout = 300  
8 -) {  
9 -  
10 - $version_string = $version ? {  
11 - false => undef,  
12 - default => "=${version}",  
13 - }  
14 -  
15 - $install_check = $version ? {  
16 - false => "/usr/bin/dpkg -s ${name} | grep -q 'Status: install'",  
17 - default => "/usr/bin/dpkg -s ${name} | grep -q 'Version: ${version}'",  
18 - }  
19 - exec { "/usr/bin/apt-get -y -t ${release} install ${name}${version_string}":  
20 - unless => $install_check,  
21 - logoutput => 'on_failure',  
22 - timeout => $timeout,  
23 - }  
24 -}  
puppet/modules/apt/manifests/init.pp
@@ -1,121 +0,0 @@ @@ -1,121 +0,0 @@
1 -# Class: apt  
2 -#  
3 -# This module manages the initial configuration of apt.  
4 -#  
5 -# Parameters:  
6 -# The parameters listed here are not required in general and were  
7 -# added for use cases related to development environments.  
8 -# disable_keys - disables the requirement for all packages to be signed  
9 -# always_apt_update - rather apt should be updated on every run (intended  
10 -# for development environments where package updates are frequent)  
11 -# purge_sources_list - Accepts true or false. Defaults to false If set to  
12 -# true, Puppet will purge all unmanaged entries from sources.list  
13 -# purge_sources_list_d - Accepts true or false. Defaults to false. If set  
14 -# to true, Puppet will purge all unmanaged entries from sources.list.d  
15 -# update_timeout - Overrides the exec timeout in seconds for apt-get update.  
16 -# If not set defaults to Exec's default (300)  
17 -#  
18 -# Actions:  
19 -#  
20 -# Requires:  
21 -# puppetlabs/stdlib  
22 -# Sample Usage:  
23 -# class { 'apt': }  
24 -  
25 -class apt(  
26 - $always_apt_update = false,  
27 - $disable_keys = undef,  
28 - $proxy_host = false,  
29 - $proxy_port = '8080',  
30 - $purge_sources_list = false,  
31 - $purge_sources_list_d = false,  
32 - $purge_preferences_d = false,  
33 - $update_timeout = undef  
34 -) {  
35 -  
36 - include apt::params  
37 - include apt::update  
38 -  
39 - validate_bool($purge_sources_list, $purge_sources_list_d, $purge_preferences_d)  
40 -  
41 - $sources_list_content = $purge_sources_list ? {  
42 - false => undef,  
43 - true => "# Repos managed by puppet.\n",  
44 - }  
45 -  
46 - if $always_apt_update == true {  
47 - Exec <| title=='apt_update' |> {  
48 - refreshonly => false,  
49 - }  
50 - }  
51 -  
52 - $root = $apt::params::root  
53 - $apt_conf_d = $apt::params::apt_conf_d  
54 - $sources_list_d = $apt::params::sources_list_d  
55 - $preferences_d = $apt::params::preferences_d  
56 - $provider = $apt::params::provider  
57 -  
58 - file { 'sources.list':  
59 - ensure => present,  
60 - path => "${root}/sources.list",  
61 - owner => root,  
62 - group => root,  
63 - mode => '0644',  
64 - content => $sources_list_content,  
65 - notify => Exec['apt_update'],  
66 - }  
67 -  
68 - file { 'sources.list.d':  
69 - ensure => directory,  
70 - path => $sources_list_d,  
71 - owner => root,  
72 - group => root,  
73 - purge => $purge_sources_list_d,  
74 - recurse => $purge_sources_list_d,  
75 - notify => Exec['apt_update'],  
76 - }  
77 -  
78 - file { 'preferences.d':  
79 - ensure => directory,  
80 - path => $preferences_d,  
81 - owner => root,  
82 - group => root,  
83 - purge => $purge_preferences_d,  
84 - recurse => $purge_preferences_d,  
85 - }  
86 -  
87 - case $disable_keys {  
88 - true: {  
89 - file { '99unauth':  
90 - ensure => present,  
91 - content => "APT::Get::AllowUnauthenticated 1;\n",  
92 - path => "${apt_conf_d}/99unauth",  
93 - }  
94 - }  
95 - false: {  
96 - file { '99unauth':  
97 - ensure => absent,  
98 - path => "${apt_conf_d}/99unauth",  
99 - }  
100 - }  
101 - undef: { } # do nothing  
102 - default: { fail('Valid values for disable_keys are true or false') }  
103 - }  
104 -  
105 - $proxy_set = $proxy_host ? {  
106 - false => absent,  
107 - default => present  
108 - }  
109 -  
110 - file { 'configure-apt-proxy':  
111 - ensure => $proxy_set,  
112 - path => "${apt_conf_d}/proxy",  
113 - content => "Acquire::http::Proxy \"http://${proxy_host}:${proxy_port}\";",  
114 - notify => Exec['apt_update'],  
115 - }  
116 -  
117 - # Need anchor to provide containment for dependencies.  
118 - anchor { 'apt::update':  
119 - require => Class['apt::update'],  
120 - }  
121 -}  
puppet/modules/apt/manifests/key.pp
@@ -1,90 +0,0 @@ @@ -1,90 +0,0 @@
1 -define apt::key (  
2 - $key = $title,  
3 - $ensure = present,  
4 - $key_content = false,  
5 - $key_source = false,  
6 - $key_server = 'keyserver.ubuntu.com',  
7 - $key_options = false  
8 -) {  
9 -  
10 - include apt::params  
11 -  
12 - $upkey = upcase($key)  
13 - # trim the key to the last 8 chars so we can match longer keys with apt-key list too  
14 - $trimmedkey = regsubst($upkey, '^.*(.{8})$', '\1')  
15 -  
16 - if $key_content {  
17 - $method = 'content'  
18 - } elsif $key_source {  
19 - $method = 'source'  
20 - } elsif $key_server {  
21 - $method = 'server'  
22 - }  
23 -  
24 - # This is a hash of the parts of the key definition that we care about.  
25 - # It is used as a unique identifier for this instance of apt::key. It gets  
26 - # hashed to ensure that the resource name doesn't end up being pages and  
27 - # pages (e.g. in the situation where key_content is specified).  
28 - $digest = sha1("${upkey}/${key_content}/${key_source}/${key_server}/")  
29 -  
30 - # Allow multiple ensure => present for the same key to account for many  
31 - # apt::source resources that all reference the same key.  
32 - case $ensure {  
33 - present: {  
34 -  
35 - anchor { "apt::key/${title}": }  
36 -  
37 - if defined(Exec["apt::key ${upkey} absent"]) {  
38 - fail("Cannot ensure Apt::Key[${upkey}] present; ${upkey} already ensured absent")  
39 - }  
40 -  
41 - if !defined(Anchor["apt::key ${upkey} present"]) {  
42 - anchor { "apt::key ${upkey} present": }  
43 - }  
44 -  
45 - if $key_options{  
46 - $options_string = "--keyserver-options ${key_options}"  
47 - }  
48 - else{  
49 - $options_string = ''  
50 - }  
51 -  
52 - if !defined(Exec[$digest]) {  
53 - $digest_command = $method ? {  
54 - 'content' => "echo '${key_content}' | /usr/bin/apt-key add -",  
55 - 'source' => "wget -q '${key_source}' -O- | apt-key add -",  
56 - 'server' => "apt-key adv --keyserver '${key_server}' ${options_string} --recv-keys '${upkey}'",  
57 - }  
58 - exec { $digest:  
59 - command => $digest_command,  
60 - path => '/bin:/usr/bin',  
61 - unless => "/usr/bin/apt-key list | /bin/grep '${trimmedkey}'",  
62 - logoutput => 'on_failure',  
63 - before => Anchor["apt::key ${upkey} present"],  
64 - }  
65 - }  
66 -  
67 - Anchor["apt::key ${upkey} present"] -> Anchor["apt::key/${title}"]  
68 -  
69 - }  
70 - absent: {  
71 -  
72 - if defined(Anchor["apt::key ${upkey} present"]) {  
73 - fail("Cannot ensure Apt::Key[${upkey}] absent; ${upkey} already ensured present")  
74 - }  
75 -  
76 - exec { "apt::key ${upkey} absent":  
77 - command => "apt-key del '${upkey}'",  
78 - path => '/bin:/usr/bin',  
79 - onlyif => "apt-key list | grep '${trimmedkey}'",  
80 - user => 'root',  
81 - group => 'root',  
82 - logoutput => 'on_failure',  
83 - }  
84 - }  
85 -  
86 - default: {  
87 - fail "Invalid 'ensure' value '${ensure}' for aptkey"  
88 - }  
89 - }  
90 -}  
puppet/modules/apt/manifests/params.pp
@@ -1,33 +0,0 @@ @@ -1,33 +0,0 @@
1 -class apt::params {  
2 - $root = '/etc/apt'  
3 - $provider = '/usr/bin/apt-get'  
4 - $sources_list_d = "${root}/sources.list.d"  
5 - $apt_conf_d = "${root}/apt.conf.d"  
6 - $preferences_d = "${root}/preferences.d"  
7 -  
8 - case $::lsbdistid {  
9 - 'debian': {  
10 - case $::lsbdistcodename {  
11 - 'squeeze': {  
12 - $backports_location = 'http://backports.debian.org/debian-backports'  
13 - }  
14 - 'wheezy': {  
15 - $backports_location = 'http://ftp.debian.org/debian/'  
16 - }  
17 - default: {  
18 - $backports_location = 'http://http.debian.net/debian/'  
19 - }  
20 - }  
21 - }  
22 - 'ubuntu': {  
23 - case $::lsbdistcodename {  
24 - 'hardy','lucid','maverick','natty','oneiric','precise': {  
25 - $backports_location = 'http://us.archive.ubuntu.com/ubuntu'  
26 - }  
27 - default: {  
28 - $backports_location = 'http://old-releases.ubuntu.com/ubuntu'  
29 - }  
30 - }  
31 - }  
32 - }  
33 -}  
puppet/modules/apt/manifests/pin.pp
@@ -1,73 +0,0 @@ @@ -1,73 +0,0 @@
1 -# pin.pp  
2 -# pin a release in apt, useful for unstable repositories  
3 -  
4 -define apt::pin(  
5 - $ensure = present,  
6 - $explanation = "${::caller_module_name}: ${name}",  
7 - $order = '',  
8 - $packages = '*',  
9 - $priority = 0,  
10 - $release = '', # a=  
11 - $origin = '',  
12 - $version = '',  
13 - $codename = '', # n=  
14 - $release_version = '', # v=  
15 - $component = '', # c=  
16 - $originator = '', # o=  
17 - $label = '' # l=  
18 -) {  
19 -  
20 - include apt::params  
21 -  
22 - $preferences_d = $apt::params::preferences_d  
23 -  
24 - if $order != '' and !is_integer($order) {  
25 - fail('Only integers are allowed in the apt::pin order param')  
26 - }  
27 -  
28 - $pin_release_array = [  
29 - $release,  
30 - $codename,  
31 - $release_version,  
32 - $component,  
33 - $originator,  
34 - $label]  
35 - $pin_release = join($pin_release_array, '')  
36 -  
37 - # Read the manpage 'apt_preferences(5)', especially the chapter  
38 - # 'Thea Effect of APT Preferences' to understand the following logic  
39 - # and the difference between specific and general form  
40 - if $packages != '*' { # specific form  
41 -  
42 - if ( $pin_release != '' and ( $origin != '' or $version != '' )) or  
43 - ( $origin != '' and ( $pin_release != '' or $version != '' )) or  
44 - ( $version != '' and ( $pin_release != '' or $origin != '' )) {  
45 - fail('parameters release, origin, and version are mutually exclusive')  
46 - }  
47 -  
48 - } else { # general form  
49 -  
50 - if $version != '' {  
51 - fail('parameter version cannot be used in general form')  
52 - }  
53 -  
54 - if ( $pin_release != '' and $origin != '' ) or  
55 - ( $origin != '' and $pin_release != '' ) {  
56 - fail('parmeters release and origin are mutually exclusive')  
57 - }  
58 -  
59 - }  
60 -  
61 - $path = $order ? {  
62 - '' => "${preferences_d}/${name}.pref",  
63 - default => "${preferences_d}/${order}-${name}.pref",  
64 - }  
65 - file { "${name}.pref":  
66 - ensure => $ensure,  
67 - path => $path,  
68 - owner => root,  
69 - group => root,  
70 - mode => '0644',  
71 - content => template('apt/pin.pref.erb'),  
72 - }  
73 -}  
puppet/modules/apt/manifests/ppa.pp
@@ -1,63 +0,0 @@ @@ -1,63 +0,0 @@
1 -# ppa.pp  
2 -  
3 -define apt::ppa(  
4 - $release = $::lsbdistcodename,  
5 - $options = '-y'  
6 -) {  
7 - include apt::params  
8 - include apt::update  
9 -  
10 - $sources_list_d = $apt::params::sources_list_d  
11 -  
12 - if ! $release {  
13 - fail('lsbdistcodename fact not available: release parameter required')  
14 - }  
15 -  
16 - $filename_without_slashes = regsubst($name, '/', '-', 'G')  
17 - $filename_without_dots = regsubst($filename_without_slashes, '\.', '_', 'G')  
18 - $filename_without_ppa = regsubst($filename_without_dots, '^ppa:', '', 'G')  
19 - $sources_list_d_filename = "${filename_without_ppa}-${release}.list"  
20 -  
21 - $package = $::lsbdistrelease ? {  
22 - /^[1-9]\..*|1[01]\..*|12.04$/ => 'python-software-properties',  
23 - default => 'software-properties-common',  
24 - }  
25 -  
26 - if ! defined(Package[$package]) {  
27 - package { $package: }  
28 - }  
29 -  
30 - if defined(Class[apt]) {  
31 - $proxy_host = getparam(Class[apt], 'proxy_host')  
32 - $proxy_port = getparam(Class[apt], 'proxy_port')  
33 - case $proxy_host {  
34 - false, '': {  
35 - $proxy_env = []  
36 - }  
37 - default: {$proxy_env = ["http_proxy=http://${proxy_host}:${proxy_port}", "https_proxy=http://${proxy_host}:${proxy_port}"]}  
38 - }  
39 - } else {  
40 - $proxy_env = []  
41 - }  
42 - exec { "add-apt-repository-${name}":  
43 - environment => $proxy_env,  
44 - command => "/usr/bin/add-apt-repository ${options} ${name}",  
45 - unless => "/usr/bin/test -s ${sources_list_d}/${sources_list_d_filename}",  
46 - logoutput => 'on_failure',  
47 - notify => Exec['apt_update'],  
48 - require => [  
49 - File[$sources_list_d],  
50 - Package[$package],  
51 - ],  
52 - }  
53 -  
54 - file { "${sources_list_d}/${sources_list_d_filename}":  
55 - ensure => file,  
56 - require => Exec["add-apt-repository-${name}"],  
57 - }  
58 -  
59 - # Need anchor to provide containment for dependencies.  
60 - anchor { "apt::ppa::${name}":  
61 - require => Class['apt::update'],  
62 - }  
63 -}  
puppet/modules/apt/manifests/release.pp
@@ -1,17 +0,0 @@ @@ -1,17 +0,0 @@
1 -# release.pp  
2 -  
3 -class apt::release (  
4 - $release_id  
5 -) {  
6 -  
7 - include apt::params  
8 -  
9 - $root = $apt::params::root  
10 -  
11 - file { "${root}/apt.conf.d/01release":  
12 - owner => root,  
13 - group => root,  
14 - mode => '0644',  
15 - content => "APT::Default-Release \"${release_id}\";"  
16 - }  
17 -}  
puppet/modules/apt/manifests/source.pp
@@ -1,85 +0,0 @@ @@ -1,85 +0,0 @@
1 -# source.pp  
2 -# add an apt source  
3 -  
4 -define apt::source(  
5 - $ensure = present,  
6 - $location = '',  
7 - $release = 'UNDEF',  
8 - $repos = 'main',  
9 - $include_src = true,  
10 - $required_packages = false,  
11 - $key = false,  
12 - $key_server = 'keyserver.ubuntu.com',  
13 - $key_content = false,  
14 - $key_source = false,  
15 - $pin = false,  
16 - $architecture = undef  
17 -) {  
18 -  
19 - include apt::params  
20 - include apt::update  
21 -  
22 - $sources_list_d = $apt::params::sources_list_d  
23 - $provider = $apt::params::provider  
24 -  
25 - if $release == 'UNDEF' {  
26 - if $::lsbdistcodename == undef {  
27 - fail('lsbdistcodename fact not available: release parameter required')  
28 - } else {  
29 - $release_real = $::lsbdistcodename  
30 - }  
31 - } else {  
32 - $release_real = $release  
33 - }  
34 -  
35 - file { "${name}.list":  
36 - ensure => $ensure,  
37 - path => "${sources_list_d}/${name}.list",  
38 - owner => root,  
39 - group => root,  
40 - mode => '0644',  
41 - content => template("${module_name}/source.list.erb"),  
42 - notify => Exec['apt_update'],  
43 - }  
44 -  
45 -  
46 - if ($pin != false) {  
47 - # Get the host portion out of the url so we can pin to origin  
48 - $url_split = split($location, '/')  
49 - $host = $url_split[2]  
50 -  
51 - apt::pin { $name:  
52 - ensure => $ensure,  
53 - priority => $pin,  
54 - before => File["${name}.list"],  
55 - origin => $host,  
56 - }  
57 - }  
58 -  
59 - if ($required_packages != false) and ($ensure == 'present') {  
60 - exec { "Required packages: '${required_packages}' for ${name}":  
61 - command => "${provider} -y install ${required_packages}",  
62 - logoutput => 'on_failure',  
63 - refreshonly => true,  
64 - subscribe => File["${name}.list"],  
65 - before => Exec['apt_update'],  
66 - }  
67 - }  
68 -  
69 - # We do not want to remove keys when the source is absent.  
70 - if ($key != false) and ($ensure == 'present') {  
71 - apt::key { "Add key: ${key} from Apt::Source ${title}":  
72 - ensure => present,  
73 - key => $key,  
74 - key_server => $key_server,  
75 - key_content => $key_content,  
76 - key_source => $key_source,  
77 - before => File["${name}.list"],  
78 - }  
79 - }  
80 -  
81 - # Need anchor to provide containment for dependencies.  
82 - anchor { "apt::source::${name}":  
83 - require => Class['apt::update'],  
84 - }  
85 -}  
puppet/modules/apt/manifests/unattended_upgrades.pp
@@ -1,68 +0,0 @@ @@ -1,68 +0,0 @@
1 -# Class: apt::unattended_upgrades  
2 -#  
3 -# This class manages the unattended-upgrades package and related configuration  
4 -# files for ubuntu  
5 -#  
6 -# origins are the repositories to automatically upgrade included packages  
7 -# blacklist is a list of packages to not automatically upgrade  
8 -# update is how often to run "apt-get update" in days  
9 -# download is how often to run "apt-get upgrade --download-only" in days  
10 -# upgrade is how often to upgrade packages included in the origins list in days  
11 -# autoclean is how often to run "apt-get autoclean" in days  
12 -#  
13 -# information on the other options can be found in the 50unattended-upgrades  
14 -# file and in /etc/cron.daily/apt  
15 -#  
16 -class apt::unattended_upgrades (  
17 - $origins = ['${distro_id}:${distro_codename}-security'],  
18 - $blacklist = [],  
19 - $update = "1",  
20 - $download = "1",  
21 - $upgrade = "1",  
22 - $autoclean = "7",  
23 - $auto_fix = true,  
24 - $minimal_steps = false,  
25 - $install_on_shutdown = false,  
26 - $mail_to = "NONE",  
27 - $mail_only_on_error = false,  
28 - $remove_unused = true,  
29 - $auto_reboot = false,  
30 - $dl_limit = "NONE",  
31 - $enable = "1",  
32 - $backup_interval = "0",  
33 - $backup_level = "3",  
34 - $max_age = "0",  
35 - $min_age = "0",  
36 - $max_size = "0",  
37 - $download_delta = "0",  
38 - $verbose = "0",  
39 -) {  
40 -  
41 - validate_bool(  
42 - $auto_fix,  
43 - $minimal_steps,  
44 - $install_on_shutdown,  
45 - $mail_only_on_error,  
46 - $remove_unused,  
47 - $auto_reboot  
48 - )  
49 -  
50 - package { 'unattended-upgrades':  
51 - ensure => present,  
52 - }  
53 -  
54 - File {  
55 - ensure => file,  
56 - owner => 'root',  
57 - group => 'root',  
58 - mode => '0644',  
59 - require => Package['unattended-upgrades'],  
60 - }  
61 -  
62 - file {  
63 - '/etc/apt/apt.conf.d/50unattended-upgrades':  
64 - content => template('apt/50unattended-upgrades.erb');  
65 - '/etc/apt/apt.conf.d/10periodic':  
66 - content => template('apt/10periodic.erb');  
67 - }  
68 -}  
puppet/modules/apt/manifests/update.pp
@@ -1,10 +0,0 @@ @@ -1,10 +0,0 @@
1 -class apt::update {  
2 - include apt::params  
3 -  
4 - exec { 'apt_update':  
5 - command => "${apt::params::provider} update",  
6 - logoutput => 'on_failure',  
7 - refreshonly => true,  
8 - timeout => $apt::update_timeout,  
9 - }  
10 -}  
puppet/modules/apt/metadata.json
@@ -1,87 +0,0 @@ @@ -1,87 +0,0 @@
1 -{  
2 - "name": "puppetlabs-apt",  
3 - "version": "1.4.0",  
4 - "summary": "Puppet Labs Apt Module",  
5 - "author": "Evolving Web / Puppet Labs",  
6 - "description": "APT Module for Puppet",  
7 - "dependencies": [  
8 - {  
9 - "name": "puppetlabs/stdlib",  
10 - "version_requirement": "\u003e\u003d 2.2.1"  
11 - }  
12 - ],  
13 - "types": [],  
14 - "checksums": {  
15 - ".bundle/config": "7f1c988748783d2a8d455376eed1470c",  
16 - ".fixtures.yml": "0c43f56b0bb8e8d04e8051a0e7aa37a5",  
17 - ".forge-release/pom.xml": "c650a84961ad88de03192e23b63b3549",  
18 - ".forge-release/publish": "1c1d6dd64ef52246db485eb5459aa941",  
19 - ".forge-release/settings.xml": "06d768a57d582fe1ee078b563427e750",  
20 - ".forge-release/validate": "7fffde8112f42a1ec986d49ba80ac219",  
21 - ".nodeset.yml": "78d78c172336a387a1067464434ffbcb",  
22 - ".travis.yml": "782420dcc9d6412c79c30f03b1f3613c",  
23 - "CHANGELOG": "f5488e1e891a8f8c47143dac790ddab3",  
24 - "Gemfile": "1bfa7eb6e30346c9ddb4a8b144b0d255",  
25 - "Gemfile.lock": "8ff8bc3d32bb7412bd97e48190a93b2f",  
26 - "LICENSE": "20bcc606fc61ffba2b8cea840e8dce4d",  
27 - "Modulefile": "b34e93626fbc137cbb651952e7509839",  
28 - "README.md": "65176b395f7202fe5d222ae7b0de4e05",  
29 - "Rakefile": "0428ea3759a4692c91604396c406a9c1",  
30 - "manifests/backports.pp": "09f1d86603d0f44a2169acb3eeea2a70",  
31 - "manifests/builddep.pp": "4f313b5140c84aa7d5793b5a073c30dd",  
32 - "manifests/conf.pp": "5ddf258195d414d93284dfd281a8d6e3",  
33 - "manifests/debian/testing.pp": "aeb625bacb6a8df46c864ee9ee1cb5a5",  
34 - "manifests/debian/unstable.pp": "108038596b05dc1d28975884693f73f5",  
35 - "manifests/force.pp": "cf871e869f4114f32ab164de2a67e7e2",  
36 - "manifests/init.pp": "5ec106a7a03313c544159a9a1f6b78e6",  
37 - "manifests/key.pp": "3cf082ed91a3933ab7218d1be3464f4f",  
38 - "manifests/params.pp": "ca4ce3730a65c43f884ab3e6445f1661",  
39 - "manifests/pin.pp": "dea8cbaabc37010ce25838080608802b",  
40 - "manifests/ppa.pp": "754a83944ae79b5001fc0c0a8c775985",  
41 - "manifests/release.pp": "427f3ee70a6a1e55fa291e58655bd5d9",  
42 - "manifests/source.pp": "6eab8d33c173a066f5dec8474efdedb6",  
43 - "manifests/unattended_upgrades.pp": "e97f908b42010ff9a85be4afd2c721ab",  
44 - "manifests/update.pp": "436c79f160f2cb603710795a9ec71ac7",  
45 - "spec/classes/apt_spec.rb": "54841b04b42026770ed6d744a82c55df",  
46 - "spec/classes/backports_spec.rb": "7d2454a881cc26edd3dcd3acb7ffd20f",  
47 - "spec/classes/debian_testing_spec.rb": "fad1384cb9d3c99b2663d7df4762dc0e",  
48 - "spec/classes/debian_unstable_spec.rb": "11131efffd18db3c96e2bbe3d98a2fb7",  
49 - "spec/classes/params_spec.rb": "a25396d3f0bbac784a7951f03ad7e8f4",  
50 - "spec/classes/release_spec.rb": "d8f01a3cf0c2f6f6952b835196163ce4",  
51 - "spec/classes/unattended_upgrades_spec.rb": "a2e206bda79d24cdb43312d035eff66f",  
52 - "spec/defines/builddep_spec.rb": "e1300bb4f3abbd34029b11d8b733a6e5",  
53 - "spec/defines/conf_spec.rb": "b7fc9fb6cb270c276aacbfa4a43f228c",  
54 - "spec/defines/force_spec.rb": "97098c5b123be49e321e71cda288fe53",  
55 - "spec/defines/key_spec.rb": "7800c30647b1ddf799b991110109cba0",  
56 - "spec/defines/pin_spec.rb": "c912e59e9e3d1145280d659cccabe72b",  
57 - "spec/defines/ppa_spec.rb": "72ce037a1d6ea0a33f369b1f3d98b3d6",  
58 - "spec/defines/source_spec.rb": "e553bb9598dbe2becba6ae7f91d4deb0",  
59 - "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc",  
60 - "spec/spec_helper_system.rb": "e67d2574baae312f1095f90d78fdf5e9",  
61 - "spec/system/apt_builddep_spec.rb": "97be5a48d2d16d96cb7c35ccdbcdcb69",  
62 - "spec/system/apt_key_spec.rb": "098835d0c53c69390d4c3b6ea8ef3815",  
63 - "spec/system/apt_ppa_spec.rb": "c96f6d0bbdafac39beaf0d5e6eba9010",  
64 - "spec/system/apt_source_spec.rb": "df5aa98b03688884903c564bb507469f",  
65 - "spec/system/basic_spec.rb": "0a5b33d18254bedcb7886e34846ebff6",  
66 - "spec/system/class_spec.rb": "2ba4265236f00685c23cb00f908defc1",  
67 - "templates/10periodic.erb": "2aeea866a39f19a62254abbb4f1bc59d",  
68 - "templates/50unattended-upgrades.erb": "ae995ade214fdaefab51d335c85819ae",  
69 - "templates/pin.pref.erb": "623249839cee7788fa0805a3474396db",  
70 - "templates/source.list.erb": "65a016e60daf065c481f3d5f2c883324",  
71 - "tests/builddep.pp": "4773f57072111e58f2ed833fa4489a88",  
72 - "tests/debian/testing.pp": "1cbee56baddd6a91d981db8fddec70fb",  
73 - "tests/debian/unstable.pp": "4b2a090afeb315752262386f4dbcd8ca",  
74 - "tests/force.pp": "2bb6cf0b3d655cb51f95aeb79035e600",  
75 - "tests/init.pp": "551138eb704e71ab3687932dda429a81",  
76 - "tests/key.pp": "371a695e1332d51a38e283a87be52798",  
77 - "tests/params.pp": "900db40f3fc84b0be173278df2ebff35",  
78 - "tests/pin.pp": "4b4c3612d75a19dba8eb7227070fa4ab",  
79 - "tests/ppa.pp": "b902cce8159128b5e8b21bed540743ff",  
80 - "tests/release.pp": "53ce5debe6fa5bee42821767599cc768",  
81 - "tests/source.pp": "9cecd9aa0dcde250fe49be9e26971a98",  
82 - "tests/unattended-upgrades.pp": "cdc853f1b58e5206c5a538621ddca161"  
83 - },  
84 - "source": "https://github.com/puppetlabs/puppetlabs-apt",  
85 - "project_page": "https://github.com/puppetlabs/puppetlabs-apt",  
86 - "license": "Apache License 2.0"  
87 -}  
88 \ No newline at end of file 0 \ No newline at end of file
puppet/modules/apt/spec/classes/apt_spec.rb
@@ -1,133 +0,0 @@ @@ -1,133 +0,0 @@
1 -require 'spec_helper'  
2 -describe 'apt', :type => :class do  
3 - let :default_params do  
4 - {  
5 - :disable_keys => :undef,  
6 - :always_apt_update => false,  
7 - :purge_sources_list => false,  
8 - :purge_sources_list_d => false,  
9 - }  
10 - end  
11 -  
12 - [{},  
13 - {  
14 - :disable_keys => true,  
15 - :always_apt_update => true,  
16 - :proxy_host => true,  
17 - :proxy_port => '3128',  
18 - :purge_sources_list => true,  
19 - :purge_sources_list_d => true,  
20 - },  
21 - {  
22 - :disable_keys => false  
23 - }  
24 - ].each do |param_set|  
25 - describe "when #{param_set == {} ? "using default" : "specifying"} class parameters" do  
26 - let :param_hash do  
27 - default_params.merge(param_set)  
28 - end  
29 -  
30 - let :params do  
31 - param_set  
32 - end  
33 -  
34 - let :refresh_only_apt_update do  
35 - if param_hash[:always_apt_update]  
36 - false  
37 - else  
38 - true  
39 - end  
40 - end  
41 -  
42 - it { should include_class("apt::params") }  
43 -  
44 - it {  
45 - if param_hash[:purge_sources_list]  
46 - should contain_file("sources.list").with({  
47 - 'path' => "/etc/apt/sources.list",  
48 - 'ensure' => "present",  
49 - 'owner' => "root",  
50 - 'group' => "root",  
51 - 'mode' => "0644",  
52 - "content" => "# Repos managed by puppet.\n"  
53 - })  
54 - else  
55 - should contain_file("sources.list").with({  
56 - 'path' => "/etc/apt/sources.list",  
57 - 'ensure' => "present",  
58 - 'owner' => "root",  
59 - 'group' => "root",  
60 - 'mode' => "0644",  
61 - 'content' => nil  
62 - })  
63 - end  
64 - }  
65 - it {  
66 - if param_hash[:purge_sources_list_d]  
67 - should create_file("sources.list.d").with({  
68 - 'path' => "/etc/apt/sources.list.d",  
69 - 'ensure' => "directory",  
70 - 'owner' => "root",  
71 - 'group' => "root",  
72 - 'purge' => true,  
73 - 'recurse' => true,  
74 - 'notify' => 'Exec[apt_update]'  
75 - })  
76 - else  
77 - should create_file("sources.list.d").with({  
78 - 'path' => "/etc/apt/sources.list.d",  
79 - 'ensure' => "directory",  
80 - 'owner' => "root",  
81 - 'group' => "root",  
82 - 'purge' => false,  
83 - 'recurse' => false,  
84 - 'notify' => 'Exec[apt_update]'  
85 - })  
86 - end  
87 - }  
88 -  
89 - it {  
90 - should contain_exec("apt_update").with({  
91 - 'command' => "/usr/bin/apt-get update",  
92 - 'refreshonly' => refresh_only_apt_update  
93 - })  
94 - }  
95 -  
96 - it {  
97 - if param_hash[:disable_keys] == true  
98 - should create_file("99unauth").with({  
99 - 'content' => "APT::Get::AllowUnauthenticated 1;\n",  
100 - 'ensure' => "present",  
101 - 'path' => "/etc/apt/apt.conf.d/99unauth"  
102 - })  
103 - elsif param_hash[:disable_keys] == false  
104 - should create_file("99unauth").with({  
105 - 'ensure' => "absent",  
106 - 'path' => "/etc/apt/apt.conf.d/99unauth"  
107 - })  
108 - elsif param_hash[:disable_keys] != :undef  
109 - should_not create_file("99unauth").with({  
110 - 'path' => "/etc/apt/apt.conf.d/99unauth"  
111 - })  
112 - end  
113 - }  
114 - describe 'when setting a proxy' do  
115 - it {  
116 - if param_hash[:proxy_host]  
117 - should contain_file('configure-apt-proxy').with(  
118 - 'path' => '/etc/apt/apt.conf.d/proxy',  
119 - 'content' => "Acquire::http::Proxy \"http://#{param_hash[:proxy_host]}:#{param_hash[:proxy_port]}\";",  
120 - 'notify' => "Exec[apt_update]"  
121 - )  
122 - else  
123 - should contain_file('configure-apt-proxy').with(  
124 - 'path' => '/etc/apt/apt.conf.d/proxy',  
125 - 'notify' => 'Exec[apt_update]',  
126 - 'ensure' => 'absent'  
127 - )  
128 - end  
129 - }  
130 - end  
131 - end  
132 - end  
133 -end  
puppet/modules/apt/spec/classes/backports_spec.rb
@@ -1,71 +0,0 @@ @@ -1,71 +0,0 @@
1 -require 'spec_helper'  
2 -describe 'apt::backports', :type => :class do  
3 -  
4 - describe 'when turning on backports for ubuntu karmic' do  
5 -  
6 - let :facts do  
7 - {  
8 - 'lsbdistcodename' => 'Karmic',  
9 - 'lsbdistid' => 'Ubuntu'  
10 - }  
11 - end  
12 -  
13 - it { should contain_apt__source('backports').with({  
14 - 'location' => 'http://old-releases.ubuntu.com/ubuntu',  
15 - 'release' => 'karmic-backports',  
16 - 'repos' => 'main universe multiverse restricted',  
17 - 'key' => '437D05B5',  
18 - 'key_server' => 'pgp.mit.edu',  
19 - 'pin' => '200',  
20 - })  
21 - }  
22 - end  
23 -  
24 - describe "when turning on backports for debian squeeze" do  
25 -  
26 - let :facts do  
27 - {  
28 - 'lsbdistcodename' => 'Squeeze',  
29 - 'lsbdistid' => 'Debian',  
30 - }  
31 - end  
32 -  
33 - it { should contain_apt__source('backports').with({  
34 - 'location' => 'http://backports.debian.org/debian-backports',  
35 - 'release' => 'squeeze-backports',  
36 - 'repos' => 'main contrib non-free',  
37 - 'key' => '55BE302B',  
38 - 'key_server' => 'pgp.mit.edu',  
39 - 'pin' => '200',  
40 - })  
41 - }  
42 - end  
43 -  
44 - describe "when turning on backports for debian squeeze but using your own mirror" do  
45 -  
46 - let :facts do  
47 - {  
48 - 'lsbdistcodename' => 'Squeeze',  
49 - 'lsbdistid' => 'Debian'  
50 - }  
51 - end  
52 -  
53 - let :location do  
54 - 'http://mirrors.example.com/debian-backports'  
55 - end  
56 -  
57 - let :params do  
58 - { 'location' => location }  
59 - end  
60 -  
61 - it { should contain_apt__source('backports').with({  
62 - 'location' => location,  
63 - 'release' => 'squeeze-backports',  
64 - 'repos' => 'main contrib non-free',  
65 - 'key' => '55BE302B',  
66 - 'key_server' => 'pgp.mit.edu',  
67 - 'pin' => '200',  
68 - })  
69 - }  
70 - end  
71 -end  
puppet/modules/apt/spec/classes/debian_testing_spec.rb
@@ -1,14 +0,0 @@ @@ -1,14 +0,0 @@
1 -require 'spec_helper'  
2 -describe 'apt::debian::testing', :type => :class do  
3 - it {  
4 - should contain_apt__source("debian_testing").with({  
5 - "location" => "http://debian.mirror.iweb.ca/debian/",  
6 - "release" => "testing",  
7 - "repos" => "main contrib non-free",  
8 - "required_packages" => "debian-keyring debian-archive-keyring",  
9 - "key" => "55BE302B",  
10 - "key_server" => "subkeys.pgp.net",  
11 - "pin" => "-10"  
12 - })  
13 - }  
14 -end  
puppet/modules/apt/spec/classes/debian_unstable_spec.rb
@@ -1,14 +0,0 @@ @@ -1,14 +0,0 @@
1 -require 'spec_helper'  
2 -describe 'apt::debian::unstable', :type => :class do  
3 - it {  
4 - should contain_apt__source("debian_unstable").with({  
5 - "location" => "http://debian.mirror.iweb.ca/debian/",  
6 - "release" => "unstable",  
7 - "repos" => "main contrib non-free",  
8 - "required_packages" => "debian-keyring debian-archive-keyring",  
9 - "key" => "55BE302B",  
10 - "key_server" => "subkeys.pgp.net",  
11 - "pin" => "-10"  
12 - })  
13 - }  
14 -end  
puppet/modules/apt/spec/classes/params_spec.rb
@@ -1,13 +0,0 @@ @@ -1,13 +0,0 @@
1 -require 'spec_helper'  
2 -describe 'apt::params', :type => :class do  
3 - let (:title) { 'my_package' }  
4 -  
5 - it { should contain_apt__params }  
6 -  
7 - # There are 4 resources in this class currently  
8 - # there should not be any more resources because it is a params class  
9 - # The resources are class[apt::params], class[main], class[settings], stage[main]  
10 - it "Should not contain any resources" do  
11 - subject.resources.size.should == 4  
12 - end  
13 -end  
puppet/modules/apt/spec/classes/release_spec.rb
@@ -1,22 +0,0 @@ @@ -1,22 +0,0 @@
1 -require 'spec_helper'  
2 -describe 'apt::release', :type => :class do  
3 - let (:title) { 'my_package' }  
4 -  
5 - let :param_set do  
6 - { :release_id => 'precise' }  
7 - end  
8 -  
9 - let (:params) { param_set }  
10 -  
11 - it { should include_class("apt::params") }  
12 -  
13 - it {  
14 - should contain_file("/etc/apt/apt.conf.d/01release").with({  
15 - "mode" => "0644",  
16 - "owner" => "root",  
17 - "group" => "root",  
18 - "content" => "APT::Default-Release \"#{param_set[:release_id]}\";"  
19 - })  
20 - }  
21 -end  
22 -  
puppet/modules/apt/spec/classes/unattended_upgrades_spec.rb
@@ -1,204 +0,0 @@ @@ -1,204 +0,0 @@
1 -require 'spec_helper'  
2 -describe 'apt::unattended_upgrades', :type => :class do  
3 - let(:file_unattended) { '/etc/apt/apt.conf.d/50unattended-upgrades' }  
4 - let(:file_periodic) { '/etc/apt/apt.conf.d/10periodic' }  
5 -  
6 - it { should contain_package("unattended-upgrades") }  
7 -  
8 - it {  
9 - should create_file("/etc/apt/apt.conf.d/50unattended-upgrades").with({  
10 - "owner" => "root",  
11 - "group" => "root",  
12 - "mode" => "0644",  
13 - "require" => "Package[unattended-upgrades]",  
14 - })  
15 - }  
16 -  
17 - it {  
18 - should create_file("/etc/apt/apt.conf.d/10periodic").with({  
19 - "owner" => "root",  
20 - "group" => "root",  
21 - "mode" => "0644",  
22 - "require" => "Package[unattended-upgrades]",  
23 - })  
24 - }  
25 -  
26 - describe "origins" do  
27 - describe "with param defaults" do  
28 - let(:params) {{ }}  
29 - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Allowed-Origins \{\n\t"\${distro_id}:\${distro_codename}-security";\n\};$/) }  
30 - end  
31 -  
32 - describe "with origins => ['ubuntu:precise-security']" do  
33 - let :params do  
34 - { :origins => ['ubuntu:precise-security'] }  
35 - end  
36 - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Allowed-Origins \{\n\t"ubuntu:precise-security";\n\};$/) }  
37 - end  
38 - end  
39 -  
40 - describe "blacklist" do  
41 - describe "with param defaults" do  
42 - let(:params) {{ }}  
43 - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Package-Blacklist \{\n\};$/) }  
44 - end  
45 -  
46 - describe "with blacklist => []" do  
47 - let :params do  
48 - { :blacklist => ['libc6', 'libc6-dev'] }  
49 - end  
50 - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Package-Blacklist \{\n\t"libc6";\n\t"libc6-dev";\n\};$/) }  
51 - end  
52 - end  
53 -  
54 - describe "with update => 2" do  
55 - let :params do  
56 - { :update => "2" }  
57 - end  
58 - it { should contain_file(file_periodic).with_content(/^APT::Periodic::Update-Package-Lists "2";$/) }  
59 - end  
60 -  
61 - describe "with download => 2" do  
62 - let :params do  
63 - { :download => "2" }  
64 - end  
65 - it { should contain_file(file_periodic).with_content(/^APT::Periodic::Download-Upgradeable-Packages "2";$/) }  
66 - end  
67 -  
68 - describe "with upgrade => 2" do  
69 - let :params do  
70 - { :upgrade => "2" }  
71 - end  
72 - it { should contain_file(file_periodic).with_content(/^APT::Periodic::Unattended-Upgrade "2";$/) }  
73 - end  
74 -  
75 - describe "with autoclean => 2" do  
76 - let :params do  
77 - { :autoclean => "2" }  
78 - end  
79 - it { should contain_file(file_periodic).with_content(/^APT::Periodic::AutocleanInterval "2";$/) }  
80 - end  
81 -  
82 - describe "with auto_fix => false" do  
83 - let :params do  
84 - { :auto_fix => false }  
85 - end  
86 - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::AutoFixInterruptedDpkg "false";$/) }  
87 - end  
88 -  
89 - describe "with minimal_steps => true" do  
90 - let :params do  
91 - { :minimal_steps => true }  
92 - end  
93 - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::MinimalSteps "true";$/) }  
94 - end  
95 -  
96 - describe "with install_on_shutdown => true" do  
97 - let :params do  
98 - { :install_on_shutdown => true }  
99 - end  
100 - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::InstallOnShutdown "true";$/) }  
101 - end  
102 -  
103 - describe "mail_to" do  
104 - describe "param defaults" do  
105 - let(:params) {{ }}  
106 - it { should_not contain_file(file_unattended).with_content(/^Unattended-Upgrade::Mail /) }  
107 - it { should_not contain_file(file_unattended).with_content(/^Unattended-Upgrade::MailOnlyOnError /) }  
108 - end  
109 -  
110 - describe "with mail_to => user@website, mail_only_on_error => true" do  
111 - let :params do  
112 - { :mail_to => "user@website",  
113 - :mail_only_on_error => true }  
114 - end  
115 - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Mail "user@website";$/) }  
116 - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::MailOnlyOnError "true";$/) }  
117 - end  
118 - end  
119 -  
120 - describe "with remove_unused => false" do  
121 - let :params do  
122 - { :remove_unused => false }  
123 - end  
124 - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Remove-Unused-Dependencies "false";$/) }  
125 - end  
126 -  
127 - describe "with auto_reboot => true" do  
128 - let :params do  
129 - { :auto_reboot => true }  
130 - end  
131 - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Automatic-Reboot "true";$/) }  
132 - end  
133 -  
134 - describe "dl_limit" do  
135 - describe "param defaults" do  
136 - let(:params) {{ }}  
137 - it { should_not contain_file(file_unattended).with_content(/^Acquire::http::Dl-Limit /) }  
138 - end  
139 -  
140 - describe "with dl_limit => 70" do  
141 - let :params do  
142 - { :dl_limit => "70" }  
143 - end  
144 - it { should contain_file(file_unattended).with_content(/^Acquire::http::Dl-Limit "70";$/) }  
145 - end  
146 - end  
147 -  
148 - describe "with enable => 0" do  
149 - let :params do  
150 - { :enable => "0" }  
151 - end  
152 - it { should contain_file(file_periodic).with_content(/^APT::Periodic::Enable "0";$/) }  
153 - end  
154 -  
155 - describe "with backup_interval => 1" do  
156 - let :params do  
157 - { :backup_interval => "1" }  
158 - end  
159 - it { should contain_file(file_periodic).with_content(/^APT::Periodic::BackUpArchiveInterval "1";$/) }  
160 - end  
161 -  
162 - describe "with backup_level => 0" do  
163 - let :params do  
164 - { :backup_level => "0" }  
165 - end  
166 - it { should contain_file(file_periodic).with_content(/^APT::Periodic::BackUpLevel "0";$/) }  
167 - end  
168 -  
169 - describe "with max_age => 1" do  
170 - let :params do  
171 - { :max_age => "1" }  
172 - end  
173 - it { should contain_file(file_periodic).with_content(/^APT::Periodic::MaxAge "1";$/) }  
174 - end  
175 -  
176 - describe "with min_age => 1" do  
177 - let :params do  
178 - { :min_age => "1" }  
179 - end  
180 - it { should contain_file(file_periodic).with_content(/^APT::Periodic::MinAge "1";$/) }  
181 - end  
182 -  
183 - describe "with max_size => 1" do  
184 - let :params do  
185 - { :max_size => "1" }  
186 - end  
187 - it { should contain_file(file_periodic).with_content(/^APT::Periodic::MaxSize "1";$/) }  
188 - end  
189 -  
190 - describe "with download_delta => 2" do  
191 - let :params do  
192 - { :download_delta => "2" }  
193 - end  
194 - it { should contain_file(file_periodic).with_content(/^APT::Periodic::Download-Upgradeable-Packages-Debdelta "2";$/) }  
195 - end  
196 -  
197 - describe "with verbose => 2" do  
198 - let :params do  
199 - { :verbose => "2" }  
200 - end  
201 - it { should contain_file(file_periodic).with_content(/^APT::Periodic::Verbose "2";$/) }  
202 - end  
203 -  
204 -end  
puppet/modules/apt/spec/defines/builddep_spec.rb
@@ -1,18 +0,0 @@ @@ -1,18 +0,0 @@
1 -require 'spec_helper'  
2 -describe 'apt::builddep', :type => :define do  
3 -  
4 - let(:title) { 'my_package' }  
5 -  
6 - describe "should require apt-get update" do  
7 - it { should contain_exec("apt_update").with({  
8 - 'command' => "/usr/bin/apt-get update",  
9 - 'refreshonly' => true  
10 - })  
11 - }  
12 - it { should contain_anchor("apt::builddep::my_package").with({  
13 - 'require' => 'Class[Apt::Update]',  
14 - })  
15 - }  
16 - end  
17 -  
18 -end  
puppet/modules/apt/spec/defines/conf_spec.rb
@@ -1,57 +0,0 @@ @@ -1,57 +0,0 @@
1 -require 'spec_helper'  
2 -describe 'apt::conf', :type => :define do  
3 - let :title do  
4 - 'norecommends'  
5 - end  
6 -  
7 - describe "when creating an apt preference" do  
8 - let :params do  
9 - {  
10 - :priority => '00',  
11 - :content => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n"  
12 - }  
13 - end  
14 -  
15 - let :filename do  
16 - "/etc/apt/apt.conf.d/00norecommends"  
17 - end  
18 -  
19 - it { should contain_apt__conf('norecommends').with({  
20 - 'priority' => '00',  
21 - 'content' => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n"  
22 - })  
23 - }  
24 -  
25 - it { should contain_file(filename).with({  
26 - 'ensure' => 'present',  
27 - 'content' => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n",  
28 - 'owner' => 'root',  
29 - 'group' => 'root',  
30 - 'mode' => '0644',  
31 - })  
32 - }  
33 - end  
34 -  
35 - describe "when removing an apt preference" do  
36 - let :params do  
37 - {  
38 - :ensure => 'absent',  
39 - :priority => '00',  
40 - :content => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n"  
41 - }  
42 - end  
43 -  
44 - let :filename do  
45 - "/etc/apt/apt.conf.d/00norecommends"  
46 - end  
47 -  
48 - it { should contain_file(filename).with({  
49 - 'ensure' => 'absent',  
50 - 'content' => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n",  
51 - 'owner' => 'root',  
52 - 'group' => 'root',  
53 - 'mode' => '0644',  
54 - })  
55 - }  
56 - end  
57 -end  
puppet/modules/apt/spec/defines/force_spec.rb
@@ -1,41 +0,0 @@ @@ -1,41 +0,0 @@
1 -require 'spec_helper'  
2 -describe 'apt::force', :type => :define do  
3 - let :title do  
4 - 'my_package'  
5 - end  
6 -  
7 - let :default_params do  
8 - {  
9 - :release => 'testing',  
10 - :version => false  
11 - }  
12 - end  
13 -  
14 - [{},  
15 - {  
16 - :release => 'stable',  
17 - :version => '1'  
18 - }  
19 - ].each do |param_set|  
20 - describe "when #{param_set == {} ? "using default" : "specifying"} define parameters" do  
21 - let :param_hash do  
22 - default_params.merge(param_set)  
23 - end  
24 -  
25 - let :params do  
26 - param_set  
27 - end  
28 -  
29 - let :unless_query do  
30 - base_command = "/usr/bin/dpkg -s #{title} | grep -q "  
31 - base_command + (params[:version] ? "'Version: #{params[:version]}'" : "'Status: install'")  
32 - end  
33 -  
34 - let :exec_title do  
35 - base_exec = "/usr/bin/apt-get -y -t #{param_hash[:release]} install #{title}"  
36 - base_exec + (params[:version] ? "=#{params[:version]}" : "")  
37 - end  
38 - it { should contain_exec(exec_title).with_unless(unless_query) }  
39 - end  
40 - end  
41 -end  
puppet/modules/apt/spec/defines/key_spec.rb
@@ -1,123 +0,0 @@ @@ -1,123 +0,0 @@
1 -require 'spec_helper'  
2 -describe 'apt::key', :type => :define do  
3 - let :title do  
4 - '8347A27F'  
5 - end  
6 -  
7 - let :default_params do  
8 - {  
9 - :key => title,  
10 - :ensure => 'present',  
11 - :key_server => "keyserver.ubuntu.com",  
12 - :key_source => false,  
13 - :key_content => false  
14 - }  
15 - end  
16 -  
17 - [{},  
18 - {  
19 - :ensure => 'absent'  
20 - },  
21 - {  
22 - :ensure => 'random'  
23 - },  
24 - {  
25 - :key_source => 'ftp://ftp.example.org/key',  
26 - },  
27 - {  
28 - :key_content => 'deadbeef',  
29 - }  
30 - ].each do |param_set|  
31 -  
32 - let :param_hash do  
33 - param_hash = default_params.merge(param_set)  
34 - param_hash[:key].upcase! if param_hash[:key]  
35 - param_hash  
36 - end  
37 -  
38 - let :params do  
39 - param_set  
40 - end  
41 -  
42 - let :digest do  
43 - str = String.new  
44 - str << param_hash[:key].to_s << '/'  
45 - str << param_hash[:key_content].to_s << '/'  
46 - str << param_hash[:key_source].to_s << '/'  
47 - str << param_hash[:key_server].to_s << '/'  
48 - Digest::SHA1.hexdigest(str)  
49 - end  
50 -  
51 - describe "when #{param_set == {} ? "using default" : "specifying"} define parameters" do  
52 -  
53 - it {  
54 - if [:present, 'present', :absent, 'absent'].include? param_hash[:ensure]  
55 - should contain_apt__params  
56 - end  
57 - }  
58 -  
59 - it {  
60 - if [:present, 'present'].include? param_hash[:ensure]  
61 - should_not contain_exec("apt::key #{param_hash[:key]} absent")  
62 - should contain_anchor("apt::key #{param_hash[:key]} present")  
63 - should contain_exec(digest).with({  
64 - "path" => "/bin:/usr/bin",  
65 - "unless" => "/usr/bin/apt-key list | /bin/grep '#{param_hash[:key]}'"  
66 - })  
67 - elsif [:absent, 'absent'].include? param_hash[:ensure]  
68 - should_not contain_anchor("apt::key #{param_hash[:key]} present")  
69 - should contain_exec("apt::key #{param_hash[:key]} absent").with({  
70 - "path" => "/bin:/usr/bin",  
71 - "onlyif" => "apt-key list | grep '#{param_hash[:key]}'",  
72 - "command" => "apt-key del '#{param_hash[:key]}'"  
73 - })  
74 - else  
75 - expect { should raise_error(Puppet::Error) }  
76 - end  
77 - }  
78 -  
79 - it {  
80 - if [:present, 'present'].include? param_hash[:ensure]  
81 - if param_hash[:key_content]  
82 - should contain_exec(digest).with({  
83 - "command" => "echo '#{param_hash[:key_content]}' | /usr/bin/apt-key add -"  
84 - })  
85 - elsif param_hash[:key_source]  
86 - should contain_exec(digest).with({  
87 - "command" => "wget -q '#{param_hash[:key_source]}' -O- | apt-key add -"  
88 - })  
89 - elsif param_hash[:key_server]  
90 - should contain_exec(digest).with({  
91 - "command" => "apt-key adv --keyserver '#{param_hash[:key_server]}' --recv-keys '#{param_hash[:key]}'"  
92 - })  
93 - end  
94 - end  
95 - }  
96 -  
97 - end  
98 - end  
99 -  
100 - [{ :ensure => 'present' }, { :ensure => 'absent' }].each do |param_set|  
101 - describe "should correctly handle duplicate definitions" do  
102 -  
103 - let :pre_condition do  
104 - "apt::key { 'duplicate': key => '#{title}'; }"  
105 - end  
106 -  
107 - let(:params) { param_set }  
108 -  
109 - it {  
110 - if param_set[:ensure] == 'present'  
111 - should contain_anchor("apt::key #{title} present")  
112 - should contain_apt__key(title)  
113 - should contain_apt__key("duplicate")  
114 - elsif param_set[:ensure] == 'absent'  
115 - expect { should raise_error(Puppet::Error) }  
116 - end  
117 - }  
118 -  
119 - end  
120 - end  
121 -  
122 -end  
123 -  
puppet/modules/apt/spec/defines/pin_spec.rb
@@ -1,101 +0,0 @@ @@ -1,101 +0,0 @@
1 -require 'spec_helper'  
2 -describe 'apt::pin', :type => :define do  
3 - let(:title) { 'my_pin' }  
4 -  
5 - let :default_params do  
6 - {  
7 - :ensure => 'present',  
8 - :order => '',  
9 - :packages => '*',  
10 - :priority => '0',  
11 - :release => nil  
12 - }  
13 - end  
14 -  
15 - [  
16 - { :params => {},  
17 - :content => "# my_pin\nExplanation: : my_pin\nPackage: *\nPin: release a=my_pin\nPin-Priority: 0\n"  
18 - },  
19 - {  
20 - :params => {  
21 - :packages => 'apache',  
22 - :priority => '1'  
23 - },  
24 - :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_pin\nPin-Priority: 1\n"  
25 - },  
26 - {  
27 - :params => {  
28 - :order => 50,  
29 - :packages => 'apache',  
30 - :priority => '1'  
31 - },  
32 - :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_pin\nPin-Priority: 1\n"  
33 - },  
34 - {  
35 - :params => {  
36 - :ensure => 'absent',  
37 - :packages => 'apache',  
38 - :priority => '1'  
39 - },  
40 - :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_pin\nPin-Priority: 1\n"  
41 - },  
42 - {  
43 - :params => {  
44 - :packages => 'apache',  
45 - :priority => '1',  
46 - :release => 'my_newpin'  
47 - },  
48 - :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_newpin\nPin-Priority: 1\n"  
49 - },  
50 - {  
51 - :params => {  
52 - :packages => 'apache',  
53 - :priority => '1',  
54 - :version => '2.2.16*'  
55 - },  
56 - :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: version 2.2.16*\nPin-Priority: 1\n"  
57 - },  
58 - {  
59 - :params => {  
60 - :priority => '1',  
61 - :origin => 'ftp.de.debian.org'  
62 - },  
63 - :content => "# my_pin\nExplanation: : my_pin\nPackage: *\nPin: origin \"ftp.de.debian.org\"\nPin-Priority: 1\n"  
64 - },  
65 - {  
66 - :params => {  
67 - :packages => 'apache',  
68 - :priority => '1',  
69 - :release => 'stable',  
70 - :codename => 'wheezy',  
71 - :release_version => '3.0',  
72 - :component => 'main',  
73 - :originator => 'Debian',  
74 - :label => 'Debian'  
75 - },  
76 - :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=stable, n=wheezy, v=3.0, c=main, o=Debian, l=Debian\nPin-Priority: 1\n"  
77 - },  
78 - ].each do |param_set|  
79 - describe "when #{param_set == {} ? "using default" : "specifying"} define parameters" do  
80 - let :param_hash do  
81 - default_params.merge(param_set[:params])  
82 - end  
83 -  
84 - let :params do  
85 - param_set[:params]  
86 - end  
87 -  
88 - it { should include_class("apt::params") }  
89 -  
90 - it { should contain_file("#{title}.pref").with({  
91 - 'ensure' => param_hash[:ensure],  
92 - 'path' => "/etc/apt/preferences.d/#{param_hash[:order] == '' ? "" : "#{param_hash[:order]}-"}#{title}.pref",  
93 - 'owner' => 'root',  
94 - 'group' => 'root',  
95 - 'mode' => '0644',  
96 - 'content' => param_set[:content],  
97 - })  
98 - }  
99 - end  
100 - end  
101 -end  
puppet/modules/apt/spec/defines/ppa_spec.rb
@@ -1,143 +0,0 @@ @@ -1,143 +0,0 @@
1 -require 'spec_helper'  
2 -describe 'apt::ppa', :type => :define do  
3 - [ { :lsbdistrelease => '11.04',  
4 - :lsbdistcodename => 'natty',  
5 - :package => 'python-software-properties'},  
6 - { :lsbdistrelease => '12.10',  
7 - :lsbdistcodename => 'quantal',  
8 - :package => 'software-properties-common'},  
9 - ].each do |platform|  
10 - context "on #{platform[:lsbdistcodename]}" do  
11 - let :facts do  
12 - {  
13 - :lsbdistrelease => platform[:lsbdistrelease],  
14 - :lsbdistcodename => platform[:lsbdistcodename],  
15 - }  
16 - end  
17 - let :release do  
18 - "#{platform[:lsbdistcodename]}"  
19 - end  
20 - let :package do  
21 - "#{platform[:package]}"  
22 - end  
23 - let :options do  
24 - "-y"  
25 - end  
26 - ['ppa:dans_ppa', 'dans_ppa','ppa:dans-daily/ubuntu'].each do |t|  
27 - describe "with title #{t}" do  
28 - let :pre_condition do  
29 - 'class { "apt": }'  
30 - end  
31 - let :title do  
32 - t  
33 - end  
34 - let :filename do  
35 - t.sub(/^ppa:/,'').gsub('/','-') << "-" << "#{release}.list"  
36 - end  
37 -  
38 - it { should contain_package("#{package}") }  
39 -  
40 - it { should contain_exec("apt_update").with(  
41 - 'command' => '/usr/bin/apt-get update',  
42 - 'refreshonly' => true  
43 - )  
44 - }  
45 -  
46 - it { should contain_exec("add-apt-repository-#{t}").with(  
47 - 'command' => "/usr/bin/add-apt-repository #{options} #{t}",  
48 - 'unless' => "/usr/bin/test -s /etc/apt/sources.list.d/#{filename}",  
49 - 'require' => ["File[/etc/apt/sources.list.d]", "Package[#{package}]"],  
50 - 'notify' => "Exec[apt_update]"  
51 - )  
52 - }  
53 -  
54 - it { should create_file("/etc/apt/sources.list.d/#{filename}").with(  
55 - 'ensure' => 'file',  
56 - 'require' => "Exec[add-apt-repository-#{t}]"  
57 - )  
58 - }  
59 - end  
60 - end  
61 - describe 'without a proxy defined' do  
62 - let :title do  
63 - 'rspec_ppa'  
64 - end  
65 - let :pre_condition do  
66 - 'class { "apt":  
67 - proxy_host => false  
68 - }'  
69 - end  
70 - let :filename do  
71 - "#{title}-#{release}.list"  
72 - end  
73 -  
74 - it { should contain_exec("add-apt-repository-#{title}").with(  
75 - 'environment' => [],  
76 - 'command' => "/usr/bin/add-apt-repository #{options} #{title}",  
77 - 'unless' => "/usr/bin/test -s /etc/apt/sources.list.d/#{filename}",  
78 - 'require' => ["File[/etc/apt/sources.list.d]", "Package[#{package}]"],  
79 - 'notify' => "Exec[apt_update]"  
80 - )  
81 - }  
82 - end  
83 -  
84 - describe 'behind a proxy' do  
85 - let :title do  
86 - 'rspec_ppa'  
87 - end  
88 - let :pre_condition do  
89 - 'class { "apt":  
90 - proxy_host => "user:pass@proxy",  
91 - }'  
92 - end  
93 - let :filename do  
94 - "#{title}-#{release}.list"  
95 - end  
96 -  
97 - it { should contain_exec("add-apt-repository-#{title}").with(  
98 - 'environment' => [  
99 - "http_proxy=http://user:pass@proxy:8080",  
100 - "https_proxy=http://user:pass@proxy:8080",  
101 - ],  
102 - 'command' => "/usr/bin/add-apt-repository #{options} #{title}",  
103 - 'unless' => "/usr/bin/test -s /etc/apt/sources.list.d/#{filename}",  
104 - 'require' => ["File[/etc/apt/sources.list.d]", "Package[#{package}]"],  
105 - 'notify' => "Exec[apt_update]"  
106 - )  
107 - }  
108 - end  
109 - end  
110 - end  
111 -  
112 - [ { :lsbdistcodename => 'natty',  
113 - :package => 'python-software-properties' },  
114 - { :lsbdistcodename => 'quantal',  
115 - :package => 'software-properties-common'},  
116 - ].each do |platform|  
117 - context "on #{platform[:lsbdistcodename]}" do  
118 - describe "it should not error if package['#{platform[:package]}'] is already defined" do  
119 - let :pre_condition do  
120 - 'class {"apt": }' +  
121 - 'package { "#{platform[:package]}": }->Apt::Ppa["ppa"]'  
122 - end  
123 - let :facts do  
124 - {:lsbdistcodename => '#{platform[:lsbdistcodename]}'}  
125 - end  
126 - let(:title) { "ppa" }  
127 - let(:release) { "#{platform[:lsbdistcodename]}" }  
128 - it { should contain_package('#{platform[:package]}') }  
129 - end  
130 - end  
131 - end  
132 -  
133 - describe "without Class[apt] should raise a Puppet::Error" do  
134 - let(:release) { "natty" }  
135 - let(:title) { "ppa" }  
136 - it { expect { should contain_apt__ppa(title) }.to raise_error(Puppet::Error) }  
137 - end  
138 -  
139 - describe "without release should raise a Puppet::Error" do  
140 - let(:title) { "ppa:" }  
141 - it { expect { should contain_apt__ppa(:release) }.to raise_error(Puppet::Error) }  
142 - end  
143 -end  
puppet/modules/apt/spec/defines/source_spec.rb
@@ -1,166 +0,0 @@ @@ -1,166 +0,0 @@
1 -require 'spec_helper'  
2 -describe 'apt::source', :type => :define do  
3 - let :title do  
4 - 'my_source'  
5 - end  
6 -  
7 - let :default_params do  
8 - {  
9 - :ensure => 'present',  
10 - :location => '',  
11 - :release => 'karmic',  
12 - :repos => 'main',  
13 - :include_src => true,  
14 - :required_packages => false,  
15 - :key => false,  
16 - :key_server => 'keyserver.ubuntu.com',  
17 - :key_content => false,  
18 - :key_source => false,  
19 - :pin => false  
20 - }  
21 - end  
22 -  
23 - [{},  
24 - {  
25 - :location => 'http://example.com',  
26 - :release => 'precise',  
27 - :repos => 'security',  
28 - :include_src => false,  
29 - :required_packages => 'apache',  
30 - :key => 'key_name',  
31 - :key_server => 'keyserver.debian.com',  
32 - :pin => '600',  
33 - :key_content => 'ABCD1234'  
34 - },  
35 - {  
36 - :key => 'key_name',  
37 - :key_server => 'keyserver.debian.com',  
38 - :key_content => false,  
39 - },  
40 - {  
41 - :ensure => 'absent',  
42 - :location => 'http://example.com',  
43 - :release => 'precise',  
44 - :repos => 'security',  
45 - },  
46 - {  
47 - :release => '',  
48 - },  
49 - {  
50 - :release => 'custom',  
51 - },  
52 - {  
53 - :architecture => 'amd64',  
54 - }  
55 - ].each do |param_set|  
56 - describe "when #{param_set == {} ? "using default" : "specifying"} class parameters" do  
57 - let :param_hash do  
58 - default_params.merge(param_set)  
59 - end  
60 -  
61 - let :facts do  
62 - {:lsbdistcodename => 'karmic'}  
63 - end  
64 -  
65 - let :params do  
66 - param_set  
67 - end  
68 -  
69 - let :filename do  
70 - "/etc/apt/sources.list.d/#{title}.list"  
71 - end  
72 -  
73 - let :content do  
74 - content = "# #{title}"  
75 - if param_hash[:architecture]  
76 - arch = "[arch=#{param_hash[:architecture]}]"  
77 - end  
78 - content << "\ndeb #{arch}#{param_hash[:location]} #{param_hash[:release]} #{param_hash[:repos]}\n"  
79 -  
80 - if param_hash[:include_src]  
81 - content << "deb-src #{arch}#{param_hash[:location]} #{param_hash[:release]} #{param_hash[:repos]}\n"  
82 - end  
83 - content  
84 - end  
85 -  
86 - it { should contain_apt__params }  
87 -  
88 - it { should contain_file("#{title}.list").with({  
89 - 'ensure' => param_hash[:ensure],  
90 - 'path' => filename,  
91 - 'owner' => 'root',  
92 - 'group' => 'root',  
93 - 'mode' => '0644',  
94 - 'content' => content,  
95 - })  
96 - }  
97 -  
98 - it {  
99 - if param_hash[:pin]  
100 - should contain_apt__pin(title).with({  
101 - "priority" => param_hash[:pin],  
102 - "before" => "File[#{title}.list]"  
103 - })  
104 - else  
105 - should_not contain_apt__pin(title).with({  
106 - "priority" => param_hash[:pin],  
107 - "before" => "File[#{title}.list]"  
108 - })  
109 - end  
110 - }  
111 -  
112 - it {  
113 - should contain_exec("apt_update").with({  
114 - "command" => "/usr/bin/apt-get update",  
115 - "refreshonly" => true  
116 - })  
117 - }  
118 -  
119 - it {  
120 - if param_hash[:required_packages]  
121 - should contain_exec("Required packages: '#{param_hash[:required_packages]}' for #{title}").with({  
122 - "command" => "/usr/bin/apt-get -y install #{param_hash[:required_packages]}",  
123 - "subscribe" => "File[#{title}.list]",  
124 - "refreshonly" => true,  
125 - "before" => 'Exec[apt_update]',  
126 - })  
127 - else  
128 - should_not contain_exec("Required packages: '#{param_hash[:required_packages]}' for #{title}").with({  
129 - "command" => "/usr/bin/apt-get -y install #{param_hash[:required_packages]}",  
130 - "subscribe" => "File[#{title}.list]",  
131 - "refreshonly" => true  
132 - })  
133 - end  
134 - }  
135 -  
136 - it {  
137 - if param_hash[:key]  
138 - should contain_apt__key("Add key: #{param_hash[:key]} from Apt::Source #{title}").with({  
139 - "key" => param_hash[:key],  
140 - "ensure" => :present,  
141 - "key_server" => param_hash[:key_server],  
142 - "key_content" => param_hash[:key_content],  
143 - "key_source" => param_hash[:key_source],  
144 - "before" => "File[#{title}.list]"  
145 - })  
146 - else  
147 - should_not contain_apt__key("Add key: #{param_hash[:key]} from Apt::Source #{title}").with({  
148 - "key" => param_hash[:key],  
149 - "ensure" => :present,  
150 - "key_server" => param_hash[:key_server],  
151 - "key_content" => param_hash[:key_content],  
152 - "key_source" => param_hash[:key_source],  
153 - "before" => "File[#{title}.list]"  
154 - })  
155 - end  
156 - }  
157 - end  
158 - end  
159 - describe "without release should raise a Puppet::Error" do  
160 - let(:default_params) { Hash.new }  
161 - let(:facts) { Hash.new }  
162 - it { expect { should raise_error(Puppet::Error) } }  
163 - let(:facts) { { :lsbdistcodename => 'lucid' } }  
164 - it { should contain_apt__source(title) }  
165 - end  
166 -end  
puppet/modules/apt/spec/spec_helper.rb
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -require 'puppetlabs_spec_helper/module_spec_helper'  
puppet/modules/apt/spec/spec_helper_system.rb
@@ -1,30 +0,0 @@ @@ -1,30 +0,0 @@
1 -require 'rspec-system/spec_helper'  
2 -require 'rspec-system-puppet/helpers'  
3 -require 'rspec-system-serverspec/helpers'  
4 -  
5 -include RSpecSystemPuppet::Helpers  
6 -  
7 -include Serverspec::Helper::RSpecSystem  
8 -include Serverspec::Helper::DetectOS  
9 -  
10 -RSpec.configure do |c|  
11 - # Project root  
12 - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))  
13 -  
14 - # Enable colour  
15 - c.tty = true  
16 -  
17 - c.include RSpecSystemPuppet::Helpers  
18 -  
19 - # This is where we 'setup' the nodes before running our tests  
20 - c.before :suite do  
21 - # May as well update here as this can only run on apt-get machines.  
22 - shell('apt-get update')  
23 - # Install puppet  
24 - puppet_install  
25 -  
26 - # Install modules and dependencies  
27 - puppet_module_install(:source => proj_root, :module_name => 'apt')  
28 - shell('puppet module install puppetlabs-stdlib')  
29 - end  
30 -end  
puppet/modules/apt/spec/system/apt_builddep_spec.rb
@@ -1,38 +0,0 @@ @@ -1,38 +0,0 @@
1 -require 'spec_helper_system'  
2 -  
3 -describe 'apt::builddep' do  
4 -  
5 - context 'reset' do  
6 - it 'removes packages' do  
7 - shell('apt-get -y remove glusterfs-server')  
8 - shell('apt-get -y remove g++')  
9 - end  
10 - end  
11 -  
12 - context 'apt::builddep' do  
13 - it 'should work with no errors' do  
14 - pp = <<-EOS  
15 - include '::apt'  
16 - apt::builddep { 'glusterfs-server': }  
17 - EOS  
18 -  
19 - puppet_apply(pp) do |r|  
20 - r.exit_code.should_not == 1  
21 - end  
22 - end  
23 -  
24 - describe 'should install g++ as a dependency' do  
25 - describe package('g++') do  
26 - it { should be_installed }  
27 - end  
28 - end  
29 - end  
30 -  
31 - context 'reset' do  
32 - it 'removes packages' do  
33 - shell('apt-get -y remove glusterfs-server')  
34 - shell('apt-get -y remove g++')  
35 - end  
36 - end  
37 -  
38 -end  
puppet/modules/apt/spec/system/apt_key_spec.rb
@@ -1,53 +0,0 @@ @@ -1,53 +0,0 @@
1 -require 'spec_helper_system'  
2 -  
3 -describe 'apt::key' do  
4 -  
5 - context 'reset' do  
6 - it 'clean up keys' do  
7 - shell('apt-key del 4BD6EC30')  
8 - shell('apt-key del D50582E6')  
9 - end  
10 - end  
11 -  
12 - context 'apt::key' do  
13 - it 'should work with no errors' do  
14 - pp = <<-EOS  
15 - include '::apt'  
16 - apt::key { 'puppetlabs':  
17 - key => '4BD6EC30',  
18 - key_server => 'pgp.mit.edu',  
19 - }  
20 -  
21 - apt::key { 'jenkins':  
22 - key => 'D50582E6',  
23 - key_source => 'http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key',  
24 - }  
25 - EOS  
26 -  
27 - puppet_apply(pp) do |r|  
28 - r.exit_code.should_not == 1  
29 - end  
30 - end  
31 -  
32 - describe 'keys should exist' do  
33 - it 'finds puppetlabs key' do  
34 - shell('apt-key list | grep 4BD6EC30') do |r|  
35 - r.exit_code.should be_zero  
36 - end  
37 - end  
38 - it 'finds jenkins key' do  
39 - shell('apt-key list | grep D50582E6') do |r|  
40 - r.exit_code.should be_zero  
41 - end  
42 - end  
43 - end  
44 - end  
45 -  
46 - context 'reset' do  
47 - it 'clean up keys' do  
48 - shell('apt-key del 4BD6EC30')  
49 - shell('apt-key del D50582E6')  
50 - end  
51 - end  
52 -  
53 -end  
puppet/modules/apt/spec/system/apt_ppa_spec.rb
@@ -1,59 +0,0 @@ @@ -1,59 +0,0 @@
1 -require 'spec_helper_system'  
2 -  
3 -describe 'apt::ppa' do  
4 -  
5 - context 'reset' do  
6 - it 'removes ppa' do  
7 - shell('rm /etc/apt/sources.list.d/drizzle-developers-ppa*')  
8 - shell('rm /etc/apt/sources.list.d/raravena80-collectd5-*')  
9 - end  
10 - end  
11 -  
12 - context 'adding a ppa that doesnt exist' do  
13 - it 'should work with no errors' do  
14 - pp = <<-EOS  
15 - include '::apt'  
16 - apt::ppa { 'ppa:drizzle-developers/ppa': }  
17 - EOS  
18 -  
19 - puppet_apply(pp) do |r|  
20 - r.exit_code.should_not == 1  
21 - end  
22 - end  
23 -  
24 - describe 'contains the source file' do  
25 - it 'contains a drizzle ppa source' do  
26 - shell('ls /etc/apt/sources.list.d/drizzle-developers-ppa-*.list') do |r|  
27 - r.exit_code.should be_zero  
28 - end  
29 - end  
30 - end  
31 - end  
32 -  
33 - context 'readding a removed ppa.' do  
34 - it 'setup' do  
35 - shell('add-apt-repository -y ppa:raravena80/collectd5')  
36 - # This leaves a blank file  
37 - shell('add-apt-repository --remove ppa:raravena80/collectd5')  
38 - end  
39 -  
40 - it 'should readd it successfully' do  
41 - pp = <<-EOS  
42 - include '::apt'  
43 - apt::ppa { 'ppa:raravena80/collectd5': }  
44 - EOS  
45 -  
46 - puppet_apply(pp) do |r|  
47 - r.exit_code.should_not == 1  
48 - end  
49 - end  
50 - end  
51 -  
52 - context 'reset' do  
53 - it 'removes added ppas' do  
54 - shell('rm /etc/apt/sources.list.d/drizzle-developers-ppa*')  
55 - shell('rm /etc/apt/sources.list.d/raravena80-collectd5-*')  
56 - end  
57 - end  
58 -  
59 -end  
puppet/modules/apt/spec/system/apt_source_spec.rb
@@ -1,51 +0,0 @@ @@ -1,51 +0,0 @@
1 -require 'spec_helper_system'  
2 -  
3 -describe 'apt::source' do  
4 -  
5 - context 'reset' do  
6 - it 'clean up puppetlabs repo' do  
7 - shell('apt-key del 4BD6EC30')  
8 - shell('rm /etc/apt/sources.list.d/puppetlabs.list')  
9 - end  
10 - end  
11 -  
12 - context 'apt::source' do  
13 - it 'should work with no errors' do  
14 - pp = <<-EOS  
15 - include '::apt'  
16 - apt::source { 'puppetlabs':  
17 - location => 'http://apt.puppetlabs.com',  
18 - repos => 'main',  
19 - key => '4BD6EC30',  
20 - key_server => 'pgp.mit.edu',  
21 - }  
22 - EOS  
23 -  
24 - puppet_apply(pp) do |r|  
25 - r.exit_code.should_not == 1  
26 - end  
27 - end  
28 -  
29 - describe 'key should exist' do  
30 - it 'finds puppetlabs key' do  
31 - shell('apt-key list | grep 4BD6EC30') do |r|  
32 - r.exit_code.should be_zero  
33 - end  
34 - end  
35 - end  
36 -  
37 - describe 'source should exist' do  
38 - describe file('/etc/apt/sources.list.d/puppetlabs.list') do  
39 - it { should be_file }  
40 - end  
41 - end  
42 - end  
43 -  
44 - context 'reset' do  
45 - it 'clean up puppetlabs repo' do  
46 - shell('apt-key del 4BD6EC30')  
47 - shell('rm /etc/apt/sources.list.d/puppetlabs.list')  
48 - end  
49 - end  
50 -  
51 -end  
puppet/modules/apt/spec/system/basic_spec.rb
@@ -1,10 +0,0 @@ @@ -1,10 +0,0 @@
1 -require 'spec_helper_system'  
2 -  
3 -describe 'basic tests:' do  
4 - # Using puppet_apply as a subject  
5 - context puppet_apply 'notice("foo")' do  
6 - its(:stdout) { should =~ /foo/ }  
7 - its(:stderr) { should be_empty }  
8 - its(:exit_code) { should be_zero }  
9 - end  
10 -end  
puppet/modules/apt/spec/system/class_spec.rb
@@ -1,20 +0,0 @@ @@ -1,20 +0,0 @@
1 -require 'spec_helper_system'  
2 -  
3 -describe 'apt class' do  
4 -  
5 - context 'default parameters' do  
6 - # Using puppet_apply as a helper  
7 - it 'should work with no errors' do  
8 - pp = <<-EOS  
9 - class { 'apt': }  
10 - EOS  
11 -  
12 - # Run it twice and test for idempotency  
13 - puppet_apply(pp) do |r|  
14 - r.exit_code.should_not == 1  
15 - r.refresh  
16 - r.exit_code.should be_zero  
17 - end  
18 - end  
19 - end  
20 -end  
puppet/modules/apt/templates/10periodic.erb
@@ -1,12 +0,0 @@ @@ -1,12 +0,0 @@
1 -APT::Periodic::Enable "<%= @enable %>";  
2 -APT::Periodic::BackUpArchiveInterval "<%= @backup_interval %>";  
3 -APT::Periodic::BackUpLevel "<%= @backup_level %>";  
4 -APT::Periodic::MaxAge "<%= @max_age %>";  
5 -APT::Periodic::MinAge "<%= @min_age %>";  
6 -APT::Periodic::MaxSize "<%= @max_size %>";  
7 -APT::Periodic::Update-Package-Lists "<%= @update %>";  
8 -APT::Periodic::Download-Upgradeable-Packages "<%= @download %>";  
9 -APT::Periodic::Download-Upgradeable-Packages-Debdelta "<%= @download_delta %>";  
10 -APT::Periodic::Unattended-Upgrade "<%= @upgrade %>";  
11 -APT::Periodic::AutocleanInterval "<%= @autoclean %>";  
12 -APT::Periodic::Verbose "<%= @verbose %>";  
puppet/modules/apt/templates/50unattended-upgrades.erb
@@ -1,53 +0,0 @@ @@ -1,53 +0,0 @@
1 -// Automatically upgrade packages from these (origin:archive) pairs  
2 -Unattended-Upgrade::Allowed-Origins {  
3 -<% @origins.each do |origin| -%>  
4 - "<%= origin %>";  
5 -<% end -%>  
6 -};  
7 -  
8 -// List of packages to not update  
9 -Unattended-Upgrade::Package-Blacklist {  
10 -<% @blacklist.each do |package| -%>  
11 - "<%= package %>";  
12 -<% end -%>  
13 -};  
14 -  
15 -// This option allows you to control if on a unclean dpkg exit  
16 -// unattended-upgrades will automatically run  
17 -// dpkg --force-confold --configure -a  
18 -// The default is true, to ensure updates keep getting installed  
19 -Unattended-Upgrade::AutoFixInterruptedDpkg "<%= @auto_fix %>";  
20 -  
21 -// Split the upgrade into the smallest possible chunks so that  
22 -// they can be interrupted with SIGUSR1. This makes the upgrade  
23 -// a bit slower but it has the benefit that shutdown while a upgrade  
24 -// is running is possible (with a small delay)  
25 -Unattended-Upgrade::MinimalSteps "<%= @minimal_steps %>";  
26 -  
27 -// Install all unattended-upgrades when the machine is shuting down  
28 -// instead of doing it in the background while the machine is running  
29 -// This will (obviously) make shutdown slower  
30 -Unattended-Upgrade::InstallOnShutdown "<%= @install_on_shutdown %>";  
31 -  
32 -// Send email to this address for problems or packages upgrades  
33 -// If empty or unset then no email is sent, make sure that you  
34 -// have a working mail setup on your system. A package that provides  
35 -// 'mailx' must be installed.  
36 -<% if @mail_to != "NONE" %>Unattended-Upgrade::Mail "<%= @mail_to %>";<% end %>  
37 -  
38 -// Set this value to "true" to get emails only on errors. Default  
39 -// is to always send a mail if Unattended-Upgrade::Mail is set  
40 -<% if @mail_to != "NONE" %>Unattended-Upgrade::MailOnlyOnError "<%= @mail_only_on_error %>";<% end %>  
41 -  
42 -// Do automatic removal of new unused dependencies after the upgrade  
43 -// (equivalent to apt-get autoremove)  
44 -Unattended-Upgrade::Remove-Unused-Dependencies "<%= @remove_unused %>";  
45 -  
46 -// Automatically reboot *WITHOUT CONFIRMATION* if a  
47 -// the file /var/run/reboot-required is found after the upgrade  
48 -Unattended-Upgrade::Automatic-Reboot "<%= @auto_reboot %>";  
49 -  
50 -  
51 -// Use apt bandwidth limit feature, this example limits the download  
52 -// speed to 70kb/sec  
53 -<% if @dl_limit != "NONE" %>Acquire::http::Dl-Limit "<%= @dl_limit %>";<% end %>  
puppet/modules/apt/templates/pin.pref.erb
@@ -1,22 +0,0 @@ @@ -1,22 +0,0 @@
1 -<%-  
2 -@pin = "release a=#{@name}" # default value  
3 -if @pin_release.length > 0  
4 - options = []  
5 - options.push("a=#{@release}") if @release.length > 0  
6 - options.push("n=#{@codename}") if @codename.length > 0  
7 - options.push("v=#{@release_version}") if @release_version.length > 0  
8 - options.push("c=#{@component}") if @component.length > 0  
9 - options.push("o=#{@originator}") if @originator.length > 0  
10 - options.push("l=#{@label}") if @label.length > 0  
11 - @pin = "release #{options.join(', ')}"  
12 -elsif @version.length > 0  
13 - @pin = "version #{@version}"  
14 -elsif @origin.length > 0  
15 - @pin = "origin \"#{@origin}\""  
16 -end  
17 --%>  
18 -# <%= @name %>  
19 -Explanation: <%= @explanation %>  
20 -Package: <%= @packages %>  
21 -Pin: <%= @pin %>  
22 -Pin-Priority: <%= @priority %>  
puppet/modules/apt/templates/source.list.erb
@@ -1,5 +0,0 @@ @@ -1,5 +0,0 @@
1 -# <%= @name %>  
2 -deb <% if @architecture %>[arch=<%= @architecture %>]<% end %><%= @location %> <%= @release_real %> <%= @repos %>  
3 -<%- if @include_src then -%>  
4 -deb-src <% if @architecture %>[arch=<%= @architecture %>]<% end %><%= @location %> <%= @release_real %> <%= @repos %>  
5 -<%- end -%>  
puppet/modules/apt/tests/builddep.pp
@@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
1 -class { 'apt': }  
2 -apt::builddep{ 'glusterfs-server': }  
puppet/modules/apt/tests/debian/testing.pp
@@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
1 -class { 'apt': }  
2 -class { 'apt::debian::testing': }  
puppet/modules/apt/tests/debian/unstable.pp
@@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
1 -class { 'apt': }  
2 -class { 'apt::debian::unstable': }  
puppet/modules/apt/tests/force.pp
@@ -1,7 +0,0 @@ @@ -1,7 +0,0 @@
1 -# force.pp  
2 -# force a package from a specific release  
3 -  
4 -apt::force { 'package':  
5 - release => 'testing',  
6 - version => false  
7 -}  
puppet/modules/apt/tests/init.pp
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -class { 'apt': }  
puppet/modules/apt/tests/key.pp
@@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
1 -# Declare Apt key for apt.puppetlabs.com source  
2 -apt::key { 'puppetlabs':  
3 - key => '4BD6EC30',  
4 - key_server => 'pgp.mit.edu',  
5 - key_options => 'http-proxy="http://proxyuser:proxypass@example.org:3128"',  
6 -}  
puppet/modules/apt/tests/params.pp
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -include apt::params  
puppet/modules/apt/tests/pin.pp
@@ -1,5 +0,0 @@ @@ -1,5 +0,0 @@
1 -# pin a release in apt, useful for unstable repositories  
2 -apt::pin { 'foo':  
3 - packages => '*',  
4 - priority => 0,  
5 -}  
puppet/modules/apt/tests/ppa.pp
@@ -1,4 +0,0 @@ @@ -1,4 +0,0 @@
1 -class { 'apt': }  
2 -  
3 -# Example declaration of an Apt PPA  
4 -apt::ppa{ 'ppa:openstack-ppa/bleeding-edge': }  
puppet/modules/apt/tests/release.pp
@@ -1,4 +0,0 @@ @@ -1,4 +0,0 @@
1 -class { 'apt': }  
2 -class { 'apt::release':  
3 - release_id => 'karmic'  
4 -}  
puppet/modules/apt/tests/source.pp
@@ -1,29 +0,0 @@ @@ -1,29 +0,0 @@
1 -# Declare the apt class to manage /etc/apt/sources.list and /etc/sources.list.d  
2 -class { 'apt': }  
3 -  
4 -# Install the puppetlabs apt source  
5 -# Release is automatically obtained from lsbdistcodename fact if available.  
6 -apt::source { 'puppetlabs':  
7 - location => 'http://apt.puppetlabs.com',  
8 - repos => 'main',  
9 - key => '4BD6EC30',  
10 - key_server => 'pgp.mit.edu',  
11 -}  
12 -  
13 -# test two sources with the same key  
14 -apt::source { 'debian_testing':  
15 - location => 'http://debian.mirror.iweb.ca/debian/',  
16 - release => 'testing',  
17 - repos => 'main contrib non-free',  
18 - key => '55BE302B',  
19 - key_server => 'subkeys.pgp.net',  
20 - pin => '-10',  
21 -}  
22 -apt::source { 'debian_unstable':  
23 - location => 'http://debian.mirror.iweb.ca/debian/',  
24 - release => 'unstable',  
25 - repos => 'main contrib non-free',  
26 - key => '55BE302B',  
27 - key_server => 'subkeys.pgp.net',  
28 - pin => '-10',  
29 -}  
puppet/modules/apt/tests/unattended-upgrades.pp
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -include apt::unattended-upgrades  
puppet/modules/locale/README.md
@@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
1 -puppet-locale  
2 -=============  
3 \ No newline at end of file 0 \ No newline at end of file
puppet/modules/locale/TODO
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -Add unless to check if necessary exec install_locales  
2 \ No newline at end of file 0 \ No newline at end of file
puppet/modules/locale/manifests/init.pp
@@ -1,56 +0,0 @@ @@ -1,56 +0,0 @@
1 -class locale (  
2 - $locales = 'en_US.UTF-8 pt_BR',  
3 - $lang = 'en_US.UTF-8',  
4 - $language = 'en_US'  
5 -) {  
6 -  
7 - Exec {  
8 - path => ['/usr/bin', '/usr/sbin', '/bin']  
9 - }  
10 -  
11 - file { '/var/cache/locale':  
12 - ensure => directory,  
13 - mode => '0755',  
14 - owner => 'root',  
15 - }  
16 -  
17 - file { '/var/cache/locale/installed':  
18 - ensure => present,  
19 - mode => '0644',  
20 - owner => 'root',  
21 - content => "${locales}-${lang}-${language}",  
22 - require => File['/var/cache/locale'],  
23 - }  
24 -  
25 - exec { 'install_locales':  
26 - command => "locale-gen ${locales}",  
27 - refreshonly => true,  
28 - subscribe => File['/var/cache/locale/installed'],  
29 - notify => Exec['reload_locales']  
30 - }  
31 -  
32 - if $lang {  
33 - exec { 'update_default_lang':  
34 - command => "update-locale LANG='${lang}'",  
35 - notify => Exec['reload_locales'],  
36 - refreshonly => true,  
37 - subscribe => File['/var/cache/locale/installed'],  
38 - }  
39 - }  
40 -  
41 - if $language {  
42 - exec { 'update_default_language':  
43 - command => "update-locale LANGUAGE='${language}'",  
44 - notify => Exec['reload_locales'],  
45 - refreshonly => true,  
46 - subscribe => File['/var/cache/locale/installed'],  
47 - }  
48 - }  
49 -  
50 - exec { 'reload_locales':  
51 - command => "dpkg-reconfigure locales",  
52 - refreshonly => true  
53 - }  
54 -  
55 -}  
56 -  
puppet/modules/locale/test/init.pp
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -include locale  
2 \ No newline at end of file 0 \ No newline at end of file
puppet/modules/nginx/LICENSE
@@ -1,12 +0,0 @@ @@ -1,12 +0,0 @@
1 -  
2 - Licensed under the Apache License, Version 2.0 (the "License");  
3 - you may not use this file except in compliance with the License.  
4 - You may obtain a copy of the License at  
5 -  
6 - http://www.apache.org/licenses/LICENSE-2.0  
7 -  
8 - Unless required by applicable law or agreed to in writing, software  
9 - distributed under the License is distributed on an "AS IS" BASIS,  
10 - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
11 - See the License for the specific language governing permissions and  
12 - limitations under the License.  
puppet/modules/nginx/Modulefile
@@ -1,8 +0,0 @@ @@ -1,8 +0,0 @@
1 -name 'BenoitCattie-nginx'  
2 -version '0.0.2'  
3 -source 'https://github.com/BenoitCattie/puppet-nginx.git'  
4 -author 'BenoitCattie'  
5 -license 'APACHE2'  
6 -summary 'Basic module for configuring nginx via puppet'  
7 -description 'Basic module for configuring nginx via puppet. You can easily create fcgi vhost with this module.'  
8 -project_page 'http://github.com/BenoitCattie/puppet-nginx'  
puppet/modules/nginx/README
@@ -1,116 +0,0 @@ @@ -1,116 +0,0 @@
1 -# Nginx Recipe #  
2 -Author : Benoit CATTIE <puppet@benoit.cattie.net>  
3 -Version : 0.2  
4 -Licence : Apache  
5 -  
6 -Basic module for configuring nginx via puppet.  
7 -  
8 -Based in part on apache2 module code by Sam Quigley <sq@wesabe.com>, Tim Stoop <tim.stoop@gmail.com> and David Schmitt <david@schmitt.edv-bus.at>  
9 -  
10 -## Class: nginx ##  
11 -  
12 -Parameters (used in nginx.conf.erb) :  
13 - * $user. Defaults to 'www-data'.  
14 - * $worker_processes. Defaults to '1'.  
15 - * $worker_connections. Defaults to '1024'.  
16 - * $error_log. Default to undef  
17 - * $pid_file. Default to undef  
18 - * $access_log. Default to undef  
19 -  
20 -Install nginx.  
21 -Create config directories :  
22 - * /etc/nginx/conf.d for http config snippet  
23 - * /etc/nginx/includes for sites includes  
24 - * /etc/nginx/sites-enabled  
25 - * /etc/nginx/sites-available  
26 - * /etc/nginx/ssl  
27 -  
28 -Provide 4 definitions :  
29 - * nginx::config (http config snippet)  
30 - * nginx::site (http site)  
31 - * nginx::site_include (site includes)  
32 - * nginx::fcgi::site (fcgi php site)  
33 -  
34 -Templates:  
35 - - nginx.conf.erb => /etc/nginx/nginx.conf  
36 -  
37 -  
38 -### Define nginx::config ###  
39 -  
40 -Installs a config snippet in /etc/nginx/conf.d.  
41 -  
42 -Parameters :  
43 - * ensure: typically set to "present" or "absent". Defaults to "present"  
44 - * content: set the content of the config snipppet. Defaults to 'template("nginx/${name}.conf.erb")'  
45 - * order: specifies the load order for this config snippet. Defaults to "500"  
46 -  
47 -  
48 -### Define: nginx::site ###  
49 -  
50 -Install a nginx site in /etc/nginx/sites-available (and symlink in /etc/nginx/sites-enabled).  
51 -  
52 -Parameters :  
53 - * ensure: typically set to "present" or "absent". Defaults to "present"  
54 - * content: site definition (should be a template).  
55 -  
56 -### Define: nginx::site_include ###  
57 -  
58 -Define: site_include  
59 -  
60 -Define a site config include in /etc/nginx/includes  
61 -  
62 -Parameters :  
63 - * ensure: typically set to "present" or "absent". Defaults to "present"  
64 - * content: include definition (should be a template).  
65 -  
66 -  
67 -## Class nginx::fcgi ##  
68 -  
69 -Manage nginx fcgi configuration.  
70 -Provide nginx::fcgi::site  
71 -  
72 -Templates :  
73 - * nginx/includes/fastcgi_params.erb  
74 -  
75 -### Define: nginx::fcgi::site ###  
76 -  
77 -Create a fcgi site config from template using parameters.  
78 -You can use my php5-fpm class to manage fastcgi servers.  
79 -  
80 -Parameters :  
81 - * ensure: typically set to "present" or "absent". Defaults to "present"  
82 - * root: document root (Required)  
83 - * index: nginx index directive. Defaults to "index.php"  
84 - * fastcgi_pass : port or socket on which the FastCGI-server is listening (Required)  
85 - * server_name : server_name directive (could be an array)  
86 - * listen : address/port the server listen to. Defaults to 80. Auto enable ssl if 443  
87 - * access_log : custom acces logs. Defaults to /var/log/nginx/$name_access.log  
88 - * include : custom include for the site (could be an array). Include files must exists  
89 - to avoid nginx reload errors. Use with nginx::site_include  
90 - * ssl_certificate : ssl_certificate path. If empty auto-generating ssl cert  
91 - * ssl_certificate_key : ssl_certificate_key path. If empty auto-generating ssl cert key  
92 - See http://wiki.nginx.org for details.  
93 -  
94 -Templates :  
95 - * nginx/fcgi_site.erb  
96 -  
97 -Sample Usage :  
98 -  
99 - include nginx  
100 - include nginx::fcgi  
101 -  
102 - nginx::fcgi::site {"default":  
103 - root => "/var/www/nginx-default",  
104 - fastcgi_pass => "127.0.0.1:9000",  
105 - server_name => ["localhost", "$hostname", "$fqdn"],  
106 - }  
107 -  
108 - nginx::fcgi::site {"default-ssl":  
109 - listen => "443",  
110 - root => "/var/www/nginx-default",  
111 - fastcgi_pass => "127.0.0.1:9000",  
112 - server_name => "$fqdn",  
113 - }  
114 -  
115 -## CHANGELOG ##  
116 -- v0.2 : * ssl support  
puppet/modules/nginx/manifests/config.pp
@@ -1,27 +0,0 @@ @@ -1,27 +0,0 @@
1 -# Define: nginx::config  
2 -#  
3 -# Define a nginx config snippet. Places all config snippets into  
4 -# /etc/nginx/conf.d, where they will be automatically loaded by http module  
5 -#  
6 -#  
7 -# Parameters :  
8 -# * ensure: typically set to "present" or "absent". Defaults to "present"  
9 -# * content: set the content of the config snipppet. Defaults to 'template("nginx/${name}.conf.erb")'  
10 -# * order: specifies the load order for this config snippet. Defaults to "500"  
11 -#  
12 -define nginx::config($ensure='present', $content=undef, $order='500') {  
13 - $real_content = $content ? {  
14 - undef => template("nginx/${name}.conf.erb"),  
15 - default => $content,  
16 - }  
17 -  
18 - file { "${nginx::nginx_conf}/${order}-${name}.conf":  
19 - ensure => $ensure,  
20 - content => $real_content,  
21 - mode => '0644',  
22 - owner => 'root',  
23 - group => 'root',  
24 - notify => Service['nginx'],  
25 - }  
26 -}  
27 -  
puppet/modules/nginx/manifests/fcgi.pp
@@ -1,13 +0,0 @@ @@ -1,13 +0,0 @@
1 -# Class: nginx::fcgi  
2 -#  
3 -# Manage nginx fcgi configuration.  
4 -# Provide nginx::fcgi::site  
5 -#  
6 -# Templates :  
7 -# * nginx/includes/fastcgi_params.erb  
8 -#  
9 -class nginx::fcgi inherits nginx {  
10 - nginx::site_include { 'fastcgi_params':  
11 - content => template('nginx/includes/fastcgi_params.erb'),  
12 - }  
13 -}  
puppet/modules/nginx/manifests/fcgi/site.pp
@@ -1,86 +0,0 @@ @@ -1,86 +0,0 @@
1 -# Define: nginx::fcgi::site  
2 -#  
3 -# Create a fcgi site config from template using parameters.  
4 -# You can use my php5-fpm class to manage fastcgi servers.  
5 -#  
6 -# Parameters :  
7 -# * ensure: typically set to "present" or "absent". Defaults to "present"  
8 -# * root: document root (Required)  
9 -# * fastcgi_pass : port or socket on which the FastCGI-server is listening (Required)  
10 -# * server_name : server_name directive (could be an array)  
11 -# * listen : address/port the server listen to. Defaults to 80. Auto enable ssl if 443  
12 -# * access_log : custom acces logs. Defaults to /var/log/nginx/$name_access.log  
13 -# * include : custom include for the site (could be an array). Include files must exists  
14 -# to avoid nginx reload errors. Use with nginx::site_include  
15 -# * ssl_certificate : ssl_certificate path. If empty auto-generating ssl cert  
16 -# * ssl_certificate_key : ssl_certificate_key path. If empty auto-generating ssl cert key  
17 -# See http://wiki.nginx.org for details.  
18 -#  
19 -# Templates :  
20 -# * nginx/fcgi_site.erb  
21 -#  
22 -# Sample Usage :  
23 -# nginx::fcgi::site { 'default':  
24 -# root => '/var/www/nginx-default',  
25 -# fastcgi_pass => '127.0.0.1:9000',  
26 -# server_name => ['localhost', $hostname, $fqdn],  
27 -# }  
28 -#  
29 -# nginx::fcgi::site { 'default-ssl':  
30 -# listen => '443',  
31 -# root => '/var/www/nginx-default',  
32 -# fastcgi_pass => '127.0.0.1:9000',  
33 -# server_name => $fqdn,  
34 -# }  
35 -#  
36 -define nginx::fcgi::site(  
37 - $root,  
38 - $fastcgi_pass,  
39 - $ensure = 'present',  
40 - $index = 'index.php',  
41 - $include = '',  
42 - $listen = '80',  
43 - $server_name = undef,  
44 - $access_log = undef,  
45 - $ssl_certificate = undef,  
46 - $ssl_certificate_key = undef,  
47 - $ssl_session_timeout = '5m') {  
48 -  
49 - $real_server_name = $server_name ? {  
50 - undef => $name,  
51 - default => $server_name,  
52 - }  
53 -  
54 - $real_access_log = $access_log ? {  
55 - undef => "/var/log/nginx/${name}_access.log",  
56 - default => $access_log,  
57 - }  
58 -  
59 - # Autogenerating ssl certs  
60 - if $listen == '443' and $ensure == 'present' and ($ssl_certificate == undef or $ssl_certificate_key == undef) {  
61 - exec { "generate-${name}-certs":  
62 - command => "/usr/bin/openssl req -new -inform PEM -x509 -nodes -days 999 -subj \  
63 - '/C=ZZ/ST=AutoSign/O=AutoSign/localityName=AutoSign/commonName=${real_server_name}/organizationalUnitName=AutoSign/emailAddress=AutoSign/' \  
64 - -newkey rsa:2048 -out /etc/nginx/ssl/${name}.pem -keyout /etc/nginx/ssl/${name}.key",  
65 - unless => "/usr/bin/test -f /etc/nginx/ssl/${name}.pem",  
66 - require => File['/etc/nginx/ssl'],  
67 - notify => Service['nginx'],  
68 - }  
69 - }  
70 -  
71 - $real_ssl_certificate = $ssl_certificate ? {  
72 - undef => "/etc/nginx/ssl/${name}.pem",  
73 - default => $ssl_certificate,  
74 - }  
75 -  
76 - $real_ssl_certificate_key = $ssl_certificate_key ? {  
77 - undef => "/etc/nginx/ssl/${name}.key",  
78 - default => $ssl_certificate_key,  
79 - }  
80 -  
81 - nginx::site { $name:  
82 - ensure => $ensure,  
83 - content => template('nginx/fcgi_site.erb'),  
84 - }  
85 -}  
86 -  
puppet/modules/nginx/manifests/init.pp
@@ -1,102 +0,0 @@ @@ -1,102 +0,0 @@
1 -# Class: nginx  
2 -#  
3 -# Install nginx.  
4 -#  
5 -# Parameters:  
6 -# * $user. Defaults to 'www-data'.  
7 -# * $worker_processes. Defaults to '1'.  
8 -# * $worker_connections. Defaults to '1024'.  
9 -# * $error_log. Default to undef  
10 -# * $pid_file. Default to undef  
11 -# * $access_log. Default to undef  
12 -#  
13 -# Create config directories :  
14 -# * /etc/nginx/conf.d for http config snippet  
15 -# * /etc/nginx/includes for sites includes  
16 -#  
17 -# Provide 3 definitions :  
18 -# * nginx::config (http config snippet)  
19 -# * nginx::site (http site)  
20 -# * nginx::site_include (site includes)  
21 -#  
22 -# Templates:  
23 -# - nginx.conf.erb => /etc/nginx/nginx.conf  
24 -#  
25 -class nginx (  
26 - $user = 'www-data',  
27 - $worker_processes = '1',  
28 - $worker_connections = '1024',  
29 - $error_log = undef,  
30 - $pid_file = undef,  
31 - $access_log = undef  
32 -){  
33 - $nginx_includes = '/etc/nginx/includes'  
34 - $nginx_conf = '/etc/nginx/conf.d'  
35 -  
36 - case $::operatingsystem {  
37 - centos,fedora,rhel: {  
38 - $nginx_packages = ['nginx', 'GeoIP', 'gd', 'libXpm', 'libxslt']  
39 - }  
40 - debian,ubuntu: {  
41 - $nginx_packages = 'nginx-extras'  
42 - }  
43 - }  
44 - if ! defined(Package[$nginx_packages]) {  
45 - package { $nginx_packages:  
46 - ensure => latest  
47 - }  
48 - }  
49 -  
50 - #restart-command is a quick-fix here, until http://projects.puppetlabs.com/issues/1014 is solved  
51 - service { 'nginx':  
52 - ensure => running,  
53 - enable => true,  
54 - hasrestart => true,  
55 - require => File['/etc/nginx/nginx.conf'],  
56 - restart => '/etc/init.d/nginx reload'  
57 - }  
58 -  
59 - file { '/etc/nginx/nginx.conf':  
60 - ensure => present,  
61 - mode => '0644',  
62 - owner => 'root',  
63 - group => 'root',  
64 - content => template('nginx/nginx.conf.erb'),  
65 - notify => Service['nginx'],  
66 - require => Package[$nginx_packages],  
67 - }  
68 -  
69 - file { $nginx_conf:  
70 - ensure => directory,  
71 - mode => '0644',  
72 - owner => 'root',  
73 - group => 'root',  
74 - require => Package[$nginx_packages],  
75 - }  
76 -  
77 - file { '/etc/nginx/ssl':  
78 - ensure => directory,  
79 - mode => '0644',  
80 - owner => 'root',  
81 - group => 'root',  
82 - require => Package[$nginx_packages],  
83 - }  
84 -  
85 - file { $nginx_includes:  
86 - ensure => directory,  
87 - mode => '0644',  
88 - owner => 'root',  
89 - group => 'root',  
90 - require => Package[$nginx_packages],  
91 - }  
92 -  
93 - # Nuke default files  
94 - file { '/etc/nginx/fastcgi_params':  
95 - ensure => absent,  
96 - require => Package[$nginx_packages],  
97 - }  
98 -  
99 - file { '/etc/nginx/sites-enabled/default':  
100 - ensure => absent,  
101 - }  
102 -}  
puppet/modules/nginx/manifests/install_site.pp
@@ -1,42 +0,0 @@ @@ -1,42 +0,0 @@
1 -# Define: install_site  
2 -#  
3 -# Install nginx vhost  
4 -# This definition is private, not intended to be called directly  
5 -#  
6 -define nginx::install_site($content=undef) {  
7 - # first, make sure the site config exists  
8 - case $content {  
9 - undef: {  
10 - file { "/etc/nginx/sites-available/${name}":  
11 - ensure => present,  
12 - mode => '0644',  
13 - owner => 'root',  
14 - group => 'root',  
15 - alias => "sites-${name}",  
16 - notify => Service['nginx'],  
17 - require => Package[$nginx::nginx_packages],  
18 - }  
19 - }  
20 - default: {  
21 - file { "/etc/nginx/sites-available/${name}":  
22 - ensure => present,  
23 - mode => '0644',  
24 - owner => 'root',  
25 - group => 'root',  
26 - alias => "sites-$name",  
27 - content => $content,  
28 - require => Package[$nginx::nginx_packages],  
29 - notify => Service['nginx'],  
30 - }  
31 - }  
32 - }  
33 -  
34 - # now, enable it.  
35 - exec { "ln -s /etc/nginx/sites-available/${name} /etc/nginx/sites-enabled/${name}":  
36 - unless => "/bin/sh -c '[ -L /etc/nginx/sites-enabled/${name} ] && \  
37 - [ /etc/nginx/sites-enabled/${name} -ef /etc/nginx/sites-available/${name} ]'",  
38 - path => ['/usr/bin/', '/bin/'],  
39 - notify => Service['nginx'],  
40 - require => File["sites-${name}"],  
41 - }  
42 -}  
puppet/modules/nginx/manifests/site.pp
@@ -1,27 +0,0 @@ @@ -1,27 +0,0 @@
1 -# Define: nginx::site  
2 -#  
3 -# Install a nginx site in /etc/nginx/sites-available (and symlink in /etc/nginx/sites-enabled).  
4 -#  
5 -#  
6 -# Parameters :  
7 -# * ensure: typically set to "present" or "absent". Defaults to "present"  
8 -# * content: site definition (should be a template).  
9 -#  
10 -define nginx::site($ensure='present', $content='') {  
11 - case $ensure {  
12 - 'present' : {  
13 - nginx::install_site { $name:  
14 - content => $content  
15 - }  
16 - }  
17 - 'absent' : {  
18 - exec { "/bin/rm -f /etc/nginx/sites-enabled/${name}":  
19 - onlyif => "/bin/sh -c '[ -L /etc/nginx/sites-enabled/${name} ] && \  
20 - [ /etc/nginx/sites-enabled/$name -ef /etc/nginx/sites-available/${name} ]'",  
21 - notify => Service['nginx'],  
22 - require => Package[$nginx::nginx_packages],  
23 - }  
24 - }  
25 - default: { err ("Unknown ensure value: '$ensure'") }  
26 - }  
27 -}  
puppet/modules/nginx/manifests/site_include.pp
@@ -1,20 +0,0 @@ @@ -1,20 +0,0 @@
1 -# Define: site_include  
2 -#  
3 -# Define a site config include in /etc/nginx/includes  
4 -#  
5 -# Parameters :  
6 -# * ensure: typically set to "present" or "absent". Defaults to "present"  
7 -# * content: include definition (should be a template).  
8 -#  
9 -define nginx::site_include($ensure='present', $content='') {  
10 - file { "${nginx::nginx_includes}/${name}.inc":  
11 - ensure => $ensure,  
12 - mode => '0644',  
13 - owner => 'root',  
14 - group => 'root',  
15 - content => $content,  
16 - require => File[$nginx::nginx_includes],  
17 - notify => Service['nginx'],  
18 - }  
19 -}  
20 -  
puppet/modules/nginx/templates/fcgi_site.erb
@@ -1,39 +0,0 @@ @@ -1,39 +0,0 @@
1 -server {  
2 - listen <%= listen %> ;  
3 -  
4 - server_name <% real_server_name.each do |s_n| -%><%= s_n %> <% end -%>;  
5 -  
6 - access_log <%= real_access_log %>;  
7 -  
8 - root <%= root %>;  
9 -  
10 -<% if listen == '443' %>  
11 - ssl on;  
12 - ssl_certificate <%= real_ssl_certificate %>;  
13 - ssl_certificate_key <%= real_ssl_certificate_key %>;  
14 -  
15 - ssl_session_timeout <%= ssl_session_timeout %>;  
16 -  
17 - ssl_protocols SSLv2 SSLv3 TLSv1;  
18 - ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;  
19 - ssl_prefer_server_ciphers on;  
20 -<% end -%>  
21 - location / {  
22 - index <%= index %>;  
23 - }  
24 -  
25 - location ~ \.php$ {  
26 - fastcgi_pass <%= fastcgi_pass %>;  
27 - fastcgi_index index.php;  
28 - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;  
29 - include /etc/nginx/includes/fastcgi_params.inc;  
30 - }  
31 -  
32 - location ~ /\.ht {  
33 - deny all;  
34 - }  
35 -  
36 -<% if include != '' %> <%include.each do |inc| %>include <%= inc %>;  
37 - <% end -%><% end -%>  
38 -}  
39 -  
puppet/modules/nginx/templates/includes/fastcgi_params.erb
@@ -1,23 +0,0 @@ @@ -1,23 +0,0 @@
1 -fastcgi_param QUERY_STRING $query_string;  
2 -fastcgi_param REQUEST_METHOD $request_method;  
3 -fastcgi_param CONTENT_TYPE $content_type;  
4 -fastcgi_param CONTENT_LENGTH $content_length;  
5 -  
6 -fastcgi_param SCRIPT_NAME $fastcgi_script_name;  
7 -fastcgi_param REQUEST_URI $request_uri;  
8 -fastcgi_param DOCUMENT_URI $document_uri;  
9 -fastcgi_param DOCUMENT_ROOT $document_root;  
10 -fastcgi_param SERVER_PROTOCOL $server_protocol;  
11 -  
12 -fastcgi_param GATEWAY_INTERFACE CGI/1.1;  
13 -fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;  
14 -  
15 -fastcgi_param REMOTE_ADDR $remote_addr;  
16 -fastcgi_param REMOTE_PORT $remote_port;  
17 -fastcgi_param SERVER_ADDR $server_addr;  
18 -fastcgi_param SERVER_PORT $server_port;  
19 -fastcgi_param SERVER_NAME $server_name;  
20 -  
21 -# PHP only, required if PHP was built with --enable-force-cgi-redirect  
22 -fastcgi_param REDIRECT_STATUS 200;  
23 -  
puppet/modules/nginx/templates/nginx.conf.erb
@@ -1,37 +0,0 @@ @@ -1,37 +0,0 @@
1 -user <%= @user %>;  
2 -worker_processes <%= @worker_processes %>;  
3 -  
4 -<% if @error_log %>  
5 -error_log <%= @error_log %>;  
6 -<% end %>  
7 -<% if @pid_file %>  
8 -pid <%= @pid_file %>;  
9 -<% end %>  
10 -  
11 -events {  
12 - worker_connections <%= @worker_connections %>;  
13 -}  
14 -  
15 -http {  
16 - include /etc/nginx/mime.types;  
17 -  
18 - <% if @access_log %>  
19 - access_log <%= @access_log %>;  
20 - <% end %>  
21 -  
22 - sendfile on;  
23 - #tcp_nopush on;  
24 -  
25 - #keepalive_timeout 0;  
26 - keepalive_timeout 65;  
27 - tcp_nodelay on;  
28 -  
29 - gzip on;  
30 - gzip_disable "MSIE [1-6]\.(?!.*SV1)";  
31 -  
32 - include /etc/nginx/conf.d/*.conf;  
33 - include /etc/nginx/sites-enabled/*;  
34 -  
35 - server_tokens off;  
36 - types_hash_bucket_size 64;  
37 -}  
puppet/modules/ntp/.gitignore
@@ -1,18 +0,0 @@ @@ -1,18 +0,0 @@
1 -*.gem  
2 -*.rbc  
3 -.bundle  
4 -.config  
5 -coverage  
6 -InstalledFiles  
7 -lib/bundler/man  
8 -pkg  
9 -rdoc  
10 -spec/reports  
11 -test/tmp  
12 -test/version_tmp  
13 -tmp  
14 -  
15 -# YARD artifacts  
16 -.yardoc  
17 -_yardoc  
18 -doc/  
puppet/modules/ntp/README.md
@@ -1,16 +0,0 @@ @@ -1,16 +0,0 @@
1 -Puppet ntp  
2 -==========  
3 -Start a cronjob to run every hour ntpdate  
4 -  
5 -Usage  
6 -==========  
7 -  
8 -```puppet  
9 -include ntp # Use default server (pool.ntp.org) or your hiera config (puppet 3+)  
10 -```  
11 -or  
12 -```puppet  
13 -class { 'ntp':  
14 - server => 'your ntp server'  
15 -}  
16 -```  
17 \ No newline at end of file 0 \ No newline at end of file
puppet/modules/ntp/manifests/init.pp
@@ -1,15 +0,0 @@ @@ -1,15 +0,0 @@
1 -  
2 -class ntp (  
3 - $server='pool.ntp.org',  
4 -){  
5 - package { 'ntpdate':  
6 - ensure => installed,  
7 - }  
8 -  
9 - cron { 'ntpdate':  
10 - command => "/usr/sbin/ntpdate $server > /dev/null",  
11 - user => 'root',  
12 - minute => '0',  
13 - require => Package['ntpdate'],  
14 - }  
15 -}  
puppet/modules/ntp/tests/init.pp
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -include ntp  
puppet/modules/postfix/README.md
@@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
1 -puppet-postfix  
2 -==============  
3 \ No newline at end of file 0 \ No newline at end of file
puppet/modules/postfix/manifests/init.pp
@@ -1,41 +0,0 @@ @@ -1,41 +0,0 @@
1 -  
2 -class postfix (  
3 - $admin_email,  
4 - $server_name=$fqdn,  
5 - $mailbox_limit=0 # Zero means no limit  
6 -) {  
7 -  
8 - $postfix_preseed = '/var/cache/debconf/postfix.preseed'  
9 - $preseed_cmd = "debconf-set-selections $postfix_preseed"  
10 -  
11 - file { $postfix_preseed:  
12 - ensure => present,  
13 - content => template('postfix/postfix.preseed.erb'),  
14 - }  
15 -  
16 - exec { $preseed_cmd:  
17 - path => '/usr/bin/',  
18 - refreshonly => true,  
19 - subscribe => File[$postfix_preseed],  
20 - }  
21 -  
22 - package { 'postfix':  
23 - ensure => installed,  
24 - require => File[$postfix_preseed],  
25 - responsefile => $postfix_preseed,  
26 - }  
27 -  
28 - package { 'mailutils':  
29 - ensure => installed,  
30 - }  
31 -  
32 - service {'postfix':  
33 - ensure => running,  
34 - enable => true,  
35 - hasstatus => false,  
36 - stop => 'invoke-rc.d postfix stop',  
37 - start => 'invoke-rc.d postfix start',  
38 - restart => 'invoke-rc.d postfix restart',  
39 - require => Package['postfix']  
40 - }  
41 -}  
puppet/modules/postfix/templates/postfix.preseed.erb
@@ -1,17 +0,0 @@ @@ -1,17 +0,0 @@
1 -postfix postfix/root_address string <%= @admin_email %>  
2 -postfix postfix/rfc1035_violation boolean false  
3 -postfix postfix/mydomain_warning boolean  
4 -postfix postfix/mynetworks string  
5 -postfix postfix/mailname string <%= @server_name %>  
6 -postfix postfix/tlsmgr_upgrade_warning boolean  
7 -postfix postfix/recipient_delim string  
8 -postfix postfix/main_mailer_type select Internet Site  
9 -postfix postfix/destinations string localhost, <%= @fqdn %>, <%= @hostname %>  
10 -postfix postfix/retry_upgrade_warning boolean  
11 -postfix postfix/kernel_version_warning boolean  
12 -postfix postfix/sqlite_warning boolean  
13 -postfix postfix/mailbox_limit string <%= @mailbox_limit %>  
14 -postfix postfix/relayhost string  
15 -postfix postfix/procmail boolean false  
16 -postfix postfix/protocols select all  
17 -postfix postfix/chattr boolean false  
puppet/modules/postfix/tests/init.pp
@@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
1 -  
2 -include postfix  
puppet/modules/ps1/README.md
@@ -1,18 +0,0 @@ @@ -1,18 +0,0 @@
1 -puppet-ps1  
2 -==============  
3 -  
4 -Class to customize PS1  
5 -  
6 -Usage:  
7 - class { 'ps1':  
8 - color => 'yellow'  
9 - }  
10 - or  
11 - include shell to use default color (red)  
12 -  
13 -Allowed Colors:  
14 - 'green'  
15 - 'red'  
16 - 'yellow'  
17 -  
18 -  
puppet/modules/ps1/manifests/init.pp
@@ -1,37 +0,0 @@ @@ -1,37 +0,0 @@
1 -class ps1 (  
2 - $color = 'red'  
3 -) {  
4 - $color_code = $color ? {  
5 - 'red' => '1',  
6 - 'green' => '2',  
7 - 'yellow' => '3',  
8 - default => '1'  
9 - }  
10 -  
11 - $force_color_prompt_cmd = "/bin/sed -i -re '/force_color_prompt=yes/ s/^#//'"  
12 - $force_color_prompt_condition = '/bin/grep "#force_color_prompt"'  
13 -  
14 - $ps1_color_cmd = "/bin/sed -i -re 's/01;3[1-3]m/01;3${color_code}m/'"  
15 - $ps1_color_condition = "/bin/grep '01;3${color_code}m'"  
16 -  
17 - $skel_path = '/etc/skel/.bashrc'  
18 - $root_path = '/root/.bashrc'  
19 -  
20 - # uncomment force_color_prompt in skel  
21 - exec { "$force_color_prompt_cmd $skel_path":  
22 - onlyif => "$force_color_prompt_condition $skel_path"  
23 - }  
24 - # uncomment force_color_prompt in root  
25 - exec { "$force_color_prompt_cmd $root_path":  
26 - onlyif => "$force_color_prompt_condition $root_path"  
27 - }  
28 -  
29 - # change prompt color in skel  
30 - exec { "$ps1_color_cmd $skel_path":  
31 - unless => "$ps1_color_condition $skel_path",  
32 - }  
33 - # change prompt color in root  
34 - exec { "$ps1_color_cmd $root_path":  
35 - unless => "$ps1_color_condition $root_path",  
36 - }  
37 -}  
puppet/modules/ps1/test/init.pp
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -include ps1  
2 \ No newline at end of file 0 \ No newline at end of file
puppet/modules/stdlib/CHANGELOG
@@ -1,278 +0,0 @@ @@ -1,278 +0,0 @@
1 -2013-05-06 - Jeff McCune <jeff@puppetlabs.com> - 4.1.0  
2 - * (#20582) Restore facter_dot_d to stdlib for PE users (3b887c8)  
3 - * (maint) Update Gemfile with GEM_FACTER_VERSION (f44d535)  
4 -  
5 -2013-05-06 - Alex Cline <acline@us.ibm.com> - 4.1.0  
6 - * Terser method of string to array conversion courtesy of ethooz. (d38bce0)  
7 -  
8 -2013-05-06 - Alex Cline <acline@us.ibm.com> 4.1.0  
9 - * Refactor ensure_resource expectations (b33cc24)  
10 -  
11 -2013-05-06 - Alex Cline <acline@us.ibm.com> 4.1.0  
12 - * Changed str-to-array conversion and removed abbreviation. (de253db)  
13 -  
14 -2013-05-03 - Alex Cline <acline@us.ibm.com> 4.1.0  
15 - * (#20548) Allow an array of resource titles to be passed into the ensure_resource function (e08734a)  
16 -  
17 -2013-05-02 - Raphaël Pinson <raphael.pinson@camptocamp.com> - 4.1.0  
18 - * Add a dirname function (2ba9e47)  
19 -  
20 -2013-04-29 - Mark Smith-Guerrero <msmithgu@gmail.com> - 4.1.0  
21 - * (maint) Fix a small typo in hash() description (928036a)  
22 -  
23 -2013-04-12 - Jeff McCune <jeff@puppetlabs.com> - 4.0.2  
24 - * Update user information in gemspec to make the intent of the Gem clear.  
25 -  
26 -2013-04-11 - Jeff McCune <jeff@puppetlabs.com> - 4.0.1  
27 - * Fix README function documentation (ab3e30c)  
28 -  
29 -2013-04-11 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0  
30 - * stdlib 4.0 drops support with Puppet 2.7  
31 - * stdlib 4.0 preserves support with Puppet 3  
32 -  
33 -2013-04-11 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0  
34 - * Add ability to use puppet from git via bundler (9c5805f)  
35 -  
36 -2013-04-10 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0  
37 - * (maint) Make stdlib usable as a Ruby GEM (e81a45e)  
38 -  
39 -2013-04-10 - Erik Dalén <dalen@spotify.com> - 4.0.0  
40 - * Add a count function (f28550e)  
41 -  
42 -2013-03-31 - Amos Shapira <ashapira@atlassian.com> - 4.0.0  
43 - * (#19998) Implement any2array (7a2fb80)  
44 -  
45 -2013-03-29 - Steve Huff <shuff@vecna.org> - 4.0.0  
46 - * (19864) num2bool match fix (8d217f0)  
47 -  
48 -2013-03-20 - Erik Dalén <dalen@spotify.com> - 4.0.0  
49 - * Allow comparisons of Numeric and number as String (ff5dd5d)  
50 -  
51 -2013-03-26 - Richard Soderberg <rsoderberg@mozilla.com> - 4.0.0  
52 - * add suffix function to accompany the prefix function (88a93ac)  
53 -  
54 -2013-03-19 - Kristof Willaert <kristof.willaert@gmail.com> - 4.0.0  
55 - * Add floor function implementation and unit tests (0527341)  
56 -  
57 -2012-04-03 - Eric Shamow <eric@puppetlabs.com> - 4.0.0  
58 - * (#13610) Add is_function_available to stdlib (961dcab)  
59 -  
60 -2012-12-17 - Justin Lambert <jlambert@eml.cc> - 4.0.0  
61 - * str2bool should return a boolean if called with a boolean (5d5a4d4)  
62 -  
63 -2012-10-23 - Uwe Stuehler <ustuehler@team.mobile.de> - 4.0.0  
64 - * Fix number of arguments check in flatten() (e80207b)  
65 -  
66 -2013-03-11 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0  
67 - * Add contributing document (96e19d0)  
68 -  
69 -2013-03-04 - Raphaël Pinson <raphael.pinson@camptocamp.com> - 4.0.0  
70 - * Add missing documentation for validate_augeas and validate_cmd to README.markdown (a1510a1)  
71 -  
72 -2013-02-14 - Joshua Hoblitt <jhoblitt@cpan.org> - 4.0.0  
73 - * (#19272) Add has_element() function (95cf3fe)  
74 -  
75 -2013-02-07 - Raphaël Pinson <raphael.pinson@camptocamp.com> - 4.0.0  
76 - * validate_cmd(): Use Puppet::Util::Execution.execute when available (69248df)  
77 -  
78 -2012-12-06 - Raphaël Pinson <raphink@gmail.com> - 4.0.0  
79 - * Add validate_augeas function (3a97c23)  
80 -  
81 -2012-12-06 - Raphaël Pinson <raphink@gmail.com> - 4.0.0  
82 - * Add validate_cmd function (6902cc5)  
83 -  
84 -2013-01-14 - David Schmitt <david@dasz.at> - 4.0.0  
85 - * Add geppetto project definition (b3fc0a3)  
86 -  
87 -2013-01-02 - Jaka Hudoklin <jakahudoklin@gmail.com> - 4.0.0  
88 - * Add getparam function to get defined resource parameters (20e0e07)  
89 -  
90 -2013-01-05 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0  
91 - * (maint) Add Travis CI Support (d082046)  
92 -  
93 -2012-12-04 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0  
94 - * Clarify that stdlib 3 supports Puppet 3 (3a6085f)  
95 -  
96 -2012-11-30 - Erik Dalén <dalen@spotify.com> - 4.0.0  
97 - * maint: style guideline fixes (7742e5f)  
98 -  
99 -2012-11-09 - James Fryman <james@frymanet.com> - 4.0.0  
100 - * puppet-lint cleanup (88acc52)  
101 -  
102 -2012-11-06 - Joe Julian <me@joejulian.name> - 4.0.0  
103 - * Add function, uriescape, to URI.escape strings. Redmine #17459 (fd52b8d)  
104 -  
105 -2012-09-18 - Chad Metcalf <chad@wibidata.com> - 3.2.0  
106 - * Add an ensure_packages function. (8a8c09e)  
107 -  
108 -2012-11-23 - Erik Dalén <dalen@spotify.com> - 3.2.0  
109 - * (#17797) min() and max() functions (9954133)  
110 -  
111 -2012-05-23 - Peter Meier <peter.meier@immerda.ch> - 3.2.0  
112 - * (#14670) autorequire a file_line resource's path (dfcee63)  
113 -  
114 -2012-11-19 - Joshua Harlan Lifton <lifton@puppetlabs.com> - 3.2.0  
115 - * Add join_keys_to_values function (ee0f2b3)  
116 -  
117 -2012-11-17 - Joshua Harlan Lifton <lifton@puppetlabs.com> - 3.2.0  
118 - * Extend delete function for strings and hashes (7322e4d)  
119 -  
120 -2012-08-03 - Gary Larizza <gary@puppetlabs.com> - 3.2.0  
121 - * Add the pick() function (ba6dd13)  
122 -  
123 -2012-03-20 - Wil Cooley <wcooley@pdx.edu> - 3.2.0  
124 - * (#13974) Add predicate functions for interface facts (f819417)  
125 -  
126 -2012-11-06 - Joe Julian <me@joejulian.name> - 3.2.0  
127 - * Add function, uriescape, to URI.escape strings. Redmine #17459 (70f4a0e)  
128 -  
129 -2012-10-25 - Jeff McCune <jeff@puppetlabs.com> - 3.1.1  
130 - * (maint) Fix spec failures resulting from Facter API changes (97f836f)  
131 -  
132 -2012-10-23 - Matthaus Owens <matthaus@puppetlabs.com> - 3.1.0  
133 - * Add PE facts to stdlib (cdf3b05)  
134 -  
135 -2012-08-16 - Jeff McCune <jeff@puppetlabs.com> - 3.0.1  
136 - * Fix accidental removal of facts_dot_d.rb in 3.0.0 release  
137 -  
138 -2012-08-16 - Jeff McCune <jeff@puppetlabs.com> - 3.0.0  
139 - * stdlib 3.0 drops support with Puppet 2.6  
140 - * stdlib 3.0 preserves support with Puppet 2.7  
141 -  
142 -2012-08-07 - Dan Bode <dan@puppetlabs.com> - 3.0.0  
143 - * Add function ensure_resource and defined_with_params (ba789de)  
144 -  
145 -2012-07-10 - Hailee Kenney <hailee@puppetlabs.com> - 3.0.0  
146 - * (#2157) Remove facter_dot_d for compatibility with external facts (f92574f)  
147 -  
148 -2012-04-10 - Chris Price <chris@puppetlabs.com> - 3.0.0  
149 - * (#13693) moving logic from local spec_helper to puppetlabs_spec_helper (85f96df)  
150 -  
151 -2012-10-25 - Jeff McCune <jeff@puppetlabs.com> - 2.5.1  
152 - * (maint) Fix spec failures resulting from Facter API changes (97f836f)  
153 -  
154 -2012-10-23 - Matthaus Owens <matthaus@puppetlabs.com> - 2.5.0  
155 - * Add PE facts to stdlib (cdf3b05)  
156 -  
157 -2012-08-15 - Dan Bode <dan@puppetlabs.com> - 2.5.0  
158 - * Explicitly load functions used by ensure_resource (9fc3063)  
159 -  
160 -2012-08-13 - Dan Bode <dan@puppetlabs.com> - 2.5.0  
161 - * Add better docs about duplicate resource failures (97d327a)  
162 -  
163 -2012-08-13 - Dan Bode <dan@puppetlabs.com> - 2.5.0  
164 - * Handle undef for parameter argument (4f8b133)  
165 -  
166 -2012-08-07 - Dan Bode <dan@puppetlabs.com> - 2.5.0  
167 - * Add function ensure_resource and defined_with_params (a0cb8cd)  
168 -  
169 -2012-08-20 - Jeff McCune <jeff@puppetlabs.com> - 2.5.0  
170 - * Disable tests that fail on 2.6.x due to #15912 (c81496e)  
171 -  
172 -2012-08-20 - Jeff McCune <jeff@puppetlabs.com> - 2.5.0  
173 - * (Maint) Fix mis-use of rvalue functions as statements (4492913)  
174 -  
175 -2012-08-20 - Jeff McCune <jeff@puppetlabs.com> - 2.5.0  
176 - * Add .rspec file to repo root (88789e8)  
177 -  
178 -2012-06-07 - Chris Price <chris@puppetlabs.com> - 2.4.0  
179 - * Add support for a 'match' parameter to file_line (a06c0d8)  
180 -  
181 -2012-08-07 - Erik Dalén <dalen@spotify.com> - 2.4.0  
182 - * (#15872) Add to_bytes function (247b69c)  
183 -  
184 -2012-07-19 - Jeff McCune <jeff@puppetlabs.com> - 2.4.0  
185 - * (Maint) use PuppetlabsSpec::PuppetInternals.scope (master) (deafe88)  
186 -  
187 -2012-07-10 - Hailee Kenney <hailee@puppetlabs.com> - 2.4.0  
188 - * (#2157) Make facts_dot_d compatible with external facts (5fb0ddc)  
189 -  
190 -2012-03-16 - Steve Traylen <steve.traylen@cern.ch> - 2.4.0  
191 - * (#13205) Rotate array/string randomley based on fqdn, fqdn_rotate() (fef247b)  
192 -  
193 -2012-05-22 - Peter Meier <peter.meier@immerda.ch> - 2.3.3  
194 - * fix regression in #11017 properly (f0a62c7)  
195 -  
196 -2012-05-10 - Jeff McCune <jeff@puppetlabs.com> - 2.3.3  
197 - * Fix spec tests using the new spec_helper (7d34333)  
198 -  
199 -2012-05-10 - Puppet Labs <support@puppetlabs.com> - 2.3.2  
200 - * Make file_line default to ensure => present (1373e70)  
201 - * Memoize file_line spec instance variables (20aacc5)  
202 - * Fix spec tests using the new spec_helper (1ebfa5d)  
203 - * (#13595) initialize_everything_for_tests couples modules Puppet ver (3222f35)  
204 - * (#13439) Fix MRI 1.9 issue with spec_helper (15c5fd1)  
205 - * (#13439) Fix test failures with Puppet 2.6.x (665610b)  
206 - * (#13439) refactor spec helper for compatibility with both puppet 2.7 and master (82194ca)  
207 - * (#13494) Specify the behavior of zero padded strings (61891bb)  
208 -  
209 -2012-03-29 Puppet Labs <support@puppetlabs.com> - 2.1.3  
210 -* (#11607) Add Rakefile to enable spec testing  
211 -* (#12377) Avoid infinite loop when retrying require json  
212 -  
213 -2012-03-13 Puppet Labs <support@puppetlabs.com> - 2.3.1  
214 -* (#13091) Fix LoadError bug with puppet apply and puppet_vardir fact  
215 -  
216 -2012-03-12 Puppet Labs <support@puppetlabs.com> - 2.3.0  
217 -* Add a large number of new Puppet functions  
218 -* Backwards compatibility preserved with 2.2.x  
219 -  
220 -2011-12-30 Puppet Labs <support@puppetlabs.com> - 2.2.1  
221 -* Documentation only release for the Forge  
222 -  
223 -2011-12-30 Puppet Labs <support@puppetlabs.com> - 2.1.2  
224 -* Documentation only release for PE 2.0.x  
225 -  
226 -2011-11-08 Puppet Labs <support@puppetlabs.com> - 2.2.0  
227 -* #10285 - Refactor json to use pson instead.  
228 -* Maint - Add watchr autotest script  
229 -* Maint - Make rspec tests work with Puppet 2.6.4  
230 -* #9859 - Add root_home fact and tests  
231 -  
232 -2011-08-18 Puppet Labs <support@puppetlabs.com> - 2.1.1  
233 -* Change facts.d paths to match Facter 2.0 paths.  
234 -* /etc/facter/facts.d  
235 -* /etc/puppetlabs/facter/facts.d  
236 -  
237 -2011-08-17 Puppet Labs <support@puppetlabs.com> - 2.1.0  
238 -* Add R.I. Pienaar's facts.d custom facter fact  
239 -* facts defined in /etc/facts.d and /etc/puppetlabs/facts.d are  
240 - automatically loaded now.  
241 -  
242 -2011-08-04 Puppet Labs <support@puppetlabs.com> - 2.0.0  
243 -* Rename whole_line to file_line  
244 -* This is an API change and as such motivating a 2.0.0 release according to semver.org.  
245 -  
246 -2011-08-04 Puppet Labs <support@puppetlabs.com> - 1.1.0  
247 -* Rename append_line to whole_line  
248 -* This is an API change and as such motivating a 1.1.0 release.  
249 -  
250 -2011-08-04 Puppet Labs <support@puppetlabs.com> - 1.0.0  
251 -* Initial stable release  
252 -* Add validate_array and validate_string functions  
253 -* Make merge() function work with Ruby 1.8.5  
254 -* Add hash merging function  
255 -* Add has_key function  
256 -* Add loadyaml() function  
257 -* Add append_line native  
258 -  
259 -2011-06-21 Jeff McCune <jeff@puppetlabs.com> - 0.1.7  
260 -* Add validate_hash() and getvar() functions  
261 -  
262 -2011-06-15 Jeff McCune <jeff@puppetlabs.com> - 0.1.6  
263 -* Add anchor resource type to provide containment for composite classes  
264 -  
265 -2011-06-03 Jeff McCune <jeff@puppetlabs.com> - 0.1.5  
266 -* Add validate_bool() function to stdlib  
267 -  
268 -0.1.4 2011-05-26 Jeff McCune <jeff@puppetlabs.com>  
269 -* Move most stages after main  
270 -  
271 -0.1.3 2011-05-25 Jeff McCune <jeff@puppetlabs.com>  
272 -* Add validate_re() function  
273 -  
274 -0.1.2 2011-05-24 Jeff McCune <jeff@puppetlabs.com>  
275 -* Update to add annotated tag  
276 -  
277 -0.1.1 2011-05-24 Jeff McCune <jeff@puppetlabs.com>  
278 -* Add stdlib::stages class with a standard set of stages  
puppet/modules/stdlib/CONTRIBUTING.md
@@ -1,65 +0,0 @@ @@ -1,65 +0,0 @@
1 -# How to contribute  
2 -  
3 -Third-party patches are essential for keeping stdlib great. We simply can't  
4 -access the huge number of platforms and myriad configurations for running  
5 -stdlib. We want to keep it as easy as possible to contribute changes that  
6 -get things working in your environment. There are a few guidelines that we  
7 -need contributors to follow so that we can have a chance of keeping on  
8 -top of things.  
9 -  
10 -## Getting Started  
11 -  
12 -* Make sure you have a [Redmine account](http://projects.puppetlabs.com)  
13 -* Make sure you have a [GitHub account](https://github.com/signup/free)  
14 -* Submit a ticket for your issue, assuming one does not already exist.  
15 - * Clearly describe the issue including steps to reproduce when it is a bug.  
16 - * Make sure you fill in the earliest version that you know has the issue.  
17 -* Fork the repository on GitHub  
18 -  
19 -## Making Changes  
20 -  
21 -* Create a topic branch from where you want to base your work.  
22 - * This is usually the master branch.  
23 - * Only target release branches if you are certain your fix must be on that  
24 - branch.  
25 - * To quickly create a topic branch based on master; `git branch  
26 - fix/master/my_contribution master` then checkout the new branch with `git  
27 - checkout fix/master/my_contribution`. Please avoid working directly on the  
28 - `master` branch.  
29 -* Make commits of logical units.  
30 -* Check for unnecessary whitespace with `git diff --check` before committing.  
31 -* Make sure your commit messages are in the proper format.  
32 -  
33 -````  
34 - (#99999) Make the example in CONTRIBUTING imperative and concrete  
35 -  
36 - Without this patch applied the example commit message in the CONTRIBUTING  
37 - document is not a concrete example. This is a problem because the  
38 - contributor is left to imagine what the commit message should look like  
39 - based on a description rather than an example. This patch fixes the  
40 - problem by making the example concrete and imperative.  
41 -  
42 - The first line is a real life imperative statement with a ticket number  
43 - from our issue tracker. The body describes the behavior without the patch,  
44 - why this is a problem, and how the patch fixes the problem when applied.  
45 -````  
46 -  
47 -* Make sure you have added the necessary tests for your changes.  
48 -* Run _all_ the tests to assure nothing else was accidentally broken.  
49 -  
50 -## Submitting Changes  
51 -  
52 -* Sign the [Contributor License Agreement](http://links.puppetlabs.com/cla).  
53 -* Push your changes to a topic branch in your fork of the repository.  
54 -* Submit a pull request to the repository in the puppetlabs organization.  
55 -* Update your Redmine ticket to mark that you have submitted code and are ready for it to be reviewed.  
56 - * Include a link to the pull request in the ticket  
57 -  
58 -# Additional Resources  
59 -  
60 -* [More information on contributing](http://links.puppetlabs.com/contribute-to-puppet)  
61 -* [Bug tracker (Redmine)](http://projects.puppetlabs.com)  
62 -* [Contributor License Agreement](http://links.puppetlabs.com/cla)  
63 -* [General GitHub documentation](http://help.github.com/)  
64 -* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)  
65 -* #puppet-dev IRC channel on freenode.org  
puppet/modules/stdlib/Gemfile
@@ -1,42 +0,0 @@ @@ -1,42 +0,0 @@
1 -source "https://rubygems.org"  
2 -  
3 -def location_for(place, fake_version = nil)  
4 - mdata = /^(git:[^#]*)#(.*)/.match(place)  
5 - if mdata  
6 - [fake_version, { :git => mdata[1], :branch => mdata[2], :require => false }].compact  
7 - elsif place =~ /^file:\/\/(.*)/  
8 - ['>= 0', { :path => File.expand_path(mdata[1]), :require => false }]  
9 - else  
10 - [place, { :require => false }]  
11 - end  
12 -end  
13 -  
14 -group :development do  
15 - gem 'watchr'  
16 -end  
17 -  
18 -group :development, :test do  
19 - gem 'rake'  
20 - gem 'puppetmodule-stdlib', ">= 1.0.0", :path => File.expand_path("..", __FILE__)  
21 - gem 'rspec', "~> 2.11.0", :require => false  
22 - gem 'mocha', "~> 0.10.5", :require => false  
23 - gem 'puppetlabs_spec_helper', :require => false  
24 - gem 'rspec-puppet', :require => false  
25 -end  
26 -  
27 -facterversion = ENV['GEM_FACTER_VERSION']  
28 -if facterversion  
29 - gem 'facter', *location_for(facterversion)  
30 -else  
31 - gem 'facter', :require => false  
32 -end  
33 -  
34 -ENV['GEM_PUPPET_VERSION'] ||= ENV['PUPPET_GEM_VERSION']  
35 -puppetversion = ENV['GEM_PUPPET_VERSION']  
36 -if puppetversion  
37 - gem 'puppet', *location_for(puppetversion)  
38 -else  
39 - gem 'puppet', :require => false  
40 -end  
41 -  
42 -# vim:ft=ruby