title: Executing bash script from puppet fails
body: <p>I have been trying to copy and execute a shell script residing in puppet master machine to my puppet agent</p>
  
  <p>This is my code</p>
  
  <pre><code>[root@ip-****** manifests]# cat site.pp
  class mymodule::myklass{
    file {'my_bash_script':
        ensure =&gt; 'file',
        source =&gt; '/etc/puppet/modules/mymodule/my_bash_script.sh',
        path   =&gt; '/home/ec2-user/my_bash_script.sh',
        owner  =&gt; 'root',
        mode   =&gt; '755',
        notify =&gt; Exec['run_my_script'],
    }
    exec { 'run_my_script':
      command =&gt; '/home/ec2-user/my_bash_script.sh',
    }
  }
  include mymodule::myklass
  </code></pre>
  
  <p>my script:</p>
  
  <pre><code>[root@ip-********* mymodule]# cat my_bash_script.sh
  #!/bin/sh
  mv /usr/bin/node /usr/bin/bnode
  ln -s /usr/local/bin/node /usr/bin/node
  mv /usr/bin/npm /usr/bin/bnpm
  ln -s /usr/local/bin/npm /usr/bin/npm
  </code></pre>
  
  <p>I am getting the following error:</p>
  
  <pre><code>[root@ip-*********** /]# puppet agent -t
  Info: Retrieving pluginfacts
  Info: Retrieving plugin
  Info: Loading facts
  Info: Caching catalog for ip*****************8
  Info: Applying configuration version '1472235841'
  Error: /Stage[main]/Mymodule::Myklass/File[my_bash_script]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///modules/mymodule/my_bash_script.sh
  Notice: /Stage[main]/Mymodule::Myklass/Exec[run_my_script]: Dependency File[my_bash_script] has failures: true
  Warning: /Stage[main]/Mymodule::Myklass/Exec[run_my_script]: Skipping because of failed dependencies
  Notice: Finished catalog run in 0.08 seconds
  </code></pre>
  
  <p>Can anyone please help me resolve this error?</p>