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

Fixes #35607 - Configure Pulpcore's TELEMETRY setting #267

Merged
merged 1 commit into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@
# @param loggers
# Configure additional loggers or override pre-defined logger configuration.
#
# @param telemetry
# Configure TELEMETRY in settings.yml, which controls the reporting of anonymous data to https://analytics.pulpproject.org/,
# starting with Pulpcore version 3.21.0, to guide Pulp project developers. Set this to false to opt out of this anonymous reporting;
# if undef, it will instead be omitted from settings.yml and Pulp will report these usage statistics per its default behavior.
# Adding this configuration will have no effect in Pulp versions prior to the introduction of the telemetry feature.
#
# @example Default configuration
# include pulpcore
#
Expand Down Expand Up @@ -228,6 +234,7 @@
Optional[Variant[Integer[1], Enum['None']]] $cache_expires_ttl = undef,
Pulpcore::LogLevel $log_level = 'INFO',
Hash[String[1], Pulpcore::Logger] $loggers = {},
Optional[Boolean] $telemetry = undef,
) {
$settings_file = "${config_dir}/settings.py"
$certs_dir = "${config_dir}/certs"
Expand Down
9 changes: 9 additions & 0 deletions templates/settings.py.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@
# configuration.
################################################################################

# Send anonymous usage data to https://analytics.pulpproject.org/ unless this is
# explicitly defined with value False. This data is used by the Pulp project
# to make informed, data-driven decisions about future feature development.
<% if scope['pulpcore::telemetry'].nil? -%>
# TELEMETRY = False
<% else -%>
TELEMETRY = <%= scope['pulpcore::telemetry'] %>
<% end -%>

CONTENT_HOST = "<%= scope['pulpcore::servername'] %>"
CONTENT_ORIGIN = "https://<%= scope['pulpcore::servername'] %>"
SECRET_KEY = "<%= scope['pulpcore::django_secret_key'] %>"
Expand Down