Skip to content

Commit

Permalink
Add graph_facts.
Browse files Browse the repository at this point in the history
  • Loading branch information
bschonec committed Jan 4, 2023
1 parent 83167cb commit 6a4c27b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ The following parameters are available in the `puppetboard` class:
* [`ldap_require_group`](#ldap_require_group)
* [`apache_confd`](#apache_confd)
* [`apache_service`](#apache_service)
* [`graph_facts'](#graph_facts)

##### <a name="install_from"></a>`install_from`

Expand Down Expand Up @@ -414,6 +415,12 @@ Data type: `String[1]`

name of the apache2 service

##### <a name="graph_facts"></a>`graph_facts`

Data type: `Optional[Variant[String[1], Array[String[1]]]]`

An array of the puppet facts to graph. See ''https://github.com/voxpupuli/puppetboard''

### <a name="puppetboardapacheconf"></a>`puppetboard::apache::conf`

Creates an entry in your apache configuration directory to run PuppetBoard server-wide (i.e. not in a vhost).
Expand Down
2 changes: 2 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# @param homedir Puppetboard system user's home directory.
# @param group Puppetboard system group.
# @param groups additional groups for the user that runs puppetboard
# @param graph_facts Array of puppet facts to graph (pie/bar chart).
# @param basedir Base directory where to build puppetboard vcsrepo and python virtualenv.
# @param git_source Location of upstream Puppetboard GIT repository
# @param puppetdb_host PuppetDB Host
Expand Down Expand Up @@ -67,6 +68,7 @@
Optional[Stdlib::Absolutepath] $homedir = undef,
String $group = 'puppetboard',
Optional[Variant[String[1], Array[String[1]]]] $groups = undef,
Optional[Variant[String[1], Array[String[1]]]] $graph_facts = undef,
Stdlib::AbsolutePath $basedir = '/srv/puppetboard',
String $git_source = 'https://github.com/voxpupuli/puppetboard',
String $dev_listen_host = '127.0.0.1',
Expand Down
3 changes: 3 additions & 0 deletions templates/settings.py.erb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ DEFAULT_ENVIRONMENT = '<%= @default_environment %>'
<% if @reports_count -%>
REPORTS_COUNT = <%= @reports_count %>
<% end -%>
<% if @graph_facts -%>
GRAPH_FACTS = '<%= @graph_facts.sort.uniq.join(',') %>'
<% end -%>
<% @extra_settings.keys.sort.each do |key| -%>
<%= key %> = <%= @extra_settings[key] %>
<% end -%>

0 comments on commit 6a4c27b

Please sign in to comment.