Skip to content

Instantly share code, notes, and snippets.

View DavidS's full-sized avatar
☁️
Currently working as @DavidS-om

David Schmitt DavidS

☁️
Currently working as @DavidS-om
View GitHub Profile
newproperty(:mode) do
desc "Set trunking mode of the interface."
defaultto(:undef)
newvalues(:undef, :access, :dot1q, :dynamic, :private, :trunk)
end
newproperty(:trunk_native_vlan) do
desc "Set native VLAN when interface is in trunking mode"
defaultto(:undef)
newvalues(:undef, /^\d+$/)
#!/bin/bash
DIR="$1"
# only start rename when $DIR is not root or empty
if [ "$DIR" == "" ] || [ "$DIR" == "/" ]; then
echo "No directory given" >&2
exit 1
fi
Works:
irb(main):001:0> require "openssl"
=> true
irb(main):002:0>
Doesn't work:
irb(main):001:0> require "puppet/network/xmlrpc/client"
Puppet::Error: You must have the Ruby openssl library installed