Predefined States

Using a predefined state

Usually you just need to subclass the state and adjust some class attributes. Example with the InstallPackagesApt class:

from armonic.states import InstallPackagesApt

class InstallOpenLDAP(InstallPackagesApt):
    packages = ["openldap-server"]

Include the InstallOpenLDAP state in your Lifecycle transitions and you are done.

List of predefined states

Service activation

Package installation