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
## 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 puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
>-----Original Message----- >From: puppet-users@googlegroups.com >[mailto:puppet-users@googlegroups.com] On Behalf Of Tim Dunphy >Sent: Wednesday, March 02, 2011 11:17 AM >To: puppet-users@googlegroups.com >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:9Take 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 puppet-users@googlegroups.com. >To unsubscribe from this group, send email to >puppet-users+unsubscribe@googlegroups.com. >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 puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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 <David.Kinzel@encana.com>
wrote:>
>>-----Original Message-----
>>From: puppet-users@googlegroups.com
>>[mailto:puppet-users@googlegroups.com] On Behalf Of Tim Dunphy
>>Sent: Wednesday, March 02, 2011 11:17 AM
>>To: puppet-users@googlegroups.com
>>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 puppet-users@googlegroups.com.
>>To unsubscribe from this group, send email to
>>puppet-users+unsubscribe@googlegroups.com.
>>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 puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
> 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 puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.