Browse Source

Order of the classes parameters is refactored

Order and intendation of those parameters are changed
to follow Puppet Style Guide recommendation [0].
Moreover, it will allow to an user to find much faster
a variable in a list of variables.

[0]. https://docs.puppetlabs.com/guides/style_guide.html

Change-Id: If012896a95088ae836d5dfa35aa3cad553aee516
Andrey Nikitin 3 years ago
parent
commit
cd6889a359
5 changed files with 20 additions and 20 deletions
  1. 9
    9
      manifests/apache.pp
  2. 2
    2
      manifests/buildsource.pp
  3. 4
    4
      manifests/init.pp
  4. 1
    1
      manifests/mysql.pp
  5. 4
    4
      manifests/site.pp

+ 9
- 9
manifests/apache.pp View File

@@ -1,15 +1,15 @@
1 1
 # == Class: etherpad_lite::apache
2 2
 #
3 3
 class etherpad_lite::apache (
4
-  $vhost_name = $::fqdn,
5
-  $docroot = '/srv/etherpad-lite',
6
-  $serveradmin = "webmaster@${::fqdn}",
7
-  $ssl_cert_file = '',
8
-  $ssl_key_file = '',
9
-  $ssl_chain_file = '',
10
-  $ssl_cert_file_contents = '', # If left empty puppet will not create file.
11
-  $ssl_key_file_contents = '', # If left empty puppet will not create file.
12
-  $ssl_chain_file_contents = '' # If left empty puppet will not create file.
4
+  $docroot                 = '/srv/etherpad-lite',
5
+  $serveradmin             = "webmaster@${::fqdn}",
6
+  $ssl_cert_file           = '',
7
+  $ssl_cert_file_contents  = '', # If left empty puppet will not create file.
8
+  $ssl_chain_file          = '',
9
+  $ssl_chain_file_contents = '', # If left empty puppet will not create file.
10
+  $ssl_key_file            = '',
11
+  $ssl_key_file_contents   = '', # If left empty puppet will not create file.
12
+  $vhost_name              = $::fqdn,
13 13
 ) {
14 14
 
15 15
   package { 'ssl-cert':

+ 2
- 2
manifests/buildsource.pp View File

@@ -3,10 +3,10 @@
3 3
 # define to build from source using ./configure && make && make install.
4 4
 #
5 5
 define etherpad_lite::buildsource(
6
+  $creates = '/nonexistant/file',
6 7
   $dir     = $title,
7
-  $user    = 'root',
8 8
   $timeout = 300,
9
-  $creates = '/nonexistant/file'
9
+  $user    = 'root',
10 10
 ) {
11 11
 
12 12
   exec { "./configure in ${dir}":

+ 4
- 4
manifests/init.pp View File

@@ -12,13 +12,13 @@
12 12
 #
13 13
 #
14 14
 class etherpad_lite (
15
-  $ep_user          = 'eplite',
16
-  $base_log_dir     = '/var/log',
17 15
   $base_install_dir = '/opt/etherpad-lite',
16
+  $base_log_dir     = '/var/log',
17
+  $ep_ensure        = 'present',
18
+  $ep_user          = 'eplite',
19
+  $eplite_version   = 'develop',
18 20
   # If set to system will install system package.
19 21
   $nodejs_version   = 'v0.10.21',
20
-  $eplite_version   = 'develop',
21
-  $ep_ensure        = 'present',
22 22
 ) {
23 23
 
24 24
   # where the modules are, needed to easily install modules later

+ 1
- 1
manifests/mysql.pp View File

@@ -1,10 +1,10 @@
1 1
 # == Class: puppet-etherpad_lite::mysql
2 2
 #
3 3
 class etherpad_lite::mysql(
4
+  $database_password,
4 5
   $mysql_root_password,
5 6
   $database_name = 'etherpad-lite',
6 7
   $database_user = 'eplite',
7
-  $database_password,
8 8
 ) {
9 9
   class { '::mysql::server':
10 10
     root_password    => $mysql_root_password,

+ 4
- 4
manifests/site.pp View File

@@ -3,11 +3,11 @@
3 3
 class etherpad_lite::site (
4 4
   $database_password,
5 5
   $etherpad_title,
6
-  $session_key   = '',
7
-  $db_type       = 'mysql',
8
-  $database_user = 'eplite',
6
+  $database_host = 'localhost',
9 7
   $database_name = 'etherpad-lite',
10
-  $database_host = 'localhost'
8
+  $database_user = 'eplite',
9
+  $db_type       = 'mysql',
10
+  $session_key   = '',
11 11
 ) {
12 12
 
13 13
   include ::etherpad_lite

Loading…
Cancel
Save