title: puppet exec returned 1 instead of [0]
body: <p>I'm trying to run puppet to provision a virtual machine.  The command it fails on is an Exec.</p>
  
  <pre><code>exec { 'configure openssl-arm': 
             logoutput =&gt; on_failure, 
             loglevel =&gt; verbose, 
             command =&gt; '/opt/openssl-1.0.1g/Configure dist --prefix=/opt/openssl-1.0.1g/armbuild', 
             cwd =&gt; '/opt/openssl-1.0.1g', 
             user =&gt; root, 
             environment =&gt; 'CC=arm-axis-linux-gnueabi-gcc' 
        }
  </code></pre>
  
  <p>I'm pretty confident this is more of a puppet issue.</p>
  
  <p>The command I'm trying to run is through <strong>exec</strong>.  If I vagrant ssh in, I can run the command manually.  </p>
  
  <p><strong>puppet:</strong>
  err: /Stage[main]//Exec[configure openssl-arm]/returns: change from notrun to 0 failed: /opt/openssl-1.0.1g/Configure dist --prefix=/opt/openssl-1.0.1g/armbuild returned 1 instead of one of [0] at /tmp/vagrant-puppet-6/manifests/default.pp:36</p>
  
  <p><strong>manual</strong>:</p>
  
  <pre><code>local&gt; vagrant ssh
  vagrant@precise32 &gt; sudu su
  root@precise32 &gt; export CC=arm-axis-linux-gnuabi-gcc
  root@precise32 &gt; /opt/openssl-1.0.1g/Configure dist --prefix=/opt/openssl-1.0.1g/armbuild
  ....
  .... lots of output
  ....
  root@precise32 &gt; echo $?
  0
  </code></pre>
  
  <p><strong>sudo puppet apply</strong></p>
  
  <pre><code>debug: /Schedule[hourly]: Skipping device resources because running on a host
  debug: Exec[configure openssl-arm](provider=posix): Executing '/opt/openssl-1.0.1g/Configure dist --prefix=/opt/openssl-1.0.1g/armbuild'
  debug: Executing '/opt/openssl-1.0.1g/Configure dist --prefix=/opt/openssl-1.0.1g/armbuild'
  err: /Stage[main]//Exec[configure openssl-arm]/returns: change from notrun to 0 failed: /opt/openssl-1.0.1g/Configure dist --prefix=/opt/openssl-1.0.1g/armbuild returned 1 instead of one of [0] at /tmp/build.pp:1
  debug: /Schedule[never]: Skipping device resources because running on a host
  debug: /Schedule[weekly]: Skipping device resources because running on a host
  debug: /Schedule[puppet]: Skipping device resources because running on a host
  debug: Finishing transaction -613771238
  </code></pre>
  
  <p><strong>vagrant box</strong>
  <a href="https://drive.google.com/file/d/0B7B7RIseycQkTGxXczRqVGdDVGs/edit?usp=sharing" rel="nofollow">https://drive.google.com/file/d/0B7B7RIseycQkTGxXczRqVGdDVGs/edit?usp=sharing</a></p>