def update_config_file(filename, line, exists_str=nil, append_str=nil)

      FileUtils.mkdir_p(File.dirname(filename)) # make sure the directory exists

      if read_config_file(filename).include?(line)
        exists_str ||= "Config already exists in #{filename}"
        logger.info exists_str
      else
        append_str ||= "Appending config to #{filename}"
        logger.info append_str
        append_config_file(filename, line)
      end
      true
    end
def update_config_file(filename, line, exists_str=nil, append_str=nil)

      FileUtils.mkdir_p(File.dirname(filename)) # make sure the directory exists

      if read_config_file(filename).include?(line)
        exists_str ||= "Config already exists in #{filename}"
        logger.info exists_str
      else
        append_str ||= "Appending config to #{filename}"
        logger.info append_str
        append_config_file(filename, line)
      end
      true
    end
Add line to config file

 If the file does not exist, it will be created.
 If the line already exists, it will not be added again.

 === Parameters
 filename(String):: absolute path to config file
 line(String):: line to add

 === Return
 result(Hash):: Hash-like leaf value