Check if python-software-properties is defined before attempting to define it.
Reviewed and tested by Ryan Coleman (ryan@puppetlabs.com)
false => true
}
- package { "python-software-properties": }
+ if ! defined(Package["python-software-properties"]) {
+ package { "python-software-properties": }
+ }
file { "sources.list":
path => "${apt::params::root}/sources.list",
end
end
end
+
+ describe "it should not error if package['python-software-properties'] is already defined" do
+ let(:pre_condition) { 'package { "python-software-properties": }->Class["Apt"]' }
+ it { should contain_package("python-software-properties") }
+ end
end