Stromweld/chef_timezone_iii

Amazon Linux not handled properly

Closed this issue · 4 comments

I'm using AmazonLinux and tried to use this cookbook, and then faced an issue.

On my server ohai output looks like below

{
  "platform": "amazon",
  "platform_version": "2017.03",
  "platform_family": "rhel",
  ...
}

and timezone_iii::default goes into branches with node['platform_family'], not with node['platform']:
https://github.com/Stromweld/timezone_iii/blob/master/recipes/default.rb#L25-L30

So all AmazonLinux servers go into rhel7 branch and never goes into amazon.

For now my only workaround is installing tzdata in other place and include_recipe 'timezone_iii::amazon'.

what version of chef-client are you using?

Chef client 13 they changed amazon to it's own platform-family. The metadata in here needs to be updated to reflect chef-client 13+.

I added a note in the readme for chef-client 13 when running amazon linux. Other OS's 12.x works just fine.

Understood. I used chef-client 12.19.36, which was too old.
Thank you!