Bug 1344939 - Installing newer version of python on buildduty-tools breaks puppet, r?coop
MozReview-Commit-ID: 46Itq0vbugD
new file mode 100644
--- /dev/null
+++ b/modules/buildduty_tools/manifests/config.pp
@@ -0,0 +1,6 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+class buildduty_tools::config {
+ include packages::httpd
+}
new file mode 100644
--- /dev/null
+++ b/modules/buildduty_tools/manifests/httpd.pp
@@ -0,0 +1,36 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+class buildduty_tools::httpd {
+ include ::config
+ include users::buildduty
+
+ case $::operatingsystem {
+ CentOS: {
+ # Create RootDir
+ file {
+ "/var/www/html/builds/":
+ ensure => directory,
+ owner => "${users::buildduty::username}",
+ group => "${users::buildduty::group}";
+ }
+
+ httpd::config {
+ "buildduty_tools.conf":
+ content => template("buildduty_tools/buildduty_tools.conf.erb");
+ }
+
+ # add a dependency between resources not defined here
+ File['/etc/puppet/puppet.conf'] ~> Service['httpd']
+ Package['openssl'] ~> Service['httpd']
+
+
+ # add a dependency between resources not defined here
+ #Package['openssl'] ~> Service['httpd']
+ }
+
+ default: {
+ fail("buildduty_tools::httpd support missing for $::operatingsystem")
+ }
+ }
+}
--- a/modules/buildduty_tools/manifests/init.pp
+++ b/modules/buildduty_tools/manifests/init.pp
@@ -1,7 +1,8 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
class buildduty_tools {
include buildduty_tools::install
+ include buildduty_tools::httpd
include buildduty_tools::buildduty-tools
}
new file mode 100644
--- /dev/null
+++ b/modules/buildduty_tools/templates/buildduty_tools.conf.erb
@@ -0,0 +1,8 @@
+# VHost setup for buildduty-tools
+<VirtualHost *:80>
+ ServerAdmin release@mozilla.com
+ DocumentRoot /var/www/html
+ ServerName buildduty-tools-build.mozilla.org
+ ErrorLog logs/buildduty-tools_error.log
+ CustomLog logs/buildduty-tools_access.log common
+</VirtualHost>