How to apply apply idempotency on a new module

asked 2018-02-01 08:14:21 -0600

amedix gravatar image


I've created a new puppet module and works fine when I run the agent.

However, and contrary to the existing modules, it runs again when I execute the puppet agent many times !

I have compared the manifest of my new module to the existing ones and they look similar ?

How do I say to my new module not to run unless there are changes ?


edit retag flag offensive close merge delete


The native resources are usually idempotent, unless you are managing a resource that something else is managing or changing, with the exception of ‘exec’ resources. Without more information about your modules, we can’t help you isolate what is ‘wrong’

DarylW gravatar imageDarylW ( 2018-02-01 23:55:09 -0600 )edit

If you are using exec resources, it requires care to actually make them idempotent - clever use of the ‘creates’ or ‘onlyif/unless’ parameters can help you there as well

DarylW gravatar imageDarylW ( 2018-02-01 23:56:48 -0600 )edit

You _are_ using up-to-date software, are you not? What resources change every time? How are they implemented? Quote, “[…] and they look similiar [question mark]”, err, _I_ can't tell. “[…] not to run unless there are changes”, nuh, you can't condition _whole_ classes.

Kai Burghardt gravatar imageKai Burghardt ( 2018-02-03 13:00:09 -0600 )edit