Introduce Puppet-lint/syntax test into Packstack
- Add puppet-lint and puppet-syntax - To run puppet-lint, please look at the README.md file. Change-Id: I4b9e5d0c030b891545bc07f10091d748cdc1482e Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
This commit is contained in:
28
README.md
28
README.md
@@ -131,3 +131,31 @@ executable without further intervention, and **Packstack** is ready to install.
|
||||
**IMPORTANT** <https://docs.puppetlabs.com/guides/style_guide.html>
|
||||
|
||||
Please, respect the Puppet Style Guide as much as possible !
|
||||
|
||||
## Running local Puppet-lint tests
|
||||
|
||||
It assumes that both `bundler` as well as `rubygems` (and `ruby`) are already
|
||||
installed on the system. If not, run this command:
|
||||
|
||||
$ sudo yum install rubygems rubygem-bundler ruby ruby-devel -y
|
||||
|
||||
Go into the **Packstack** root directory.
|
||||
|
||||
$ cd packstack/
|
||||
|
||||
A `Rakefile` contains all you need to run puppet-lint task automatically over
|
||||
all the puppet manifests included in the **Packstack** project.
|
||||
|
||||
$ ls -l packstack/puppet/templates/
|
||||
|
||||
and
|
||||
|
||||
$ ls -l packstack/puppet/modules/
|
||||
|
||||
The default puppet-lint pattern for `.pp` files is `**/*.pp`. So there is no
|
||||
need to go inside those directories to run puppet-lint !
|
||||
|
||||
$ mkdir vendor
|
||||
$ export GEM_HOME=vendor
|
||||
$ bundle install
|
||||
$ bundle exec rake lint
|
||||
|
Reference in New Issue
Block a user