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

- Added Puppet 4 types for all parameters. #11

Merged
merged 1 commit into from May 6, 2018

Conversation

rehanone
Copy link

@rehanone rehanone commented May 5, 2018

  • Added Puppet 4 types for all parameters.
  • Converted the module to use Puppet Development Kit.
  • Fixed style errors.
  • Fixed naming errors.
  • Updated minimum puppet and dependencies versions and dropped unsupported versions.

@jkroepke jkroepke self-requested a review May 5, 2018 09:25
Optional[String] $service_restart = $autofs::params::service_restart,
Hash $mapfiles = lookup('autofs::mapfiles', Hash, 'hash', {}),
Hash $mounts = lookup('autofs::mounts', Hash, 'hash', {}),
Hash $includes = lookup('autofs::includes', Hash, 'hash', {}),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puppet provides an automatic hiera lookup for all class parameters. This isn't necessary

Copy link
Owner

@jkroepke jkroepke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you review it?

$order = undef
#
define autofs::include (
String $mapfile = $title,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you prefer title instead name?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was using this as a reference https://puppet.com/docs/puppet/5.5/lang_defined_types.html#title-and-name

But I think name is also good and I can revert it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, nice to know.

Since mapfile should be unique, $title is better then name.

$map_config_dir = $autofs::params::map_config_dir,
Boolean $package_manage = $autofs::params::package_manage,
Array[String] $package_name = $autofs::params::package_name,
Enum[present, absent, purged, installed]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String should be good enough, because ensure allows to define a specific version.

Boolean $service_hasrestart = $autofs::params::service_hasrestart,
Boolean $service_hasstatus = $autofs::params::service_hasstatus,
Enum[running, stopped]
$service_ensure = $autofs::params::service_ensure,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

define autofs::mapfile (
Optional[Stdlib::Absolutepath] $directory,
Enum[present, absent, purged] $ensure = present,
String $mapfile = $title,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why $title instead $name?

Optional[String] $options = undef,
Optional[String] $order = undef,
Enum[ file, program, yp, nisplus, hesiod, ldap, ldaps]
$maptype = file,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No string quotas anymore required?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rehanone rehanone force-pushed the develop/puppet4-data-types branch 4 times, most recently from 3172471 to 346cad8 Compare May 5, 2018 13:11
- Added `rspec-puppet-facts` to run tests on all supported os versions.
- Updated puppet and dependency versions for the module.
@rehanone rehanone force-pushed the develop/puppet4-data-types branch from 346cad8 to 7066684 Compare May 6, 2018 03:26
@rehanone
Copy link
Author

rehanone commented May 6, 2018

@jkroepke Can you please check now.

Copy link
Owner

@jkroepke jkroepke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bare words looks still scary but it should be okay.

@jkroepke jkroepke merged commit fb4687c into jkroepke:master May 6, 2018
@rehanone rehanone deleted the develop/puppet4-data-types branch May 6, 2018 15:16
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

Successfully merging this pull request may close these issues.

None yet

2 participants