diff --git a/deployment/puppet/nailgun/manifests/astute.pp b/deployment/puppet/nailgun/manifests/astute.pp index e1e5752b52..79d37cab78 100644 --- a/deployment/puppet/nailgun/manifests/astute.pp +++ b/deployment/puppet/nailgun/manifests/astute.pp @@ -31,35 +31,35 @@ class nailgun::astute( owner => 'root', group => 'root', mode => '0644' - } + } ~> Service <| title == 'astute' |> file { '/usr/bin/astuted': content => template('nailgun/astuted.erb'), - owner => 'root', - group => 'root', - mode => 0755, - } + owner => 'root', + group => 'root', + mode => '0755', + } ~> Service <| title == 'astute' |> file {"/etc/astute": ensure => directory, - owner => 'root', - group => 'root', - mode => 0755, + owner => 'root', + group => 'root', + mode => '0755', } file {"/etc/astute/astuted.conf": - content => template("nailgun/astuted.conf.erb"), - owner => 'root', - group => 'root', - mode => 0644, - require => File["/etc/astute"], - } + content => template('nailgun/astuted.conf.erb'), + owner => 'root', + group => 'root', + mode => '0644', + require => File['/etc/astute'], + } ~> Service <| title == 'astute' |> file {"/var/log/astute": ensure => directory, - owner => 'root', - group => 'root', - mode => 0755, + owner => 'root', + group => 'root', + mode => '0755', } } diff --git a/tests/noop/spec/hosts/master/astute-only_spec.rb b/tests/noop/spec/hosts/master/astute-only_spec.rb index a188396823..4e359ebd90 100644 --- a/tests/noop/spec/hosts/master/astute-only_spec.rb +++ b/tests/noop/spec/hosts/master/astute-only_spec.rb @@ -75,6 +75,15 @@ describe manifest do }) end end + + it { + should contain_file('/etc/astute/astuted.conf').with({ + :mode => '0644', + :owner => 'root', + :group => 'root', + :require => 'File[/etc/astute]' + }).that_notifies('Service[astute]') + } end end