title: Puppet exec command runs in shell, but not via puppet
body: <p>I'm trying to use vagrant to set up a dev environment that automatically clones two repositories if they haven't already been cloned.</p>
  
  <p>I wrote a simple script to clone the repos, after failing in many, many ways to get puppet to run the git command directly.  For some reason I thought this method would be foolproof, but it turns out I'm a better fool than I thought.</p>
  
  <pre><code>exec {"load-repos":
      command =&gt;"/bin/bash /vagrant/manifests/modules/scripts/clone_repos.sh",
      require =&gt; Package["git-core"],
    }
  </code></pre>
  
  <p>Here's the script:</p>
  
  <pre><code>#!/bin/bash
  if [ ! -d /vagrant/repo-one-dest ]; then
    git clone git@example.com:/repo-one.git /vagrant/repo-one-dest
  fi
  
  if [ ! -d /vagrant/repo-two-dest ]; then
    git clone git@example.com:/repo-two.git /vagrant/repo-two-dest
  fi
  
  exit
  </code></pre>
  
  <p>The private keys are set up properly.  When I log into the vm and manually run <code>bash clone_repos.sh</code>, everything works.  No matter how many times I reload vagrant and let puppet do its thing, the repos are never loaded via the exec.  What am I missing?</p>