Hello David,

 I actually got the problem worked out this way:

 exec { "/usr/bin/wget http://apt.sw.be/RPM-GPG-KEY.dag.txt":
        cwd => "/etc/pki/rpm-gpg/",
        creates => "/etc/pki/rpm-gpg/RPM-GPG-KEY.dag.txt",
        path => "/usr/bin"
 }


 exec { "/bin/rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY.dag.txt":
        cwd => "/etc/pki/rpm-gpg",
        require => Exec["/usr/bin/wget http://apt.sw.be/RPM-GPG-KEY.dag.txt";],
        path => "/bin"
 }


But I suppose I could try throwing a source attribute in there and
achieve the same effect.

Thank you for your input!

Tim

On Wed, Mar 2, 2011 at 1:54 PM, Kinzel, David <[email protected]> wrote:
>
>>-----Original Message-----
>>From: [email protected]
>>[mailto:[email protected]] On Behalf Of Tim Dunphy
>>Sent: Wednesday, March 02, 2011 11:17 AM
>>To: [email protected]
>>Subject: [Puppet Users] exec resource failing
>>
>>hello list
>>
>>I was hoping to get an opinion as to why the following error is
>>occurring with an exec resource I am attempting to use:
>>
>>
>>
>>err: //centos/Exec[/usr/bin/wget
>>http://apt.sw.be/RPM-GPG-KEY.dag.txt/bin/rpm --import
>>/etc/pki/rpm-gpg/RPM-GPG-KEY.dag.txt]/returns: chan
>>ge from notrun to 0 failed: /usr/bin/wget
>>http://apt.sw.be/RPM-GPG-KEY.dag.txt/bin/rpm --import
>>/etc/pki/rpm-gpg/RPM-GPG-KEY.dag.txt retur
>>ned 2 instead of one of [0] at /etc/puppet/manifests/os/centos.pp:9
>
> Take a close look at what it's actually trying to run.
>
> It would probably be a good idea to separate the two ideas out: get the
> file using file source=>"" first, and then import the key if it isn't
> already in there.
>
>>
>>## centos.pp
>>
>> $keycmds = ["/usr/bin/wget http://apt.sw.be/RPM-GPG-KEY.dag.txt";,
>>"/bin/rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY.dag.txt"]
>>
>> exec { $keycmds:
>>        cwd => "/etc/pki/rpm-gpg/",
>>        creates => "/etc/pki/rpm-gpg/RPM-GPG-KEY.dag.txt",
>>        path => ["/bin","/usr/bin"]
>> }
>>
>>
>>thanks in advance!
>>tim
>>
>>--
>>GPG me!!
>>
>>gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
>>
>>--
>>You received this message because you are subscribed to the
>>Google Groups "Puppet Users" group.
>>To post to this group, send email to [email protected].
>>To unsubscribe from this group, send email to
>>[email protected].
>>For more options, visit this group at
>>http://groups.google.com/group/puppet-users?hl=en.
>>
>>
>
> This email communication and any files transmitted with it may contain 
> confidential and or proprietary information and is provided for the use of 
> the intended recipient only.  Any review, retransmission or dissemination of 
> this information by anyone other than the intended recipient is prohibited.  
> If you receive this email in error, please contact the sender and delete this 
> communication and any copies immediately.  Thank you.
> http://www.encana.com
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.
>
>



-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to