code: def _dscl(cmd, ctype='create'):
      '''
      Run a dscl -create command
      '''
      if __grains__['osrelease_info'] < (10, 8):
          source, noderoot = '.', ''
      else:
          source, noderoot = 'localhost', '/Local/Default'
      if noderoot:
          cmd[0] = noderoot + cmd[0]
  
      return __salt__['cmd.run_all'](
          ['dscl', source, '-' + ctype] + cmd,
          output_loglevel='quiet' if ctype == 'passwd' else 'debug',
          python_shell=False
      f _dscl(cmd, ctype='create'):
      '''
      Run a dscl -create command
      '''
      if __grains__['osrelease_info'] < (10, 8):
          source, noderoot = '.', ''
      else:
          source, noderoot = 'localhost', '/Local/Default'
      if noderoot:
          cmd[0] = noderoot + cmd[0]
  
      return __salt__['cmd.run_all'](
          ['dscl', source, '-' + ctype] + cmd,
          output_loglevel='quiet' if ctype == 'passwd' else 'debug',
          python_shell=False
      )
docs: Run a dscl -create command