docs: def present(name,
              config=None,
              **kwargs):
      '''
      Ensure the job is present in the Jenkins configured jobs
  
      name
          The unique name for the Jenkins job
  
      config
          The Salt URL for the file to use for configuring the job
      '''
  
      ret = {'name': name,
             'result': True,
             'changes': {},
             'comment': ['Job {0} is up to date.'.format(name)]}
  
      if __salt__['jenkins.job_exists'](name):
          _current_job_config = __salt__['jenkins.get_job_config'](name)
          buf = six.moves.StringIO(_current_job_config)
          oldXML = ET.fromstring(buf.read())
  
          cached_source_path = __salt__['cp.cache_file'](config, __env__)
          with salt.utils.files.fopen(cached_source_path) as _fp:
              newXML = ET.fromstring(salt.utils.stringutils.to_unicode(_fp.read()))
          if not _elements_equal(oldXML, newXML):
              diff = difflib.unified_diff(
                  ET.tostringlist(oldXML, encoding='utf8', method='xml'),
                  ET.tostringlist(newXML, encoding='utf8', method='xml'), lineterm='')
              try:
                  __salt__['jenkins.update_job'](name, config, __env__)
              except CommandExecutionError as exc:
                  return _fail(ret, exc.strerror)
              else:
                  ret['changes'] = ''.join(diff)
                  ret['comment'].append('Job \'{0}\' updated.'.format(name))
  
      else:
          cached_source_path = __salt__['cp.cache_file'](config, __env__)
          with salt.utils.files.fopen(cached_source_path) as _fp:
              new_config_xml = salt.utils.stringutils.to_unicode(_fp.read())
  
          try:
              __salt__['jenkins.create_job'](name, config, __env__)
          except CommandExecutionError as exc:
              return _fail(ret, exc.strerror)
  
          buf = six.moves.StringIO(new_config_xml)
          diff = difflib.unified_diff('', buf.readlines(), lineterm='')
          ret['changes'][name] = ''.join(diff)
          ret['comment'].append('Job \'{0}\' added.'.format(name))
  
      ret['comment'] = '\n'.join(ret['comment'])
      return ret