diff --git a/.bundle/config b/.bundle/config new file mode 100644 index 0000000..57d4641 --- /dev/null +++ b/.bundle/config @@ -0,0 +1,3 @@ +--- +BUNDLE_PATH: vendor/bundle +BUNDLE_DISABLE_SHARED_GEMS: '1' diff --git a/.fixtures.yml b/.fixtures.yml index 0ee69a1..c32c285 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -1,5 +1,8 @@ fixtures: - repositories: - "stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git" + forge_modules: + stdlib: + repo: "puppetlabs/stdlib" + epel: + repo: "stahnma/epel" symlinks: "rsnapshot": "#{source_dir}" diff --git a/manifests/init.pp b/manifests/init.pp index d798bc3..5c9e950 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -14,9 +14,7 @@ class rsnapshot ( $package_ensure = $rsnapshot::params::package_ensure, $cron = $rsnapshot::params::cron, ) inherits rsnapshot::params { - if $puppetversion =~ /^(1|2|3)/ { - fail('This module requires Puppet 4') - } + if $hosts { class { '::rsnapshot::install': }-> class { '::rsnapshot::config': } diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index 9707e8c..05d37a9 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -2,6 +2,4 @@ require 'spec_helper' describe 'rsnapshot' do it { should contain_class('rsnapshot::params') } it { is_expected.to compile } - it { is_expected.to contain_class('rsnapshot::config') } - it { is_expected.to contain_class('rsnapshot::install') } end