Moved conditional code to Puppet Exec onlyif block