Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Little problem with => when variables are used as key #472

Closed
fgimian opened this issue May 11, 2016 · 2 comments
Closed

Little problem with => when variables are used as key #472

fgimian opened this issue May 11, 2016 · 2 comments

Comments

@fgimian
Copy link

fgimian commented May 11, 2016

Hey guys, this code fails to lint:

class { 'ssh':
  storeconfigs_enabled => false,
  server_options       => {
    "Match Host ${fqdn}" => {
      'PermitRootLogin' => 'without-password',
    }
  },
}

The error is:

WARNING: indentation of => is not properly aligned on line 4

If I was to remove the double quotes and variable with the same alignment, it passes.

e.g. this code works

class { 'ssh':
  storeconfigs_enabled => false,
  server_options       => {
    'Match Host --fqdn-' => {
      'PermitRootLogin' => 'without-password',
    }
  },
}

Any help would be greatly appreciated
Fotis

@bryanandrews
Copy link

bryanandrews commented Jun 16, 2016

I have this exact same problem. If I use a variable in a key I get a false indentation aligning warning. Here is my code example:

    class { '::ssh::server':
      storeconfigs_enabled => false,
      options              => {
        'Port'                            => ['22'],
        'PermitRootLogin'                 => 'without-password',
        'Subsystem'                       => 'sftp internal-sftp -l INFO',
        'ChallengeResponseAuthentication' => 'no',
        "Match User ${sftpuser}"          => {
          'ChrootDirectory'        => $sftpmountpath,
          'ForceCommand'           => 'internal-sftp -l INFO',
          'PasswordAuthentication' => 'yes',
          'AllowTcpForwarding'     => 'no',
          'X11Forwarding'          => 'no',
        },
      },
    }

@rnelson0
Copy link
Collaborator

Duplicate of #424.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants