I have the following exec statement:
exec { 'enable-locale':
command => 'sed -i "/^#en_US.*/s/^#//" /etc/locale.gen',
provider => shell, # for grep
unless => 'locale -a | grep -i en_US.utf8',
path => '/usr/bin',
}
Which returns the following error:
Error: /Stage[main]/Qdii::Base/Exec[enable-locale]: Could not evaluate: /bin/sh: 1: grep: not found
I find this curious, as the same shell command works fine:
$ /bin/sh -c 'locale -a | grep -i en_US.utf8'
en_US.utf8