Closed jantman closed 9 years ago
As an example, see https://github.com/berkshelf/vagrant-berkshelf/blob/master/lib/vagrant-berkshelf/plugin.rb and https://github.com/berkshelf/vagrant-berkshelf/blob/master/lib/vagrant-berkshelf/config.rb and https://github.com/berkshelf/vagrant-berkshelf/blob/master/lib/vagrant-berkshelf/action/base.rb#L17
So I think the plan is:
I think the key here is splitting the modulegetter logic between two classes, one for config validate and the other for provision. Provision would call the config validate one first.
Fixed with #23
I've recently gotten reports ( #7, #8 ) of r10k doing the module provisioning 2-3 times and this being a problem. For starters, investigate whether we can reliably separate config validation from provisioning, or whether there was a reason we're doing both all the time. The current behavior is that the r10k deploy actually runs twice; once during config validation and again during provisioning. This is pretty clearly because we're running the same code during both hooks - see lines 20-23 specifically line 22.