diff --git a/manifests/params.pp b/manifests/params.pp index 19d41dc..751b2eb 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -10,6 +10,12 @@ class consul_template::params { $package_ensure = 'latest' $version = '0.6.0' + case $::architecture { + 'x86_64', 'amd64': { $arch = 'amd64' } + 'i386': { $arch = '386' } + default: { fail("Unsupported kernel architecture: ${::architecture}") } + } + $os = downcase($::kernel) $init_style = $::operatingsystem ? { diff --git a/spec/classes/example_spec.rb b/spec/classes/example_spec.rb index db653b3..85fd692 100644 --- a/spec/classes/example_spec.rb +++ b/spec/classes/example_spec.rb @@ -8,7 +8,8 @@ describe 'consul_template' do let(:facts) {{ :osfamily => osfamily, :concat_basedir => '/foo', - :path => '/bin:/sbin:/usr/bin:/usr/sbin' + :path => '/bin:/sbin:/usr/bin:/usr/sbin', + :architecture => 'x86_64' }} it { is_expected.to compile.with_all_deps }