On Thursday, May 23, 2013 at 12:48 AM, Kannan Manickam wrote:
John,Yes, that is the expected behavior. The block inside the ruby block gets executed during the converge phase where as the attributes for the mount resources gets set during the compile phase. So even though the the mount resource's action gets executed during the converge phase the value of the attributes for that resource will not get updated after the ruby block's execution.You have three possible solutions here:1. Change the ruby_block to get executed during compile time if that will work for you.2. Change the logic of mount to be executed as ruby code inside the ruby_block itself.3. Few days ago, I was playing with a hack to dynamically setting attributes of resources https://gist.github.com/arangamani/4659646 - It is not a cleaner way but a working solution.I would be glad to know if there are other solutions.Cheers,Kannan.
Archive powered by MHonArc 2.6.16.