Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kakwa/validate-puppet
Small shell script to validate puppet and erb source code
https://github.com/kakwa/validate-puppet
puppet shell validator
Last synced: 10 days ago
JSON representation
Small shell script to validate puppet and erb source code
- Host: GitHub
- URL: https://github.com/kakwa/validate-puppet
- Owner: kakwa
- License: mit
- Created: 2015-01-16T13:41:51.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-06T14:46:49.000Z (about 10 years ago)
- Last Synced: 2024-12-03T17:53:44.016Z (2 months ago)
- Topics: puppet, shell, validator
- Language: Shell
- Size: 197 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# validate-puppet
[![Join the chat at https://gitter.im/kakwa/validate-puppet](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/kakwa/validate-puppet?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Small shell script to validate puppet and erb source code
## Screenshot ##
## Usage ##
Help:
```bash
modules/my_module1 » validate-puppet -h
usage: validate-puppet [-h] [-d ]simple syntax checker for puppet and erb files
arguments:
-h: displays this help
-s: silent
-d : checks .erb and .pp file of
if not specified, checks from current
directory (./)Exit status is the number of corrupted files
if this number is below 254.
254 is used for other errors.
```Execute in current directory:
```bash
modules/my_module1 » validate-puppet
Syntax of [./manifests/init.pp] OK
Syntax of [./tests/init.pp] OK
Syntax check failed for [./templates/tmpl.conf.erb] KO
```Execute in another directory:
```bash
modules/my_module1 » validate-puppet -d ../my_other_module
Syntax of [../my_other_module/manifests/init.pp] OK
Syntax of [../my_other_module/tests/init.pp] OK
```Quiet output (with 2 files in error):
```bash
modules/my_module1 » validate-puppet -s -d ../my_last_module
modules/my_module1 » echo $?
2
```## Dependancies ##
This script needs puppet to be installed.
## Installation ##
### Proper way ###
Clone this repository or download a release and:
```bash
make install
```### Quick and dirty way ###
As root:
```bash
rm -f /usr/local/bin/validate-puppet
curl https://raw.githubusercontent.com/kakwa/validate-puppet/master/validate-puppet \
-o /usr/local/bin/validate-puppet
chmod 755 /usr/local/bin/validate-puppet
#end
```