- From: Brian Hatfield <
>
- To:
- Subject: [chef] Iterating through parameters when a resource is retried
- Date: Fri, 11 Jan 2013 16:36:11 -0500
Given a resource like the following:
apt_repository "global-generic" do
uri "SOMEURI"
distribution "SOMEDISTRO"
keyserver key_server
key apt_key
retries 2
end
it will retry if for example the keyserver is not reachable. For whatever reason, we are finding that large number of keyservers are not long-term reliable, or we are getting blocked, or something, but our keyserver requests time out.
What I would like to do is make keyserver be a list, and if the first item on the list fails, iterate to the second and so-on.
However, when I try this (ie, key_servers.pop), in practice it pops one item off the list and retries that item over and over rather than 'pop'ing a new item on each retry. I get that this is because of the way that convergence and such occurs, but is there any way for me to retry with different values?
Thank you!
Brian Hatfield
- [chef] Iterating through parameters when a resource is retried, Brian Hatfield, 01/11/2013
Archive powered by MHonArc 2.6.16.