LEFT | RIGHT |
1 # == Class: adblockplus::web::static | 1 # == Class: adblockplus::web::static |
2 # | 2 # |
3 # Manage a simple Nginx-based webserver for static content | 3 # Manage a simple Nginx-based webserver for static content |
4 # that uses a customizable deployment script to e.g. fetch the content | 4 # that uses a customizable deployment script to e.g. fetch the content |
5 # from a repository server (ref. http://hub.eyeo.com/issues/4523) | 5 # from a repository server (ref. http://hub.eyeo.com/issues/4523) |
6 # | 6 # |
7 # === Parameters: | 7 # === Parameters: |
8 # | 8 # |
9 # [*domain*] | 9 # [*domain*] |
10 # The domain name for the website. | 10 # The domain name for the website. |
(...skipping 19 matching lines...) Expand all Loading... |
30 # Hash of adblockplus::web::static::hook items to set up in this context. | 30 # Hash of adblockplus::web::static::hook items to set up in this context. |
31 # | 31 # |
32 # === Examples: | 32 # === Examples: |
33 # | 33 # |
34 # class {'adblockplus::web::static': | 34 # class {'adblockplus::web::static': |
35 # domain => 'help.eyeo.com', | 35 # domain => 'help.eyeo.com', |
36 # hooks => { | 36 # hooks => { |
37 # uname => { | 37 # uname => { |
38 # file => { | 38 # file => { |
39 # content => 'uname -a', | 39 # content => 'uname -a', |
40 # } | 40 # }, |
41 # }, | 41 # }, |
42 # uptime => { | 42 # uptime => { |
43 # file => { | 43 # file => { |
44 # target => '/usr/bin/uptime', | 44 # target => '/usr/bin/uptime', |
45 # ensure => 'link', | 45 # ensure => 'link', |
46 # } | 46 # }, |
47 # }, | 47 # }, |
48 # }, | 48 # }, |
49 # } | 49 # } |
50 # | 50 # |
51 class adblockplus::web::static ( | 51 class adblockplus::web::static ( |
52 $domain, | 52 $domain, |
53 $ssl_certificate = undef, | 53 $ssl_certificate = undef, |
54 $ssl_private_key = undef, | 54 $ssl_private_key = undef, |
55 $ensure = 'present', | 55 $ensure = 'present', |
56 $deploy_user = 'web-deploy', | 56 $deploy_user = 'web-deploy', |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 ensure_resource('file', '/usr/local/bin/hooks_wrapper', { | 115 ensure_resource('file', '/usr/local/bin/hooks_wrapper', { |
116 ensure => ensure_file_state($ensure), | 116 ensure => ensure_file_state($ensure), |
117 content => template('adblockplus/web/hooks_wrapper.sh.erb'), | 117 content => template('adblockplus/web/hooks_wrapper.sh.erb'), |
118 }) | 118 }) |
119 | 119 |
120 # https://docs.puppet.com/puppet/latest/function.html#createresources | 120 # https://docs.puppet.com/puppet/latest/function.html#createresources |
121 create_resources('adblockplus::web::static::hook', $hooks) | 121 create_resources('adblockplus::web::static::hook', $hooks) |
122 } | 122 } |
123 | 123 |
LEFT | RIGHT |