original_docstring: Build out the main inventory skeleton as needed.
  
      :param environment_file: ``dict`` Known environment information
      :param inventory: ``dict``  Living dictionary of inventory
      
docstring: Build out the main inventory skeleton as needed.
docstring_tokens: Build out the main inventory skeleton as needed .
code: def skel_setup(environment_file, inventory):
      """Build out the main inventory skeleton as needed.
  
      :param environment_file: ``dict`` Known environment information
      :param inventory: ``dict``  Living dictionary of inventory
      """
      for key, value in environment_file.iteritems():
          if key == 'version':
              continue
          for _key, _value in value.iteritems():
              if _key not in inventory:
                  inventory[_key] = {}
                  if _key.endswith('container'):
                      if 'hosts' not in inventory[_key]:
                          inventory[_key]['hosts'] = []
                  else:
                      if 'children' not in inventory[_key]:
                          inventory[_key]['children'] = []
                      if 'hosts' not in inventory[_key]:
                          inventory[_key]['hosts'] = []
  
              if 'belongs_to' in _value:
                  for assignment in _value['belongs_to']:
                      if assignment not in inventory:
                          inventory[assignment] = {}
                          if 'children' not in inventory[assignment]:
                              inventory[assignment]['children'] = []
                          if 'hosts' not in inventory[assignment]:
                              inventory[assignment]['hosts'] = []
code_tokens: def skel_setup ( environment_file , inventory ) : for key , value in environment_file . iteritems ( ) : if key == 'version' : continue for _key , _value in value . iteritems ( ) : if _key not in inventory : inventory [ _key ] = { } if _key . endswith ( 'container' ) : if 'hosts' not in inventory [ _key ] : inventory [ _key ] [ 'hosts' ] = [ ] else : if 'children' not in inventory [ _key ] : inventory [ _key ] [ 'children' ] = [ ] if 'hosts' not in inventory [ _key ] : inventory [ _key ] [ 'hosts' ] = [ ] if 'belongs_to' in _value : for assignment in _value [ 'belongs_to' ] : if assignment not in inventory : inventory [ assignment ] = { } if 'children' not in inventory [ assignment ] : inventory [ assignment ] [ 'children' ] = [ ] if 'hosts' not in inventory [ assignment ] : inventory [ assignment ] [ 'hosts' ] = [ ]
short_docstring: Build out the main inventory skeleton as needed.
short_docstring_tokens: Build out the main inventory skeleton as needed .
comment: """Build out the main inventory skeleton as needed.
  
      :param environment_file: ``dict`` Known environment information
      :param inventory: ``dict``  Living dictionary of inventory
      """