-
Notifications
You must be signed in to change notification settings - Fork 18
Support Windows #33
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
base: main
Are you sure you want to change the base?
Support Windows #33
Changes from 1 commit
628a3dc
7c3684e
8144493
d9353d4
c2d1e06
ac83b6f
ebc2114
ec25d16
a908547
7b06435
810743a
c20d9f6
7cd029a
02f5cb8
3eaf2a6
bc0a286
1161f52
633a89b
b977bad
35f1024
5b73154
cf50843
1ca3a88
114ac66
f890bce
79bfb86
924d350
e647edb
e5158a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,12 @@ | |
# @param [Stdlib::Absolutepath] bin_dir | ||
# The directory in which to create a symlink to the promtail binary | ||
# | ||
# @param [Stdlib::Absolutepath] config_dir | ||
# The directory in which the promtail config is stored | ||
# | ||
# @param [Stdlib::Absolutepath] data_dir | ||
# The directory in which to versions of promtail are stored and updated | ||
# | ||
# @param [String[1]] checksum | ||
# The checksum of the promtail binary. | ||
# Note: each platform has its own checksum. | ||
|
@@ -128,15 +134,17 @@ | |
Hash $clients_config_hash, | ||
Hash $positions_config_hash, | ||
Hash $scrape_configs_hash, | ||
Stdlib::Absolutepath $bin_dir, | ||
Stdlib::Absolutepath $bin_dir = promtail::params::bin_dir, | ||
|
||
Stdlib::Absolutepath $data_dir = promtail::params::data_dir, | ||
Stdlib::Absolutepath $config_dir = promtail::params::config_dir, | ||
String[1] $checksum, | ||
String[1] $version, | ||
Optional[Hash] $server_config_hash = undef, | ||
Optional[Hash] $target_config_hash = undef, | ||
Optional[Stdlib::Absolutepath] $password_file_path = undef, | ||
Optional[Sensitive[String[1]]] $password_file_content = undef, | ||
Stdlib::HTTPUrl $source_url = 'https://github.com/grafana/loki/releases/download', | ||
) { | ||
) inherits promtail::params { | ||
Class['promtail::install'] | ||
-> Class['promtail::config'] | ||
-> Class['promtail::service'] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# @summary Default promtail variables | ||
# | ||
# Sets default variables per OS | ||
# | ||
# @api private | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if this class is private I suggest adding |
||
class promtail::params { | ||
case $facts['kernel'] { | ||
'Linux': { | ||
$bin_dir = '/usr/local/bin' | ||
$data_dir = '/usr/local/promtail_data' | ||
$config_dir = '/etc/promtail' | ||
Comment on lines
+8
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These items belong in |
||
} | ||
'windows': { | ||
$bin_dir = 'C:\\Program Files\\promtail' | ||
$data_dir = "${bin_dir}\\versions" | ||
$config_dir = "${bin_dir}\\config" | ||
Comment on lines
+14
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These items belong in |
||
} | ||
default: { fail("${facts['kernel']} is not yet supported") } | ||
} | ||
} |
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.
since newer puppet-strings releases, you don't have to provide the datatype here, puppet-strings will read it from the actual code