Merge "Restart Astute service when configuration file changes"

This commit is contained in:
Jenkins 2016-02-03 13:38:21 +00:00 committed by Gerrit Code Review
commit f770677736
2 changed files with 26 additions and 17 deletions

View File

@ -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',
}
}

View File

@ -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