Avoiding exec error
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 16 Jul 2009 18:08:49 +0000 (15:08 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 16 Jul 2009 18:08:49 +0000 (15:08 -0300)
Trying to force path so puppet doesn't issue the following error:

  Could not create true # require_lsbdistcodename: 'true #
  require_lsbdistcodename' is both unqualifed and specified no search path
  at /etc/puppet/modules/common/manifests/classes/lsb_release.pp:40

manifests/classes/lsb_release.pp

index 5745072..c08b8c2 100644 (file)
@@ -33,11 +33,11 @@ class assert_lsbdistcodename {
                                        err("lsb_release was unable to report your distcodename; please set facter_lsbdistcodename in the environment of $fqdn")
                                }
                        }
-                       exec { "false # assert_lsbdistcodename": alias => assert_lsbdistcodename, loglevel => err }
+                       exec { "/bin/false # assert_lsbdistcodename": alias => assert_lsbdistcodename, loglevel => err }
                }
                default: {
-                       exec { "true # assert_lsbdistcodename": alias => assert_lsbdistcodename, loglevel => debug }
-                       exec { "true # require_lsbdistcodename": alias => require_lsbdistcodename, loglevel => debug }
+                       exec { "/bin/true # assert_lsbdistcodename": alias => assert_lsbdistcodename, loglevel => debug }
+                       exec { "/bin/true # require_lsbdistcodename": alias => require_lsbdistcodename, loglevel => debug }
                }
        }