[icinga-checkins] icinga.org: icinga-vagrant/master: icinga2x*: Fix puppet hiera warnings

git at icinga.org git at icinga.org
Sun Feb 8 15:58:30 CET 2015


Module: icinga-vagrant
Branch: master
Commit: 7ad9d7d0c244b5daa400e72ebf68135fe8f50476
URL:    https://git.icinga.org/?p=icinga-vagrant.git;a=commit;h=7ad9d7d0c244b5daa400e72ebf68135fe8f50476

Author: Michael Friedrich <michael.friedrich at gmail.com>
Date:   Sun Feb  8 15:58:10 2015 +0100

icinga2x*: Fix puppet hiera warnings

---

 graphite/Vagrantfile                                  |    2 +-
 icinga1x/Vagrantfile                                  |    2 +-
 icinga2x-cluster/.vagrant-puppet/manifests/default.pp |   10 +++++++---
 icinga2x-cluster/Vagrantfile                          |    1 +
 icinga2x-cluster/hiera.yaml                           |    9 +++++++++
 icinga2x-graylog2/Vagrantfile                         |    2 +-
 icinga2x/.vagrant-puppet/manifests/default.pp         |   10 +++++++---
 icinga2x/Vagrantfile                                  |    3 ++-
 icinga2x/hiera.yaml                                   |    9 +++++++++
 9 files changed, 38 insertions(+), 10 deletions(-)

diff --git a/graphite/Vagrantfile b/graphite/Vagrantfile
index 8f29e6f..240e670 100644
--- a/graphite/Vagrantfile
+++ b/graphite/Vagrantfile
@@ -2,7 +2,7 @@
 # vi: set ft=ruby :
 
 VAGRANTFILE_API_VERSION = "2"
-VAGRANT_REQUIRED_VERSION = "1.2.0"
+VAGRANT_REQUIRED_VERSION = "1.6.5"
 
 # Require 1.6.5 at least
 if ! defined? Vagrant.require_version
diff --git a/icinga1x/Vagrantfile b/icinga1x/Vagrantfile
index a42dbd5..e67f952 100644
--- a/icinga1x/Vagrantfile
+++ b/icinga1x/Vagrantfile
@@ -2,7 +2,7 @@
 # vi: set ft=ruby :
 
 VAGRANTFILE_API_VERSION = "2"
-VAGRANT_REQUIRED_VERSION = "1.2.0"
+VAGRANT_REQUIRED_VERSION = "1.6.5"
 
 # Require 1.6.5 at least
 if ! defined? Vagrant.require_version
diff --git a/icinga2x-cluster/.vagrant-puppet/manifests/default.pp b/icinga2x-cluster/.vagrant-puppet/manifests/default.pp
index e59cdd5..1f49452 100644
--- a/icinga2x-cluster/.vagrant-puppet/manifests/default.pp
+++ b/icinga2x-cluster/.vagrant-puppet/manifests/default.pp
@@ -15,9 +15,13 @@ include selinux
 ####################################
 # Basic stuff
 ####################################
-
-Package {
-  allow_virtual => false
+# fix puppet warning.
+# https://ask.puppetlabs.com/question/6640/warning-the-package-types-allow_virtual-parameter-will-be-changing-its-default-value-from-false-to-true-in-a-future-release/
+if versioncmp($::puppetversion,'3.6.1') >= 0 {
+  $allow_virtual_packages = hiera('allow_virtual_packages',false)
+  Package {
+    allow_virtual => $allow_virtual_packages,
+  }
 }
 
 package { [ 'vim-enhanced', 'mailx', 'tree', 'gdb' ]:
diff --git a/icinga2x-cluster/Vagrantfile b/icinga2x-cluster/Vagrantfile
index 3f1e826..428d330 100644
--- a/icinga2x-cluster/Vagrantfile
+++ b/icinga2x-cluster/Vagrantfile
@@ -43,6 +43,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
       app_config.vm.provision :puppet do |puppet|
         puppet.module_path = ".vagrant-puppet/modules"
         puppet.manifests_path = ".vagrant-puppet/manifests"
+        puppet.hiera_config_path = "hiera.yaml"
         #puppet.options = "--verbose --debug"
       end
       app_config.vm.provision :shell, :path => ".vagrant-puppet/manifests/finalize.sh"
diff --git a/icinga2x-cluster/hiera.yaml b/icinga2x-cluster/hiera.yaml
new file mode 100644
index 0000000..adbfcd2
--- /dev/null
+++ b/icinga2x-cluster/hiera.yaml
@@ -0,0 +1,9 @@
+---
+:backends:
+  - yaml
+
+:hierarchy:
+  - "common"
+
+:yaml:
+  :datadir: '/vagrant/hiera'
diff --git a/icinga2x-graylog2/Vagrantfile b/icinga2x-graylog2/Vagrantfile
index fe695a2..76aa947 100644
--- a/icinga2x-graylog2/Vagrantfile
+++ b/icinga2x-graylog2/Vagrantfile
@@ -2,7 +2,7 @@
 # vi: set ft=ruby :
 
 VAGRANTFILE_API_VERSION = "2"
-VAGRANT_REQUIRED_VERSION = "1.2.0"
+VAGRANT_REQUIRED_VERSION = "1.6.5"
 
 # Require 1.6.5 at least
 if ! defined? Vagrant.require_version
diff --git a/icinga2x/.vagrant-puppet/manifests/default.pp b/icinga2x/.vagrant-puppet/manifests/default.pp
index d507ab3..ecf4c4c 100644
--- a/icinga2x/.vagrant-puppet/manifests/default.pp
+++ b/icinga2x/.vagrant-puppet/manifests/default.pp
@@ -32,9 +32,13 @@ file { '/var/www/html/icinga_wall.png':
 ####################################
 # Misc
 ####################################
-
-Package {
-  allow_virtual => false
+# fix puppet warning.
+# https://ask.puppetlabs.com/question/6640/warning-the-package-types-allow_virtual-parameter-will-be-changing-its-default-value-from-false-to-true-in-a-future-release/
+if versioncmp($::puppetversion,'3.6.1') >= 0 {
+  $allow_virtual_packages = hiera('allow_virtual_packages',false)
+  Package {
+    allow_virtual => $allow_virtual_packages,
+  }
 }
 
 package { [ 'vim-enhanced', 'mailx', 'tree', 'gdb' ]:
diff --git a/icinga2x/Vagrantfile b/icinga2x/Vagrantfile
index 5dc0521..f7f2337 100644
--- a/icinga2x/Vagrantfile
+++ b/icinga2x/Vagrantfile
@@ -2,7 +2,7 @@
 # vi: set ft=ruby :
 
 VAGRANTFILE_API_VERSION = "2"
-VAGRANT_REQUIRED_VERSION = "1.2.0"
+VAGRANT_REQUIRED_VERSION = "1.6.5"
 
 # Require 1.6.5 at least
 if ! defined? Vagrant.require_version
@@ -28,6 +28,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
   config.vm.provision :puppet do |puppet|
     puppet.module_path = ".vagrant-puppet/modules"
     puppet.manifests_path = ".vagrant-puppet/manifests"
+    puppet.hiera_config_path = "hiera.yaml"
     #puppet.options = "--verbose --debug"
   end
   config.vm.provision :shell, :path => ".vagrant-puppet/manifests/finalize.sh"
diff --git a/icinga2x/hiera.yaml b/icinga2x/hiera.yaml
new file mode 100644
index 0000000..adbfcd2
--- /dev/null
+++ b/icinga2x/hiera.yaml
@@ -0,0 +1,9 @@
+---
+:backends:
+  - yaml
+
+:hierarchy:
+  - "common"
+
+:yaml:
+  :datadir: '/vagrant/hiera'



More information about the icinga-checkins mailing list