pi_portal.installation.templates.config_file

TemplateFile class.

class pi_portal.installation.templates.config_file.ConfileFileTemplate(source, destination, permissions='600', user='root')[source]

Configuration file template content.

Parameters:
  • source (str) – The path to the template file.

  • destination (str) – The path to render the template to.

  • permissions (str, default: '600') – The permissions to set on the rendered file.

  • user (str, default: 'root') – The linux user to set as owner and group of the rendered file.

create_context()[source]

Create a context dictionary for the template.

Return type:

Dict[str, Any]

Returns:

A dictionary of template context variables.

render()[source]

Render the template.

Return type:

None