From 59d4de145ae194e5ff57deeb0e6c42908b2427f9 Mon Sep 17 00:00:00 2001 From: Darren Coxall Date: Tue, 20 Jan 2015 17:04:23 +0000 Subject: [PATCH] Add Amazon init support --- manifests/params.pp | 1 + spec/classes/init_spec.rb | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/manifests/params.pp b/manifests/params.pp index f1382bc9..67543e93 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -39,6 +39,7 @@ 'Debian' => 'debian', 'SLES' => 'sles', 'Darwin' => 'launchd', + 'Amazon' => 'sysv', default => undef } if $init_style == undef { diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index 13166567..c74b255b 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -254,6 +254,16 @@ it { should contain_file('/etc/init.d/consul').with_content(/daemon --user=consul/) } end + context "On an Amazon based OS" do + let(:facts) {{ + :operatingsystem => 'Amazon', + :operatingsystemrelease => '3.10.34-37.137.amzn1.x86_64' + }} + + it { should contain_class('consul').with_init_style('sysv') } + it { should contain_file('/etc/init.d/consul').with_content(/daemon --user=consul/) } + end + context "On a redhat 7 based OS" do let(:facts) {{ :operatingsystem => 'CentOS',