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.