diff --git a/lib/puppet/type/glance_api_config.rb b/lib/puppet/type/glance_api_config.rb index 76673e1b..2a96e5c9 100644 --- a/lib/puppet/type/glance_api_config.rb +++ b/lib/puppet/type/glance_api_config.rb @@ -46,12 +46,10 @@ Puppet::Type.newtype(:glance_api_config) do defaultto('') end - if Facter['osfamily'].value == 'Debian' - autorequire(:package) do + autorequire(:package) do + if Facter.value(:osfamily) == 'Debian' 'glance-api' - end - elsif Facter['osfamily'].value == 'RedHat' - autorequire(:package) do + elsif Facter.value(:osfamily) == 'RedHat' 'openstack-glance' end end diff --git a/lib/puppet/type/glance_api_paste_ini.rb b/lib/puppet/type/glance_api_paste_ini.rb index f83467c2..aefcca4f 100644 --- a/lib/puppet/type/glance_api_paste_ini.rb +++ b/lib/puppet/type/glance_api_paste_ini.rb @@ -45,12 +45,10 @@ Puppet::Type.newtype(:glance_api_paste_ini) do defaultto('') end - if Facter['osfamily'].value == 'Debian' - autorequire(:package) do + autorequire(:package) do + if Facter.value(:osfamily) == 'Debian' 'glance-api' - end - elsif Facter['osfamily'].value == 'RedHat' - autorequire(:package) do + elsif Facter.value(:osfamily) == 'RedHat' 'openstack-glance' end end diff --git a/lib/puppet/type/glance_cache_config.rb b/lib/puppet/type/glance_cache_config.rb index bacf0fd8..1ed4a3e1 100644 --- a/lib/puppet/type/glance_cache_config.rb +++ b/lib/puppet/type/glance_cache_config.rb @@ -46,12 +46,10 @@ Puppet::Type.newtype(:glance_cache_config) do defaultto('') end - if Facter['osfamily'].value == 'Debian' - autorequire(:package) do + autorequire(:package) do + if Facter.value(:osfamily) == 'Debian' 'glance-api' - end - elsif Facter['osfamily'].value == 'RedHat' - autorequire(:package) do + elsif Facter.value(:osfamily) == 'RedHat' 'openstack-glance' end end diff --git a/lib/puppet/type/glance_registry_config.rb b/lib/puppet/type/glance_registry_config.rb index e5d8ab6d..a8e0b1ed 100644 --- a/lib/puppet/type/glance_registry_config.rb +++ b/lib/puppet/type/glance_registry_config.rb @@ -46,12 +46,10 @@ Puppet::Type.newtype(:glance_registry_config) do defaultto('') end - if Facter['osfamily'].value == 'Debian' - autorequire(:package) do + autorequire(:package) do + if Facter.value(:osfamily) == 'Debian' 'glance-registry' - end - elsif Facter['osfamily'].value == 'RedHat' - autorequire(:package) do + elsif Facter.value(:osfamily) == 'RedHat' 'openstack-glance' end end diff --git a/lib/puppet/type/glance_registry_paste_ini.rb b/lib/puppet/type/glance_registry_paste_ini.rb index b9414fd0..0c5b73c4 100644 --- a/lib/puppet/type/glance_registry_paste_ini.rb +++ b/lib/puppet/type/glance_registry_paste_ini.rb @@ -45,12 +45,10 @@ Puppet::Type.newtype(:glance_registry_paste_ini) do defaultto('') end - if Facter['osfamily'].value == 'Debian' - autorequire(:package) do + autorequire(:package) do + if Facter.value(:osfamily) == 'Debian' 'glance-registry' - end - elsif Facter['osfamily'].value == 'RedHat' - autorequire(:package) do + elsif Facter.value(:osfamily) == 'RedHat' 'openstack-glance' end end