]> gitweb.fluxo.info Git - puppet-bootstrap.git/commitdiff
More configurator refactor
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 4 Mar 2014 17:13:22 +0000 (14:13 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 4 Mar 2014 17:13:22 +0000 (14:13 -0300)
manifests/bootstrap/configurator.pp
manifests/classes/users.pp [deleted file]
modules/site_apache/files/htdocs/images/.empty [new file with mode: 0644]
modules/site_apache/files/vhosts/.empty [new file with mode: 0644]
modules/site_keys/files/ssl/.empty [new file with mode: 0644]
modules/site_mail/files/.empty [new file with mode: 0644]
modules/site_nagios/files/.empty [new file with mode: 0644]
modules/site_nginx/files/.empty [new file with mode: 0644]
modules/site_postfix/files/.empty [new file with mode: 0644]
templates/puppet/users.pp.erb

index cf2d891d371018297d591a65d311132036eeb660..ce6073151f82fda666900997d61e1f38129ffadc 100644 (file)
@@ -8,7 +8,9 @@
 # and want to configure it to boostrap a whole puppetmaster infrastructure.
 #
 
+#
 # Basic variables
+#
 $templates              = "$bootstrap_path/templates"
 $base_domain            = hiera('bootstrap::base_domain',                 'example.org')
 $db_password            = hiera('nodo::role::master::db_password',        'changeme')
@@ -21,7 +23,9 @@ $first_user_email       = hiera('bootstrap::first_user::email',           'userm
 $resolvconf_nameservers = hiera('nodo::subsystem::resolver::nameservers', '201.6.2.152:201.6.2.32')
 $global_munin_allow     = hiera('nodo::munin_node::allow',                '192.168.0.[0-9]*')
 
+#
 # Puppet configuration
+#
 file { "$bootstrap_path/puppet.conf":
   ensure  => present,
   mode    => 0644,
@@ -41,23 +45,100 @@ file { "$bootstrap_path/auth.conf":
   content => template("$templates/puppet/auth.conf.erb"),
 }
 
-## Basic nodes
+#
+# Basic users
+#
+file { "$bootstrap_path/manifests/classes/users.pp":
+  ensure  => present,
+  mode    => 0644,
+  content => template("$templates/puppet/users.pp.erb"),
+}
+
+#
+# Site files
+#
+
+file { "$bootstrap_path/modules/site_apache/htdocs/images/README.html":
+  ensure  => present,
+  mode    => 0644,
+  content => template("$templates/apache/htdocs/images/README.html.erb"),
+}
+
+file { "$bootstrap_path/modules/site_apache/files/htdocs/index.html":
+  ensure  => present,
+  mode    => 0644,
+  content => template("$templates/apache/htdocs/index.html.erb"),
+}
+
+file { "$bootstrap_path/modules/site_apache/files/htdocs/missing.html":
+  ensure  => present,
+  mode    => 0644,
+  content => template("$templates/apache/htdocs/missing.html.erb"),
+}
+
+file { "$bootstrap_path/modules/site_apache/files/vhosts/git":
+  ensure  => present,
+  mode    => 0644,
+  content => template("$templates/apache/vhosts/git.erb"),
+}
+
+file { "$bootstrap_path/modules/site_apache/files/vhosts/lists":
+  ensure  => present,
+  mode    => 0644,
+  content => template("$templates/apache/vhosts/lists.erb"),
+}
+
+file { "$bootstrap_path/modules/site_apache/files/vhosts/mail":
+  ensure  => present,
+  mode    => 0644,
+  content => template("$templates/apache/vhosts/mail.erb"),
+}
+
+file { "$bootstrap_path/modules/site_apache/files/vhosts/nagios":
+  ensure  => present,
+  mode    => 0644,
+  content => template("$templates/apache/vhosts/nagios.erb"),
+}
+
+file { "$bootstrap_path/modules/site_apache/files/vhosts/wiki":
+  ensure  => present,
+  mode    => 0644,
+  content => template("$templates/apache/vhosts/wiki.erb"),
+}
+
+file { "$bootstrap_path/modules/site_mail/files/aliases":
+  ensure  => present,
+  mode    => 0644,
+  content => template("$templates/etc/aliases.erb"),
+}
+
+file { "$bootstrap_path/modules/site_nagios/files/htpasswd.users":
+  ensure  => present,
+  mode    => 0644,
+  content => template("$templates/etc/nagios3/htpasswd.users.erb"),
+}
+
+file { "$bootstrap_path/modules/site_nginx/files/$domain":
+  ensure  => present,
+  mode    => 0644,
+  content => template("$templates/etc/nginx/domain.erb"),
+}
+
+file { "$bootstrap_path/modules/site_postfix/files/tls_policy":
+  ensure  => present,
+  mode    => 0644,
+  content => template("$templates/postfix/tls_policy.erb"),
+}
+
+#
+# Basic nodes
+#
 #file { "$bootstrap_path/manifests/nodes.pp":
 #  ensure  => present,
 #  mode    => 0644,
 #  content => template("$templates/puppet/nodes.pp.erb"),
 #}
-#
-## Basic users
-#file { "$bootstrap_path/manifests/classes/users.pp":
-#  ensure  => present,
-#  owner   => "puppet",
-#  group   => "puppet",
-#  mode    => 0644,
-#  require => [ Package["puppet"], File["$bootstrap_path/manifests/classes"] ],
-#  content => template("$templates/puppet/users.pp.erb"),
-#}
-#
+
 ## First host
 #file { "$bootstrap_path/manifests/nodes/$hostname.pp":
 #  ensure  => present,
@@ -100,142 +181,3 @@ file { "$bootstrap_path/auth.conf":
 #  content => template("$templates/puppet/test.pp.erb"),
 #}
 #
-## files in $bootstrap_path/files
-#file { [ "$bootstrap_path/files",
-#         "$bootstrap_path/modules/site_nginx",
-#         "$bootstrap_path/modules/site_nginx/files",
-#         "$bootstrap_path/modules/site_nagios",
-#         "$bootstrap_path/modules/site_nagios/files",
-#         "$bootstrap_path/modules/site_postfix",
-#         "$bootstrap_path/modules/site_postfix/files",
-#         "$bootstrap_path/modules/site_mail",
-#         "$bootstrap_path/modules/site_mail/files",
-#         "$bootstrap_path/modules/site_apache",
-#         "$bootstrap_path/modules/site_apache/files",
-#         "$bootstrap_path/modules/site_apache/files/vhosts",
-#         "$bootstrap_path/modules/site_apache/files/htdocs",
-#         "$bootstrap_path/modules/site_apache/files/htdocs/images",
-#         "$bootstrap_path/modules/site_keys",
-#         "$bootstrap_path/modules/site_keys/files",
-#         "$bootstrap_path/modules/site_keys/files/ssl", ]:
-#  ensure  => directory,
-#  owner   => "puppet",
-#  group   => "puppet",
-#  mode    => 0755,
-#}
-#
-#file { "$bootstrap_path/files/empty":
-#  ensure  => present,
-#  owner   => "puppet",
-#  group   => "puppet",
-#  mode    => 0644,
-#  require => [ Package["puppet"], File["$bootstrap_path/files"] ],
-#}
-#
-#file { "$bootstrap_path/modules/site-apache/htdocs/images/README.html":
-#  ensure  => present,
-#  owner   => "puppet",
-#  group   => "puppet",
-#  mode    => 0644,
-#  require => [ Package["puppet"], File["$bootstrap_path/modules/site-apache/files/htdocs/images"] ],
-#  content => template("$templates/apache/htdocs/images/README.html.erb"),
-#}
-#
-#file { "$bootstrap_path/modules/site-apache/files/htdocs/index.html":
-#  ensure  => present,
-#  owner   => "puppet",
-#  group   => "puppet",
-#  mode    => 0644,
-#  require => [ Package["puppet"], File["$bootstrap_path/modules/site-apache/files/htdocs"] ],
-#  content => template("$templates/apache/htdocs/index.html.erb"),
-#}
-#
-#file { "$bootstrap_path/modules/site-apache/files/htdocs/missing.html":
-#  ensure  => present,
-#  owner   => "puppet",
-#  group   => "puppet",
-#  mode    => 0644,
-#  require => [ Package["puppet"], File["$bootstrap_path/modules/site-apache/files/htdocs"] ],
-#  content => template("$templates/apache/htdocs/missing.html.erb"),
-#}
-#
-#file { "$bootstrap_path/modules/site-apache/files/vhosts/git":
-#  ensure  => present,
-#  owner   => "puppet",
-#  group   => "puppet",
-#  mode    => 0644,
-#  require => [ Package["puppet"], File["$bootstrap_path/modules/site-apache/files/vhosts"] ],
-#  content => template("$templates/apache/vhosts/git.erb"),
-#}
-#
-#file { "$bootstrap_path/modules/site-apache/files/vhosts/lists":
-#  ensure  => present,
-#  owner   => "puppet",
-#  group   => "puppet",
-#  mode    => 0644,
-#  require => [ Package["puppet"], File["$bootstrap_path/modules/site-apache/files/vhosts"] ],
-#  content => template("$templates/apache/vhosts/lists.erb"),
-#}
-#
-#file { "$bootstrap_path/modules/site-apache/files/vhosts/mail":
-#  ensure  => present,
-#  owner   => "puppet",
-#  group   => "puppet",
-#  mode    => 0644,
-#  require => [ Package["puppet"], File["$bootstrap_path/modules/site-apache/files/vhosts"] ],
-#  content => template("$templates/apache/vhosts/mail.erb"),
-#}
-#
-#file { "$bootstrap_path/modules/site-apache/files/vhosts/nagios":
-#  ensure  => present,
-#  owner   => "puppet",
-#  group   => "puppet",
-#  mode    => 0644,
-#  require => [ Package["puppet"], File["$bootstrap_path/modules/site-apache/files/vhosts"] ],
-#  content => template("$templates/apache/vhosts/nagios.erb"),
-#}
-#
-#file { "$bootstrap_path/modules/site-apache/files/vhosts/wiki":
-#  ensure  => present,
-#  owner   => "puppet",
-#  group   => "puppet",
-#  mode    => 0644,
-#  require => [ Package["puppet"], File["$bootstrap_path/modules/site-apache/files/vhosts"] ],
-#  content => template("$templates/apache/vhosts/wiki.erb"),
-#}
-#
-#file { "$bootstrap_path/modules/site-mail/files/aliases":
-#  ensure  => present,
-#  owner   => "puppet",
-#  group   => "puppet",
-#  mode    => 0644,
-#  require => [ Package["puppet"], File["$bootstrap_path/modules/site-mail/files"] ],
-#  content => template("$templates/etc/aliases.erb"),
-#}
-#
-#file { "$bootstrap_path/modules/site-nagios/files/htpasswd.users":
-#  ensure  => present,
-#  owner   => "puppet",
-#  group   => "puppet",
-#  mode    => 0644,
-#  require => [ Package["puppet"], File["$bootstrap_path/modules/site-nagios/files"] ],
-#  content => template("$templates/etc/nagios3/htpasswd.users.erb"),
-#}
-#
-#file { "$bootstrap_path/modules/site-nginx/files/$domain":
-#  ensure  => present,
-#  owner   => "puppet",
-#  group   => "puppet",
-#  mode    => 0644,
-#  require => [ Package["puppet"], File["$bootstrap_path/modules/site-nginx/files"] ],
-#  content => template("$templates/etc/nginx/domain.erb"),
-#}
-#
-#file { "$bootstrap_path/modules/site-postfix/files/tls_policy":
-#  ensure  => present,
-#  owner   => "puppet",
-#  group   => "puppet",
-#  mode    => 0644,
-#  require => [ Package["puppet"], File["$bootstrap_path/modules/site-postfix/files"] ],
-#  content => template("$templates/postfix/tls_policy.erb"),
-#}
diff --git a/manifests/classes/users.pp b/manifests/classes/users.pp
deleted file mode 100644 (file)
index a7aba1b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-class users::virtual inherits user {
-  # define custom users here
-}
-
-class users::backup inherits user {
-  # define third-party hosted backup users here
-}
-
-class users::email inherits user {
-  # define third-party hosted email tunnels here
-}
-
-class users::admin inherits user {
-
-  # root user and password
-  user::manage { "root":
-    tag      => "admin",
-    homedir  => '/root',
-    password => '$root_pass',
-  }
-
-  # first user config
-  user::manage { "$first_user":
-    tag      => "admin",
-    groups   => [ "sudo", ],
-    password => '$first_user_password',
-    sshkey   => [ "$first_user_sshkey" ],
-  }
-
-}
diff --git a/modules/site_apache/files/htdocs/images/.empty b/modules/site_apache/files/htdocs/images/.empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/modules/site_apache/files/vhosts/.empty b/modules/site_apache/files/vhosts/.empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/modules/site_keys/files/ssl/.empty b/modules/site_keys/files/ssl/.empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/modules/site_mail/files/.empty b/modules/site_mail/files/.empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/modules/site_nagios/files/.empty b/modules/site_nagios/files/.empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/modules/site_nginx/files/.empty b/modules/site_nginx/files/.empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/modules/site_postfix/files/.empty b/modules/site_postfix/files/.empty
new file mode 100644 (file)
index 0000000..e69de29
index e972f81777fdb7a597f8b6490b4e89968699e85b..55a27066c226f1fcb8a8a6f69902b5a1db3d99b6 100644 (file)
@@ -8,7 +8,7 @@ class users::backup inherits user {
 
 class users::admin inherits user {
 
-  # reprepro group needed for web nodes
+  # Reprepro group needed for web nodes
   #if !defined(Group["reprepro"]) {
   #  group { "reprepro":
   #    ensure => present,