libraries/helpers.rb
def includes(sub_dir)
      with_run_context :root do
        run_context.resource_collection.map do |resource|
          next unless resource_match? resource
          next unless resource.action == :add || resource.action.include?(:add)
          "#{resource.conf_dir}/#{sub_dir}/#{resource.name}.conf"
        end.compact
      end
    end
#
# List of files to include in list.conf for a collection of subconfigs (e.g. hosts, subnets, groups)
#
# @param [String] sub_dir - The subconfig directory for the config
#
# @return [Array<String>] An array of config files for the subconfig
List of files to include in list.conf for a collection of subconfigs
List of files to include in list . conf for a collection of subconfigs
def includes(sub_dir)
      with_run_context :root do
        run_context.resource_collection.map do |resource|
          next unless resource_match? resource
          next unless resource.action == :add || resource.action.include?(:add)
          "#{resource.conf_dir}/#{sub_dir}/#{resource.name}.conf"
        end.compact
      end
    end
def includes ( sub_dir ) with_run_context :root do run_context . resource_collection . map do | resource | next unless resource_match? resource next unless resource . action == :add || resource . action . include? ( :add ) "#{resource.conf_dir}/#{sub_dir}/#{resource.name}.conf" end . compact end end
List of files to include in list.conf for a collection of subconfigs (e.g.
List of files to include in list . conf for a collection of subconfigs ( e . g .
An array of config files for the subconfig
An array of config files for the subconfig
Array<String>
sub_dir
The subconfig directory for the config
The subconfig directory for the config