Skip to content

Commit 6a4c27b

Browse files
committed
Add graph_facts.
1 parent 83167cb commit 6a4c27b

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

REFERENCE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ The following parameters are available in the `puppetboard` class:
8383
* [`ldap_require_group`](#ldap_require_group)
8484
* [`apache_confd`](#apache_confd)
8585
* [`apache_service`](#apache_service)
86+
* [`graph_facts'](#graph_facts)
8687

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

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

415416
name of the apache2 service
416417

418+
##### <a name="graph_facts"></a>`graph_facts`
419+
420+
Data type: `Optional[Variant[String[1], Array[String[1]]]]`
421+
422+
An array of the puppet facts to graph. See ''https://github.com/voxpupuli/puppetboard''
423+
417424
### <a name="puppetboardapacheconf"></a>`puppetboard::apache::conf`
418425

419426
Creates an entry in your apache configuration directory to run PuppetBoard server-wide (i.e. not in a vhost).

manifests/init.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# @param homedir Puppetboard system user's home directory.
66
# @param group Puppetboard system group.
77
# @param groups additional groups for the user that runs puppetboard
8+
# @param graph_facts Array of puppet facts to graph (pie/bar chart).
89
# @param basedir Base directory where to build puppetboard vcsrepo and python virtualenv.
910
# @param git_source Location of upstream Puppetboard GIT repository
1011
# @param puppetdb_host PuppetDB Host
@@ -67,6 +68,7 @@
6768
Optional[Stdlib::Absolutepath] $homedir = undef,
6869
String $group = 'puppetboard',
6970
Optional[Variant[String[1], Array[String[1]]]] $groups = undef,
71+
Optional[Variant[String[1], Array[String[1]]]] $graph_facts = undef,
7072
Stdlib::AbsolutePath $basedir = '/srv/puppetboard',
7173
String $git_source = 'https://github.com/voxpupuli/puppetboard',
7274
String $dev_listen_host = '127.0.0.1',

templates/settings.py.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ DEFAULT_ENVIRONMENT = '<%= @default_environment %>'
6363
<% if @reports_count -%>
6464
REPORTS_COUNT = <%= @reports_count %>
6565
<% end -%>
66+
<% if @graph_facts -%>
67+
GRAPH_FACTS = '<%= @graph_facts.sort.uniq.join(',') %>'
68+
<% end -%>
6669
<% @extra_settings.keys.sort.each do |key| -%>
6770
<%= key %> = <%= @extra_settings[key] %>
6871
<% end -%>

0 commit comments

Comments
 (0)