Created
April 5, 2013 07:27
-
-
Save deric/5317291 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class apt::repo { | |
# Base Directory shortcut | |
$basedir = '/var/www/apt/repo' | |
# Main reprepro class | |
class { 'reprepro': | |
basedir => $basedir, | |
} | |
# Set up a repository | |
reprepro::repository { 'localpkgs': | |
ensure => present, | |
basedir => $basedir, | |
options => ['basedir .'], | |
} | |
# Create a distribution within that repository | |
reprepro::distribution { 'squeeze': | |
basedir => $basedir, | |
repository => 'localpkgs', | |
origin => 'myRepo', | |
label => 'myRepo', | |
suite => 'squeeze', | |
architectures => 'amd64 i386', | |
components => 'main contrib non-free', | |
description => 'Package repository for computing cloud', | |
sign_with => '3F125973', | |
not_automatic => 'No', | |
} | |
nginx::vhost { 'apt.fit.cvut.cz': | |
port => '8082', | |
root => "${basedir}/localpkgs", | |
user => 'www-data', | |
require => Reprepro::Distribution['squeeze'], | |
} | |
# Ensure your public key is accessible to download | |
file { "${basedir}/localpkgs/localpkgs.gpg": | |
ensure => present, | |
owner => 'www-data', | |
group => 'reprepro', | |
mode => '0644', | |
source => 'puppet:///modules/reprepro/localpkgs.gpg', | |
require => nginx::vhost['apt.fit.cvut.cz'], | |
} | |
# Set up an apt repo | |
apt::source { 'localpkgs': | |
location => 'http://apt.fit.cvut.cz:8082', | |
release => 'squeeze', | |
repos => 'main contrib non-free', | |
key => '3F125973', | |
key_source => 'http://apt.fit.cvut.cz:8082/localpkgs.gpg', | |
require => File["${basedir}/localpkgs/localpkgs.gpg"], | |
include_src => false, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment