Skip to content

Commit

Permalink
Fixes #35607 - Configure Pulpcore's TELEMETRY setting
Browse files Browse the repository at this point in the history
  • Loading branch information
wbclark committed Oct 7, 2022
1 parent 2065d92 commit 6317b96
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
9 changes: 8 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,13 @@
# @param loggers
# Configure additional loggers or override pre-defined logger configuration.
#
# @example Default 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
#
# @see https://docs.djangoproject.com/en/2.2/howto/static-files/
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

0 comments on commit 6317b96

Please sign in to comment.