regarding puppet module

24 views
Skip to first unread message

Durga Someswararao G

unread,
Jul 29, 2019, 1:56:05 PM7/29/19
to Puppet Users
Hi,
Anyone help me in below scenario.

I have created puppet module and added in /etc/puppetlabs/code/environments/production/modules path. The script is working fine but observed that same module applying multiple time to the same node even if there is no change in module files. As of my knowledge if there is no change in puppet module scripts puppet won't apply again.
 
Can anyone help me in this.

For information

Using Puppet 4.10 repositories.

Here using my  puppet module to deploy an application in multiple devices.

runinterval filed configured to default value 1800 (30min).
Also added nodes and classes details in site.pp file to restrict some other connected nodes.

Is there any way to know whether particular module applied or not on a particular node from master/puppet server.

Thanks,
Durga SomeswaraRao G.

jcbollinger

unread,
Jul 31, 2019, 1:30:37 PM7/31/19
to Puppet Users


On Monday, July 29, 2019 at 12:56:05 PM UTC-5, Durga Someswararao G wrote:
Hi,
Anyone help me in below scenario.

I have created puppet module and added in /etc/puppetlabs/code/environments/production/modules path. The script is working fine but observed that same module applying multiple time to the same node even if there is no change in module files. As of my knowledge if there is no change in puppet module scripts puppet won't apply again.


That is a major misunderstanding, on several levels.

Puppet manifests are not scripts.  They are instructions and data for building a catalog of classes and resources describing the desired state of a given target node.  If the manifests, any external data, and all node facts remain the same, then an identical catalog will be built each time.  If any of those do change, then a different catalog might be built, but in no event does the age or currency of changes of any manifest directly influence whether it is used in catalog building, or what effects its contents will have.

Furthermore, a node's whole catalog, built according to the relevant Puppet manifests, is applied on every Puppet run, except as may be modulated by the --tags option to the agent and any schedules defined for resources in the catalog, both of which can exclude some resources from being applied on some runs.

You are likely thinking of the fact that applying a given Puppet resource has no effect if the the corresponding physical resource is already in the desired state.  But that's not well correlated with whether the manifest in which that resource is declared was changed, and it's quite different from the resource not being applied at all.  In particular, "has no effect" should be qualified by the understanding that Puppet will always perform the steps needed to determine the physical resource's current state, in order to judge whether any changes need to be made.

 
 
Can anyone help me in this.


It's unclear whether there is any more help that could be provided, but if you have a more specific problem to solve then we would be happy to entertain it.  We will probably need some details -- simple code examples would be best -- to clarify what you are trying to make Puppet manage for you, how its behavior differs from what you want, and why that presents a problem.


John

 
Reply all
Reply to author
Forward
0 new messages