'Write an automatic OS installation template
@param str file_path automatic installation template relative file path
@param str data automatic installation template content'

def write_autoinstall_template(self, file_path, data):

    file_path = self.validate_autoinstall_template_file_path(file_path, for_item=False, new_autoinstall=True)
    file_full_path = ('%s/%s' % (self.templates_base_dir, file_path))
    try:
        utils.mkdir(os.path.dirname(file_full_path))
    except:
        utils.die(self.logger, ('unable    to    create    directory    for    automatic    OS    installation    template    at    %s' % file_path))
    fileh = open(file_full_path, 'w+')
    fileh.write(data)
    fileh.close()
    return True
