you could make this easier on the eye with
```puppet
validate_re($ext, 'deb|rpm')
$pkg_provider = $ext? {
  deb     => 'dpkg',
  default => 'rpm',
}
```

or alternatively, the whole if/else:
```puppet
if ($logstash::software_provider == 'package' ) {
  validate_re($ext, 'deb|rpm'
}
pkg_provider = $ext? {
  deb     => 'dpkg'
  rpm    => 'rpm',
  default => undef,
}
```