original_docstring: Update inventory if needed.
  
      Inspect the current inventory and ensure that all host items have all of
      the required entries.
  
      :param inventory: ``dict`` Living inventory of containers and hosts
      
docstring: Update inventory if needed.
  Inspect the current inventory and ensure that all host items have all of
  the required entries.
docstring_tokens: Update inventory if needed . Inspect the current inventory and ensure that all host items have all of the required entries .
code: def _ensure_inventory_uptodate(inventory):
      """Update inventory if needed.
  
      Inspect the current inventory and ensure that all host items have all of
      the required entries.
  
      :param inventory: ``dict`` Living inventory of containers and hosts
      """
      for key, value in inventory['_meta']['hostvars'].iteritems():
          if 'container_name' not in value:
              value['container_name'] = key
  
          for rh in REQUIRED_HOSTVARS:
              if rh not in value:
                  value[rh] = None
code_tokens: def _ensure_inventory_uptodate ( inventory ) : for key , value in inventory [ '_meta' ] [ 'hostvars' ] . iteritems ( ) : if 'container_name' not in value : value [ 'container_name' ] = key for rh in REQUIRED_HOSTVARS : if rh not in value : value [ rh ] = None
short_docstring: Update inventory if needed.
short_docstring_tokens: Update inventory if needed .
comment: """Update inventory if needed.
  
      Inspect the current inventory and ensure that all host items have all of
      the required entries.
  
      :param inventory: ``dict`` Living inventory of containers and hosts
      """