Does anyone have any advice on simulating the environment and conditions 
under which processes are run by Puppet? I'd really like to get the bottom 
of this, as other commands I'm running via other classes are working fine.

Thanks,

Patrick


On Monday, 23 December 2013 12:12:40 UTC-8, Patrick Gibson wrote:
>
> If I manually clone the repo, I get a similarly puzzling error:
>
> Error: /Stage[main]/myuser/Vcsrepo[/home/myuser/myrepo]: Could not 
> evaluate: Execution of '/usr/bin/su myuser -c "/usr/local/bin/git config 
> remote.origin.url"' returned 127: -su: /usr/local/bin/git config 
> remote.origin.url: No such file or directory
>
>
>
> On Saturday, 21 December 2013 18:33:45 UTC-8, Patrick Gibson wrote:
>>
>> I'm using the vcsrepo module to clone a git repo as a particular user, 
>> and I'm getting a puzzling error:
>>
>> Debug: Executing '/usr/bin/su myuser -c "/usr/local/bin/git clone 
>> g...@git.myhostname.com:repos/myrepo.git /home/myuser/myrepo"'
>> Error: Execution of '/usr/bin/su myuser -c "/usr/local/bin/git clone 
>> g...@git.myhostname.com:repos/myrepo.git /home/myuser/myrepo"' returned 127: 
>> su: /usr/local/bin/git clone g...@git.myhostname.com:repos/myrepo.git 
>> /home/myuser/myrepo: No such file or directory
>>
>> When I copy and paste the exact command and run it, it works fine. I 
>> can't figure out what would be complaining about "No such file or 
>> directory". Every executable and path mentioned in the command exists. 
>>
>> My relevant classes look like this:
>>
>> class sshd {
>>   file { "/etc/ssh/sshd_config":
>>     source => "puppet:///modules/sshd/sshd_config",
>>     notify => Service["sshd"]
>>   }
>>
>>   file { "/etc/ssh/ssh_config":
>>     source => "puppet:///modules/sshd/ssh_config",
>>     notify => Service["sshd"]
>>   }
>>
>>   service { "sshd":
>>     ensure => "running",
>>   }
>> }
>>
>> class myuser {
>>   file { "/home/myuser/.ssh":
>>     ensure => "directory",
>>     mode   => "0700",
>>     owner  => "myuser",
>>     group  => "myuser",
>>   }
>>
>>   file { "/home/myuser/.ssh/known_hosts":
>>     source => "puppet:///modules/myuser/.ssh/known_hosts",
>>     owner  => "myuser",
>>     group  => "myuser",
>>   }
>>
>>   file { "/home/myuser/.ssh/id_rsa":
>>     source => "puppet:///modules/myuser/.ssh/id_rsa",
>>     mode   => "0600",
>>     owner  => "myuser",
>>     group  => "myuser",
>>   }
>>
>>   vcsrepo { "/home/myuser/myrepo":
>>     require  => Class["sshd"],
>>     ensure   => present,
>>     provider => git,
>>     source   => 'g...@git.myhostname.com:repos/myrepo.git',
>>     revision => 'master',
>>     user     => 'myuser'
>>   }
>> }
>>
>> Any pointers?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/8bb3247d-b2e1-4e98-aa39-8a11c49c2760%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to