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' { 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',