Skip to content

Instantly share code, notes, and snippets.

View ryanycoleman's full-sized avatar

Ryan Coleman ryanycoleman

  • Stackery
  • Portland, OR
View GitHub Profile
Monitor association changes string to array on one side, but other side is still a string. Causes a constantly change attempt:
-----
monitor_association changed '{"type"=>"MONITOR_RULE_TYPE_SINGLE", "quorum"=>"0", "monitor_templates"=>"/Common/MyMonitor"}' to '{"type"=>"MONITOR_RULE_TYPE_SINGLE", "monitor_templates"=>["/Common/MyMonitor"], "quorum"=>"0"}'

The pe-easy-agent.sh script mentioned in the instance_defaults hash is available at pe-easy-agent.sh

# Generates facts of the version pkg_foo => 'version'
begin
require 'puppet'
pkgs = Puppet::Type.type(:package).instances
pkgs.each do |pkg|
Facter.add("pkg_#{pkg[:name]}") do
value = pkg.provider.properties[:ensure]
if value != :absent