Skip to content

deanwilson/puppet-lint-template_file_extension-check

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

puppet-lint template file extension check

Extends puppet-lint to ensure all file names used in template and epp functions end with the string '.erb' or '.epp' respectively

Actions Status

Actions Status

This plugin is an extension of our local style guide and may not suit your own code base. This sample would trigger the puppet-lint warning:

class valid_template_filename {
  file { '/tmp/templated':
    content => template('mymodule/single_file.config'),
  }
}

# all template file names should end with .erb

And this would trigger an EPP (Embedded Puppet) specific warning:

class epp_multi_templated_file {
  file { '/tmp/templated':
    content => epp('mymodule/first_file.epp', 'mymodule/second_file.conf'),
  }
}

# all epp file names should end with .epp

Installation

To use this plugin add the following line to your Gemfile

gem 'puppet-lint-template_file_extension-check'

and then run bundle install.

Usage

This plugin provides a new check to puppet-lint.

all template file names should end with .erb

all epp file names should end with .epp

Other puppet-lint plugins

You can find a list of my puppet-lint plugins in the unixdaemon puppet-lint-plugins repo.

Author

Dean Wilson

License

  • MIT

About

Extend puppet-lint to ensure all template and epp functions filenames end correctly.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages