From 208851572d43c1da493733efc7325d375b339cc7 Mon Sep 17 00:00:00 2001 From: Rick van de Loo Date: Sat, 22 Aug 2015 21:22:23 +0200 Subject: [PATCH 1/2] Add Archlinux to params Archlinux only has official support for systemd --- manifests/params.pp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/manifests/params.pp b/manifests/params.pp index 99b9c8d3..baa81f49 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -52,6 +52,8 @@ } else { $init_style = 'systemd' } + } elsif $::operatingsystem == 'Archlinux' { + $init_style = 'systemd' } elsif $::operatingsystem == 'SLES' { $init_style = 'sles' } elsif $::operatingsystem == 'Darwin' { From fa5b43724dd3c892104f6099b547397af8345724 Mon Sep 17 00:00:00 2001 From: Rick van de Loo Date: Sat, 22 Aug 2015 22:06:31 +0200 Subject: [PATCH 2/2] Add metadata and test for Archlinux --- metadata.json | 3 +++ spec/classes/init_spec.rb | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/metadata.json b/metadata.json index 207ece54..ec2fc1cd 100644 --- a/metadata.json +++ b/metadata.json @@ -60,6 +60,9 @@ "15.04" ] }, + { + "operatingsystem": "Archlinux" + }, { "operatingsystem": "Fedora", "operatingsystemrelease": [ diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index 3a382d14..4f3040cf 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -404,6 +404,15 @@ it { should contain_file('/etc/init.d/consul').with_content(/daemon --user=consul/) } end + context "On an Archlinux based OS" do + let(:facts) {{ + :operatingsystem => 'Archlinux', + }} + + it { should contain_class('consul').with_init_style('systemd') } + it { should contain_file('/lib/systemd/system/consul.service').with_content(/consul agent/) } + end + context "On an Amazon based OS" do let(:facts) {{ :operatingsystem => 'Amazon',