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
Add support for archive install on EL #190
Conversation
2d7869c
to
7897aa7
Compare
@@ -121,6 +133,41 @@ | |||
} | |||
Yumrepo['influxdata'] -> Package[$telegraf::package_name] | |||
} | |||
elsif $telegraf::manage_archive { |
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 makes me think manage_repo
and manage_archive
are mutually exclusive, it could be cool to detect this and raise an error rather than sometimes installing from a repo and sometimes from an archive… Not a blocker for this PR anyway.
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.
I did think about that when adding this, but didn't really want to rewrite a bunch of the logic. I added the warnings for unsupported install methods, because I tried to install from archive on CentOS and it just fell through the if
statement without installing any packages.
manifests/init.pp
Outdated
@@ -83,6 +83,9 @@ | |||
# [*manage_archive*] | |||
# Boolean. Whether or not to manage InfluxData's tar archive. | |||
# | |||
# [*manage_user*] | |||
# Boolean. Whether or not to manage the 'telegraf' user when installing from archive. |
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.
for new parameters we would like to have the puppet-strings style (that allows us to autogenerate documentation):
# Boolean. Whether or not to manage the 'telegraf' user when installing from archive. | |
# @param manage_user Whether or not to manage the 'telegraf' user when installing from archive. |
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.
Should we keep the existing param in brackets above this line, [*manage_user*]
? In newer modules it looks like we do this:
# @param param_name
# Description of param
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.
Yeah, with or without the new line, using @param
is better 👍. The top of the comment also need to be adjusted to remove the markdown syntax (is it markdown? Y mean the =
strings are no something puppet-string likes).
Puppet has some guidance for documenting classes here:
https://puppet.com/docs/puppet/7/puppet_strings_style.html#puppet_strings_style-strings-style-classes-types
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.
Done. I've become reliant on pdk validate
for this, I guess.
456d51b
to
4282300
Compare
please rebase after #191 is merged. that should fix the failing ubuntu jobs |
4282300
to
71464a5
Compare
Done 👍 |
71464a5
to
3735a24
Compare
This PR allows for installing from an archive source on EL. It also exposes the
manage_user
parameter, which was previously only defined inparams.pp
.