nnss_progfigsite.roles.settz

Example simple role

Classes

Role

A role that can be applied to a node

Module Contents

class nnss_progfigsite.roles.settz.Role

Bases: progfiguration.inventory.roles.ProgfigurationRole

A role that can be applied to a node

Required attributes:

  • name: The name of the role

  • localhost: A localhost object

  • hoststore: An inventory object

  • rolepkg: The package that the role is defined in,

    used to determine the path to the role’s templates.

Required methods:

  • apply(): Apply the role to the node

Optional methods:

  • calculations(): Return a dict of data the role can calculate from its arguments and internal state before it is applied. This data can be referenced by other roles. For instance, a role that creates a user might calculate the user’s homedir path like ‘/home/username’, and return a calculation like {‘homedir’: ‘/home/username’}. The user may or may not have been created when it returns this data, and the path may or may not exist until the role actually runs.

timezone: str
apply()