diff --git a/.fixtures.yml b/.fixtures.yml index 8531d19..d0e14c5 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -3,8 +3,5 @@ fixtures: stdlib: repo: "puppetlabs/stdlib" ref: "4.1.0" - apt: - repo: "puppetlabs/apt" - ref: "2.1.0" symlinks: varnish: "#{source_dir}" diff --git a/CHANGELOG b/CHANGELOG index 3d92d75..c5c8be8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2017-10-11 Release 2.0.0 +- Remove varnish::repo and apt dependency. Users should manage their own apt repos. + 2015-07-23 Release 1.1.0 - Support puppetlabs/apt >=2.0.0 - Not backwards compat with puppetlabs/apt <2.0.0 diff --git a/Gemfile b/Gemfile index 8e87698..0ee8890 100644 --- a/Gemfile +++ b/Gemfile @@ -1,12 +1,12 @@ source "https://rubygems.org" group :test do - gem "rake" + gem "rake", '< 11.0' gem "puppet", ENV['PUPPET_VERSION'] || '~> 3.7.0' gem "rspec", '< 3.2.0' gem "rspec-puppet", :git => 'https://github.com/rodjek/rspec-puppet.git' gem "puppetlabs_spec_helper" - gem "metadata-json-lint" + gem "metadata-json-lint", '<= 0.0.19' gem "rspec-puppet-facts" end diff --git a/README.md b/README.md index f929a30..97b9259 100644 --- a/README.md +++ b/README.md @@ -70,31 +70,6 @@ varnish::instance { 'instance0' : } ``` -### Repo - -This varnish module currently uses the public repo.varnish-cache.org debian -repository. If you want to use another repo, you can do it like the varnish -package above, with class parameters or hiera. - -*Class Parameters* -```puppet -class { 'varnish' : - apt_location => 'http://some.other.repo', - apt_repos => 'main restricted universe', - ... -} -``` - -*Hiera* -``` ---- -varnish::apt_location: 'http://some.other/repo' -varnish::apt_repos: 'repo-name' -varnish::apt_key: 'XXXXXX' -varnish::key_source: 'http://some.other/key.txt' -varnish::apt_include_src: false -``` - ### Configs The varnish::instance type ships with a pretty simple config. You can pass diff --git a/manifests/init.pp b/manifests/init.pp index 851d5c8..81f225d 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -12,39 +12,15 @@ # [*package_ensure*] # You can ensure a specific package version here, defaults to 'present'. # -# [*apt_location*] -# The location of the varnish apt repository -# -# [*apt_repos*] -# The repo names to use. If multiple, space separated string. -# -# [*apt_key*] -# The public apt key of the repo. -# -# [*apt_key_source*] -# A url key source for the apt key. -# -# [*apt_include_src*] -# Whether to include the apt source. -# class varnish ( $packages = hiera('varnish::packages', $varnish::params::packages), $package_ensure = hiera('varnish::package_ensure', $varnish::params::package_ensure), - $apt_location = hiera('varnish::apt_location', - $varnish::params::apt_location), - $apt_repos = hiera('varnish::apt_repos', - $varnish::params::apt_repos), - $apt_key = hiera('varnish::apt_key', $varnish::params::apt_key), - $apt_key_source = hiera('varnish::key_source', - $varnish::params::apt_key_source), - $apt_include_src = hiera('varnish::apt_include_src', true), ) inherits varnish::params { # validate parameters here anchor { 'varnish::begin': } -> - class { 'varnish::repo': } -> class { 'varnish::install': } -> class { 'varnish::config': } -> class { 'varnish::service': } -> diff --git a/manifests/params.pp b/manifests/params.pp index ccfdd02..46751e0 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -11,10 +11,6 @@ $service_name = 'varnish' $vmod_dependencies = ['build-essential', 'dpkg-dev', 'libtool', 'pkg-config', 'libpcre3-dev', 'git-core'] - $apt_location = 'http://repo.varnish-cache.org/debian/' - $apt_repos = 'varnish-3.0' - $apt_key = 'C4DEFFEB' - $apt_key_source = 'http://repo.varnish-cache.org/debian/GPG-key.txt' } default: { fail("${::operatingsystem} not supported") diff --git a/manifests/repo.pp b/manifests/repo.pp deleted file mode 100644 index 249114e..0000000 --- a/manifests/repo.pp +++ /dev/null @@ -1,22 +0,0 @@ -# == Class varnish::repo -# -# This class is called from varnish. It ensures the varnish apt repo is -# installed. It will fail if called on it's own. -# -class varnish::repo { - include apt - - apt::source { 'varnish-cache': - location => $::varnish::apt_location, - release => $::lsbdistcodename, - repos => $::varnish::apt_repos, - key => { - 'id' => $::varnish::apt_key, - 'source' => $::varnish::apt_key_source, - }, - include => { - 'deb' => 'true', - 'src' => $::varnish::apt_include_src, - }, - } -} diff --git a/metadata.json b/metadata.json index 85ea02f..2930ca8 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "chartbeat-varnish", - "version": "1.1.0", + "version": "2.0.0", "author": "chartbeat", "summary": "Module to manage the Varnish Web Accelerator", "license": "MIT", @@ -12,10 +12,6 @@ { "name": "puppetlabs/stdlib", "version_requirement": ">=4.0.0" - }, - { - "name": "puppetlabs/apt", - "version_requirement": ">=2.0.0" } ], "operatingsystem_support": [ diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index 6c8cc07..cabcc79 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -12,7 +12,6 @@ }} it { should contain_class('varnish::params') } - it { should contain_class('varnish::repo') } it { should contain_class('varnish::install') } it { should contain_class('varnish::config') } it { should contain_class('varnish::service') } diff --git a/spec/classes/repo_spec.rb b/spec/classes/repo_spec.rb deleted file mode 100644 index a380672..0000000 --- a/spec/classes/repo_spec.rb +++ /dev/null @@ -1,44 +0,0 @@ -require 'spec_helper' - -describe 'varnish', :type => :class do - describe 'varnish::repo class on Debian' do - let(:facts) {{ - :osfamily => 'Debian', - :lsbdistid => 'Ubuntu', - :lsbdistcodename => 'precise', - }} - - it { should contain_class('apt') } - - context 'with no parameters' do - it { should contain_apt__source('varnish-cache').with({ - 'location' => 'http://repo.varnish-cache.org/debian/', - 'release' => 'precise', - 'repos' => 'varnish-3.0', - 'key' => { 'id' => 'C4DEFFEB', 'source' => 'http://repo.varnish-cache.org/debian/GPG-key.txt', }, - 'include' => { 'deb' => true, 'src' => 'true' }, - - }) - } - end - - context 'with parameters specified' do - let(:params) {{ - :apt_location => 'http://example.com/debian', - :apt_repos => 'main', - :apt_key => 'FFFFFFFF', - :apt_key_source => 'http://example.com/foo.txt', - :apt_include_src => false, - }} - - it { should contain_apt__source('varnish-cache').with({ - 'location' => 'http://example.com/debian', - 'release' => 'precise', - 'repos' => 'main', - 'key' => { 'id' => 'FFFFFFFF', 'source' => 'http://example.com/foo.txt', }, - 'include' => { 'deb' => true, 'src' => 'false' }, - }) - } - end - end -end diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 2704fc2..3e16689 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -25,7 +25,6 @@ puppet_module_install(:source => proj_root, :module_name => 'varnish') hosts.each do |host| on host, puppet('module', 'install', 'puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] } - on host, puppet('module', 'install', 'puppetlabs-apt'), { :acceptable_exit_codes => [0,1] } end end end