Skip to content

Conversation

@treydock
Copy link
Contributor

This PR is incomplete, I have not updated the main pam class. I wanted to know, should things that currently accept string or boolean and use str2bool be continued or should the data type just be Boolean? These changes likely require a major version bump so figured maybe good time to force parameters to be the proper data type.

@treydock
Copy link
Contributor Author

@ghoneycutt Just FYI, relates to PR discussion for MOTD module, the message for Optional[Array] changes in puppet >= 4.10.x in such a way that the only way to match the error is just to say /Array/.

Puppet 4.9.x: expects an Array value, got String
Puppet 4.10.x/5.x: expects a value of type Undef or Array, got String

@ghoneycutt
Copy link
Owner

Thanks for all the hard work!

I think it's time we drop string 'true', 'false' and just use Boolean.

---
language: ruby

rvm:
Copy link
Owner

Choose a reason for hiding this comment

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

Let's use the same Travis config as https://github.com/sensu/sensu-puppet/blob/master/.travis.yml

Only slightly different in testing for puppet-strings and some new minor releases of Puppet 5.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to use the linked .travis.yml.

Optional[String] $config_file_source = undef,
Pattern[/^[0-7]{4}$/] $config_file_mode = '0640',
Stdlib::Absolutepath $limits_d_dir = '/etc/security/limits.d',
Pattern[/^[0-7]{4}$/] $limits_d_dir_mode = '0750',
Copy link
Owner

Choose a reason for hiding this comment

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

You'd think stdlib would give us a mode pattern by now :)

{"name":"ghoneycutt/common","version_requirement":">= 1.4.1 < 2.0.0"},
{"name":"ghoneycutt/nsswitch","version_requirement":">= 1.3.0 < 2.0.0"},
{"name":"puppetlabs/stdlib","version_requirement":">= 4.6.0 < 5.0.0"}
{"name":"puppetlabs/stdlib","version_requirement":">= 4.13.1 < 5.0.0"}
Copy link
Owner

Choose a reason for hiding this comment

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

Curious is there something special about 4.13.1 that has functionality we are using?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I pulled that from some official puppetlabs modules that got updated to only support Puppet 4/5. The 4.13.0 is needed for custom Stdlib data types, like the one for validating absolute path.

@ghoneycutt
Copy link
Owner

Happy to go to a new major version. Are there other things we should change about the module?

@Phil-Friderici what do you think?

@treydock treydock force-pushed the puppet-data-types branch 3 times, most recently from fa5a82a to 6dea7a7 Compare October 31, 2017 15:26
@treydock
Copy link
Contributor Author

@ghoneycutt Part of major version, maybe move various defaults to module level Hiera? The pam class code is extremely long and mostly just default values. This may be unrealistic given some defaults are based on $ensure_vas and $vas_major_version.

Maybe saving some lines by using pick instead of 5 line conditions for picking which value to use for Optional parameters.

@ghoneycutt
Copy link
Owner

I'd like to drop support for VAS in the next major version and instead just document what values should be used. We could setup a vas/ directory with the hiera structure in it so that you could copy those to your hiera and have VAS working. <-- @Phil-Friderici

Would definitely like to switch to data in modules, which we just did for sgnl05/sssd. This will also cut way down on lines of code.

https://github.com/sgnl05/sgnl05-sssd

@treydock
Copy link
Contributor Author

@ghoneycutt I'd be happy to help with such changes via different pull requests. May be a good time to use something like https://skywinder.github.io/github-changelog-generator/ to generate CHANGELOG, something I've seen used in voxpupuli projects.

@treydock
Copy link
Contributor Author

@ghoneycutt There are several deprecated parameters in init.pp. Okay to bundle a commit removing those into this pull request?

@ghoneycutt
Copy link
Owner

+1 to the changelog generator. I'm doing that on other projects.

@ghoneycutt
Copy link
Owner

I made a branch named puppet5. Could you point this against that branch? That way we can all work on the breaking changes and get them merged as they come in and time when we merge the whole thing into master.

I wont make any changes to master in the meantime, so we aren't stuck in rebase hell.

@ghoneycutt
Copy link
Owner

Go ahead and remove the deprecated params in their own commit.

@treydock treydock changed the base branch from master to puppet5 October 31, 2017 16:36
@treydock
Copy link
Contributor Author

@ghoneycutt Added commit for removing deprecated parameters, let me know if anything in this PR should be split into separate PR.

system_auth_ac_auth_lines
system_auth_ac_account_lines
system_auth_ac_password_lines
system_auth_ac_session_lines
@ghoneycutt
Copy link
Owner

I dont think we actually need yard and redcarpet as puppet-strings will pull in its dependencies

@ghoneycutt ghoneycutt merged commit 927cb35 into ghoneycutt:puppet5 Oct 31, 2017
@Phil-Friderici
Copy link
Contributor

Happy to go to a new major version. Are there other things we should change about the module?
@Phil-Friderici what do you think?

Changing from 'true' and 'false' to booleans is great.
Chaning from 'unset' to undef would be great too. (used for $pam_d_login_oracle_options)

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.

3 participants