Report abuse

=== 'test' is not in the path:
        exec{"testdir":
                path    => "/bin",
                command => "mkdir /media/home/apienaar/test/subdir",
                onlyif  => "test -d /media/home/apienaar/test",
                creates => "/media/home/apienaar/test/subdir"
        }

=== puppet gives no error or warning about 'test' not working or existing in path
$ puppet --debug --verbose --trace test.pp
debug: Creating default schedules
debug: //Exec[testdir]: Executing check 'test -d /media/home/apienaar/test'
debug: Executing 'test -d /media/home/apienaar/test'
debug: Finishing transaction -607505728 with 0 changes

=== adjust test.pp to have full path to 'test'
debug: Creating default schedules
debug: //Exec[testdir]: Executing check '/usr/bin/test -d /media/home/apienaar/test'
debug: Executing '/usr/bin/test -d /media/home/apienaar/test'
debug: //Exec[testdir]: Changing returns
debug: //Exec[testdir]: 1 change(s)
debug: //Exec[testdir]: Executing 'mkdir /media/home/apienaar/test/subdir'
debug: Executing 'mkdir /media/home/apienaar/test/subdir'
notice: //Exec[testdir]/returns: executed successfully
debug: Finishing transaction -607784878 with 1 changes