Gusto / it-cpe-opensource

Tools used by the CPE team at Gusto to manage our endpoints and software deployment systems.
Other
59 stars 29 forks source link

refactor configure block and better logging #10

Closed erikng closed 4 years ago

erikng commented 4 years ago

I noticed that the ruby_block is not idempotent before merging it internally, so if you are trying to get to 0 resources updated at the end of your run, this makes it impossible.

After thinking through the code, I realized it ultimately falls into ensuring the guard is run at runtime. This greatly reduces it's complexity and functions similarly.

I did drop the warning about unsupported keys, because that's not going to be possible with the guard and I think it outweighs the need for someone to just realize this (since it's documented anyway in the attributes file).

This also bails on the configure block and warns if it's used in conjunction with installing via profile, since we found out it fails.