Puppet Operations¶
puppet.agent
¶
Stateless operation
This operation will always execute commands and is not idempotent.
Run puppet agent
puppet.agent(server: str | None=None, port: int | None=None, **kwargs)
server**: master server URL port**: puppet master port
: Either ‘USE_SUDO_LOGIN=True’ or ‘USE_SU_LOGIN=True’ puppet.agent() as puppet is added to the path in .bash_profile.
ample:**
ode:: python
puppet.agent()
# We also expect a return code of: # 0=no changes or 2=changes applied puppet.agent(
name=”Run the puppet agent”, success_exit_codes=[0, 2],
) Note:
This operation also inherits all global arguments.