# File lib/simp/cli/config/items/action/answers_yaml_file_writer.rb, line 20
    def print_answers_yaml( iostream, answers )
      if @config_items['cli::simp::scenario']
         scenario_info = "for #{@config_items['cli::simp::scenario'].value} scenario "
      else
         scenario_info = ''
      end
      iostream.puts "#" + '='*72
      iostream.puts "# simp config answers"
      iostream.puts "#"
      iostream.puts "# Generated #{scenario_info}on #{@start_time.strftime('%F %T')}"
      iostream.puts "# using simp-cli version #{Simp::Cli::VERSION}"
      iostream.puts "#" + '-'*72
      iostream.puts "# You can use these answers to quickly configure subsequent
                     # simp installations by running the command:
                     #
                     #   simp config -A /PATH/TO/THIS/FILE
                     #
                     # simp config will prompt for any missing items.
                     #
                     # NOTE: All YAML keys that begin with 'cli::' are used
                     # by simp config, internally, and are not Puppet hieradata.
                     ".gsub(/^\s+/, '').strip
      iostream.puts "#" + '='*72
      iostream.puts "---"

      if @sort_output
        answers = answers.sort.to_h
      end

      answers.each do |k,v|
        if v.data_type and v.data_type != :internal
          if yaml = v.to_yaml_s  # filter out nil results for items whose YAML is suppressed
            # get rid of trailing whitespace
            yaml.split("\n").each { |line| iostream.puts line.rstrip }
            iostream.puts
          end
        end
      end
    end