-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
Update modules with defined types for variables as described in docs/Add reference.md #440
Conversation
Hi @danquack. We had some longer discussions in our IRC channel and at voxpupuli/modulesync_config#397. For now we want a bundle exec rake strings:generate\[',,,,false,true'] The output would need some adjustments. Some comments in the pp files are in the wrong format. I you want you can contribute that. |
Gemfile
Outdated
@@ -66,6 +66,7 @@ group :release do | |||
gem 'puppet-blacksmith', :require => false | |||
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem' | |||
gem 'puppet-strings', '>= 1.0', :require => false | |||
gem 'yard', :require => false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
puppet-strings requires this so it's redundant
8528862
to
8dd4a72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A good time to review the class parameters / docs.
REFERENCE.md
Outdated
|
||
##### `dev` | ||
|
||
Data type: `Any` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably out of scope, but perhaps this should also be an Enum['absent', 'present', 'latest']
REFERENCE.md
Outdated
|
||
Data type: `Enum['absent', 'present', 'latest']` | ||
|
||
Desired installation state for python-virtualenv. Boolean values are deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the data type this looks outdated. Could you remove the mention of boolean values and the allowed values because Enum
already tells that.
REFERENCE.md
Outdated
|
||
Data type: `Enum['absent', 'present', 'latest']` | ||
|
||
Desired installation state for Gunicorn. Boolean values are deprecated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
REFERENCE.md
Outdated
Data type: `Optional[Enum['pip', 'scl', 'rhscl', 'anaconda', '']]` | ||
|
||
What provider to use for installation of the packages, except gunicorn and Python itself. | ||
Allowed values: 'pip' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can also be removed
REFERENCE.md
Outdated
|
||
Data type: `Any` | ||
|
||
Set if the gunicorn config directory should be created. Default: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default is already given so can be removed here
REFERENCE.md
Outdated
Data type: `Any` | ||
|
||
Set the application module name for gunicorn to load when not using Django. | ||
Default: app:app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant default
REFERENCE.md
Outdated
|
||
Allows setting environment variables for the gunicorn service. Accepts a | ||
hash of 'key': 'value' pairs. | ||
Default: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant default
REFERENCE.md
Outdated
|
||
Allows setting the gunicorn idle worker process time before being killed. | ||
The unit of time is seconds. | ||
Default: 30 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant default
REFERENCE.md
Outdated
|
||
Data type: `Any` | ||
|
||
Specifies the PATH variable. Default: [ '/bin', '/usr/bin', '/usr/sbin' ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outdated and redundant default
All good catches @ekohl. Updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So many data types could be used, but let's consider that out of scope :)
REFERENCE.md
Outdated
|
||
Data type: `Enum['pip', 'pip3']` | ||
|
||
version of pip you wish to use. Default: pip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default can be removed
REFERENCE.md
Outdated
Data type: `Enum['absent', 'present', 'latest']` | ||
|
||
Desired installation state for the Python package. | ||
Allowed values: absent, present and latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant?
REFERENCE.md
Outdated
|
||
##### `ensure` | ||
|
||
Data type: `Any` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description makes it sound like it should be an enum.
REFERENCE.md
Outdated
|
||
Data type: `Any` | ||
|
||
Copy system site-packages into virtualenv. Default: don't If virtualenv version < 1.7 this flag has no effect since |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like something is missing at the end of the sentence.
REFERENCE.md
Outdated
|
||
Data type: `Any` | ||
|
||
reate $venv_dir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create?
Better? |
…removed remaining defaults
Should we remove docs from |
They were essentially duplicate. And since people look at code, might as well move it and KEEP it in code. |
manifests/gunicorn.pp
Outdated
$log_level = 'error', | ||
$template = 'python/gunicorn.erb', | ||
$args = [], | ||
Enum['present', 'abesent'] $ensure = present, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo in absent
manifests/gunicorn.pp
Outdated
$access_log_format = false, | ||
$accesslog = false, | ||
$errorlog = false, | ||
$log_level = 'error', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: odd alignment here
manifests/dotfile.pp
Outdated
$config = {}, | ||
Enum['absent', 'present'] $ensure = 'present', | ||
$filename = $title, | ||
String $owner = 'root', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use String[1]
here, to prohibit empty strings?
manifests/dotfile.pp
Outdated
$filename = $title, | ||
String $owner = 'root', | ||
String $group = 'root', | ||
String $mode = '0644', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use the filemode type? https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/types/filemode.pp#L2
manifests/dotfile.pp
Outdated
String $owner = 'root', | ||
String $group = 'root', | ||
String $mode = '0644', | ||
$config = {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be enforced as a Hash?
Yes, I also saw room for a lot of improvement but I'm fine with merging this now. Actually I'd prefer to do it now because some of those changes might be considered breaking. Probably easier to review if we split it off. |
I couldn't find where you ran your merge script for updating the changelog, but I imagine an additional command of
puppet strings generate
can be run to make this automated and up to date.Pull Request (PR) description
Based on the current docs, defined types for variables. Then executed rake strings to generate the reference markdown file for forge.
This Pull Request (PR) fixes the following issues
Fixes #439
Fixes #441