crontab: ensure the script is run with shell

Some distros does not provide a default shell for Ceilometer user.
We can run the crontab by force shell usage and avoid running
issues.

Closes-bug: #1400523
Change-Id: I3a4d5c958a4620335d062baecfc362fd758768b6
This commit is contained in:
Emilien Macchi 2014-12-09 10:53:50 -05:00
parent c609affc2c
commit a83673c3ba
2 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ class ceilometer::expirer (
cron { 'ceilometer-expirer':
command => $ceilometer::params::expirer_command,
environment => 'PATH=/bin:/usr/bin:/usr/sbin',
environment => 'PATH=/bin:/usr/bin:/usr/sbin SHELL=/bin/sh',
user => 'ceilometer',
minute => $minute,
hour => $hour,

View File

@ -44,7 +44,7 @@ describe 'ceilometer::expirer' do
it 'configures a cron' do
should contain_cron('ceilometer-expirer').with(
:command => 'ceilometer-expirer',
:environment => 'PATH=/bin:/usr/bin:/usr/sbin',
:environment => 'PATH=/bin:/usr/bin:/usr/sbin SHELL=/bin/sh',
:user => 'ceilometer',
:minute => 1,
:hour => 0,