code: def _is_globalzone():
      '''
      Check if we are running in the globalzone
      '''
      if not __grains__['kernel'] == 'SunOS':
          return False
  
      zonename = __salt__['cmd.run_all']('zonename')
      if zonename['retcode']:
          return False
      if zonename['stdout'] == 'global':
          return True
  
      return Falsf _is_globalzone():
      '''
      Check if we are running in the globalzone
      '''
      if not __grains__['kernel'] == 'SunOS':
          return False
  
      zonename = __salt__['cmd.run_all']('zonename')
      if zonename['retcode']:
          return False
      if zonename['stdout'] == 'global':
          return True
  
      return False
docs: Check if we are running in the globalzone