Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

Cannot set a flag inside a .each iteration and use it outside of it

$
0
0
Hi. This might be a dumb question, but i`m going to ask it anyway :) So.. i have a hashes array . I need to iterate trough all the hashes in the array, and if a certain key in any hash matches a desired value, i need to set a flag e.g "$flag = true". Outside of the loop, i need to execute some tasks if the $flag is NOT true. I am not a puppet advanced user.. yet. Puppet scoping does not allow me to use the $flag outside of the .each loop in which it was defined. Does anyone have a solution or a workaround for this scenario ? Puppet version 4.4.

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>