Add -1 version suffix if not set on OSes with yum
MODIFY
libraries/recipe_helpers.rb
libraries/recipe_helpers.rb
@@ -12,9 +12,11 @@ class Chef
end
dd_agent_version = dd_agent_version[platform_family]
end
- if node['platform_family'] == 'suse' || node['platform_family'] == 'debian'
if !dd_agent_version.nil? && dd_agent_version.match(/^[0-9]+\.[0-9]+\.[0-9]+((?:~|-)[^0-9\s-]+[^-\s]*)?$/)
+ if node['platform_family'] == 'suse' || node['platform_family'] == 'debian'
dd_agent_version = '1:' + dd_agent_version + '-1'
+ elsif node['platform_family'] == 'rhel' || node['platform_family'] == 'fedora' || node['platform_family'] == 'amazon'
+ dd_agent_version += '-1'
end
end
dd_agent_version

Add -1 version suffix if not set on OSes with yum