code: def read_conf(conf_file, out_format='simple'):
      '''
      Read in an LXC configuration file. By default returns a simple, unsorted
      dict, but can also return a more detailed structure including blank lines
      and comments.
      out_format:
          set to 'simple' if you need the old and unsupported behavior.
          This won't support the multiple lxc values (eg: multiple network nics)
      CLI Examples:
      .. code-block:: bash
          salt 'minion' lxc.read_conf /etc/lxc/mycontainer.conf
          salt 'minion' lxc.read_conf /etc/lxc/mycontainer.conf out_format=commented
      '''
      ret_commented = []
      ret_simple = {}
      with salt.utils.files.fopen(conf_file, 'r') as fp_:
          for line in salt.utils.data.decode(fp_.readlines()):
              if '=' not in line:
                  ret_commented.append(line)
                  continue
              comps = line.split('=')
              value = '='.join(comps[1:]).strip()
              comment = None
              if value.strip().startswith('
                  vcomps = value.strip().split('
                  value = vcomps[1].strip()
                  comment = '
                  ret_commented.append({comps[0].strip(): {
                      'value': value,
                      'comment': comment,
                  }})
              else:
                  ret_commented.append({comps[0].strip(): value})
                  ret_simple[comps[0].strip()] = value
      if out_format == 'simple':
          return ret_simple
      return ret_commented