Use the platform_family? helper

It's much simpler than listing every single possible platform and it makes this actually work on Oracle

Signed-off-by: Tim Smith <tsmith@chef.io>
This commit is contained in:
Tim Smith 2019-02-13 16:06:30 -08:00
parent ec29727838
commit b07aed1c73
2 changed files with 2 additions and 4 deletions

View file

@ -1,8 +1,7 @@
# encoding: utf-8
# author: Christoph Hartmann
case node['platform']
when 'ubuntu', 'rhel', 'centos', 'fedora'
if platform_family?('rhel', 'debian', 'fedora')
docker_service 'default' do
action [:create, :start]
end

View file

@ -1,8 +1,7 @@
# encoding: utf-8
# author: Stephan Renatus
case node['platform']
when 'ubuntu', 'rhel', 'centos', 'fedora'
if platform_family?('rhel', 'debian', 'fedora')
execute 'iptables -A INPUT -i eth0 -p tcp -m tcp '\
'--dport 80 -m state --state NEW -m comment '\
'--comment "http on 80" -j ACCEPT'