Ask Your Question
0

Puppet-lint showing errors (two spaces and trailing whitespaces)

asked 2017-04-28 23:54:52 -0500

gangadhar gravatar image

updated 2017-05-01 02:44:27 -0500

Red Cricket gravatar image

class entapps {

        dsc_package { 'mysqlconnector':
          dsc_ensure    => 'Present',
          dsc_name      => 'MySQL Connector Net 6.9.9',
          dsc_path      => 'D:\\DSCPackages\\mysql-connector-net-6.9.9.msi',
        }

       if $::hostname =~ /^erp-(udc|aws)-build(07|08)/ {
        package { 'tightvnc':
          ensure    => 2.8.8,
          provider  => 'chocolatey',
        }
    }

Puppet lint showing:

  • ERROR: trailing whitespace found on line 20
    • ERROR: two-space soft tabs not used on line 21

Here is the line 21 from the above code : if $::hostname =~ /^erp-(udc|aws)-build(07|08)/ {

Can anyone explain the standards required to follow while writing puppet manifest and how I can resolve the issues within this manifest.

Thanks.

edit retag flag offensive close merge delete

Comments

Also, for some problems, you can add a `--fix` flag to your puppet-lint run and it can automatically fix a few of them!

DarylW gravatar imageDarylW ( 2017-05-02 07:55:15 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-04-30 10:55:16 -0500

Red Cricket gravatar image

Take a look at the style guide: Puppet Style Guide. The errors should be self-explanatory. Get rid of a white space at the end of each line. Also do not use tabs when indenting. Instead at the begin of each line of code use multiple of two number of spaces (like 0, 2 or 4 spaces).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-04-28 23:54:52 -0500

Seen: 40 times

Last updated: May 01