How to iterate over an array in Puppet

后端 未结 6 1764
南旧
南旧 2020-12-13 10:11

I would like to iterate over an array that is stored as a Facter fact, and for each element of the array create a new system user and a directory, and finally make API calls

6条回答
  •  庸人自扰
    2020-12-13 10:25

    Puppet 3.7 released earlier this month have the new DSL, which one feature is the iteration, check the following URL https://docs.puppetlabs.com/puppet/latest/reference/experiments_lambdas.html#enabling-lambdas-and-iteration

    these new features can be enabled with the :

    Setting parser = future in your puppet.conf file or adding the command line switch --parser=future

    hope that helps

提交回复
热议问题