def construct_mapping(self, node, deep=False): ret = AnsibleMapping( super(Constructor, self).construct_mapping(node, deep)) ret._line_number = node.__line__ ret._column_number = node.__column__ ret._data_source = node.__datasource__ return ret
def construct_yaml_map(self, node): data = AnsibleMapping() yield data value = self.construct_mapping(node) data.update(value) data._line_number = value._line_number data._column_number = value._column_number data._data_source = value._data_source
def construct_mapping(self, node, deep=False): ret = AnsibleMapping(super(Constructor, self).construct_mapping(node, deep)) ret._line_number = node.__line__ ret._column_number = node.__column__ # in some cases, we may have pre-read the data and then # passed it to the load() call for YAML, in which case we # want to override the default datasource (which would be # '<string>') to the actual filename we read in if self._ansible_file_name: ret._data_source = self._ansible_file_name else: ret._data_source = node.__datasource__ return ret
def construct_mapping(self, node, deep=False): ret = AnsibleMapping( super(Constructor, self).construct_mapping(node, deep)) ret._line_number = node.__line__ ret._column_number = node.__column__ # in some cases, we may have pre-read the data and then # passed it to the load() call for YAML, in which case we # want to override the default datasource (which would be # '<string>') to the actual filename we read in if self._ansible_file_name: ret._data_source = self._ansible_file_name else: ret._data_source = node.__datasource__ return ret
def construct_mapping(self, node, deep=False): ret = AnsibleMapping(super(Constructor, self).construct_mapping(node, deep)) ret._line_number = node.__line__ ret._column_number = node.__column__ ret._data_source = node.__datasource__ return ret