1

Our current setup has a manifest/site.pp that include the following for all of our modules

File {
  ignore => ['.swp'],
}

However when running puppet on the client side, it still tries to push the .swp file.

Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Applying configuration version '1584008633'
Notice: /Stage[main]/Nginx::Abstract/File[/etc/nginx/sites-available/.amazingnameindeed.conf.swp]/ensure: current_value absent, should be file (noop)
Notice: /etc/nginx: Would have triggered 'refresh' from 1 events
Notice: Class[Nginx::Abstract]: Would have triggered 'refresh' from 1 events
Notice: Stage[main]: Would have triggered 'refresh' from 1 events
Notice: Applied catalog in 3.72 seconds

According to https://puppet.com/docs/puppet/5.5/types/file.html#file-attribute-ignore that should enable all our modules to ignore the .swp files ?

Tolsadus
  • 1,123
  • 11
  • 22
  • Does nginx::abstract or any other class evaluated between site.pp and nginx::abstract set a resource default for File? If so, your declared defaults in site.pp are getting clobbered. Resource defaults can be very tricky to use. Would it be possible to exclude .swp from your Git repository so the files are not checked into version control at all? – Aaron Copley Mar 27 '20 at 14:44
  • https://puppet.com/docs/puppet/latest/style_guide.html#legacy-style-defaults – Aaron Copley Apr 09 '20 at 23:08

0 Answers0