sous-chefs / apache2

Development repository for the apache2 cookbook
https://supermarket.chef.io/cookbooks/apache2
Apache License 2.0
284 stars 548 forks source link

Heads up: Amazon Linux separate from RedHat in serverspec os object now #361

Closed yoshiwaan closed 7 years ago

yoshiwaan commented 9 years ago

https://github.com/serverspec/specinfra/releases

When running serverspec os[:family] reports amazon linux to be 'amazon' now instead of 'redhat'

This means that apache2/test/fixtures/serverspec_helper.rb will need updating with something like the following:

osmapping = {
  'amazon' => {
    :platform_family => 'rhel',
    :platform => 'amazon',
    :platform_version => '2014.09'
  },

I would say platform_version has to be 2014.09 as unless fauxhai has been updated pretty recently 2015.03 isn't supported yet

yoshiwaan commented 9 years ago

Hmm, it's a little trickier as in supported versions for Chefspec 2014.09 is used but when running serverspec then the logic in serverspec_helper.rb (below) sets the version to the latest amazon linux if you're using it (2015.03).

  # Hack: avoid freebsd to just use a release of 10 and force 10.0 instead to match chefspec
  if os[:release] && os[:family] != 'freebsd'
    ohaistub[:platform_version] = os[:release]
  else
    ohaistub[:platform_version] = osmapping[os[:family]][:platform_version]
  end

So either two json attribute files need to exist in test/fixtures/platforms/amazon or serverspec_help.rb needs updating to force 2014.09, of which the second is probably the better option.

svanzoest commented 9 years ago

Thanks for the heads up. We can also put in a request for 2015.03 be added to fauxhai

svanzoest commented 7 years ago

We now moved to inspec #460, so not directly related but also addressed with #478 .

lock[bot] commented 6 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.