try again, with puppetforge modules, correctly included now
[mirror/dsa-puppet.git] / 3rdparty / modules / nova / manifests / compute / spice.pp
1 # == Class: nova::compute::spice
2 #
3 # Configure spice on the compute side
4 #
5 # === Parameters:
6 #
7 # [*agent_enabled*]
8 #   (optional) enable spice guest agent support
9 #   Defaults to true
10 #
11 # [*server_listen*]
12 #   (optional)  IP address on which instance spice servers should listen
13 #   Defaults to undef
14 #
15 # [*server_proxyclient_address*]
16 #   (optional) Management IP Address on which instance spiceservers will
17 #   listen on the compute host.
18 #   Defaults to '127.0.0.1'
19 #
20 # [*keymap*]
21 #   (optional) keymap for spice
22 #   Defaults to 'en-us'
23 #
24 # [*proxy_host*]
25 #   (optional) Host for the html5 console proxy
26 #   Defaults to false
27 #
28 # [*proxy_port*]
29 #   (optional) Port for the html5 console proxy
30 #   Defaults to '6082'
31 #
32 # [*proxy_protocol*]
33 #   (optional) Protocol for the html5 console proxy
34 #   Defaults to 'http'
35 #
36 # [*proxy_path*]
37 #   (optional) Path of the spice html file for the html5 console proxy
38 #   Defaults to '/spice_auto.html'
39 #
40 class nova::compute::spice(
41   $agent_enabled                    = true,
42   $server_listen                    = undef,
43   $server_proxyclient_address       = '127.0.0.1',
44   $keymap                           = 'en-us',
45   $proxy_host                       = false,
46   $proxy_protocol                   = 'http',
47   $proxy_port                       = '6082',
48   $proxy_path                       = '/spice_auto.html'
49 ) {
50
51   if $proxy_host {
52     $html5proxy_base_url = "${proxy_protocol}://${proxy_host}:${proxy_port}${proxy_path}"
53     nova_config {
54       'spice/html5proxy_base_url': value => $html5proxy_base_url;
55     }
56   }
57
58   nova_config {
59     'spice/enabled':                    value => true;
60     'spice/agent_enabled':              value => $agent_enabled;
61     'spice/server_listen':              value => $server_listen;
62     'spice/server_proxyclient_address': value => $server_proxyclient_address;
63     'spice/keymap':                     value => $keymap;
64   }
65 }