search for: iparray

Displaying 2 results from an estimated 2 matches for "iparray".

Did you mean: parray
2009 Jul 27
4
Custom fact errors
...es/custom/plugins/facter/ test_fact.rb: ---------- # cat modules/custom/plugins/facter/test_fact.rb # test_fact.rb ## Return symbolic network name based on eth0 subnet. Facter.add("test_fact") do confine :kernel => :linux ipaddress=%x{/sbin/ifconfig eth0}.chomp iparray = ipaddress.split(".") netw = iparray[0]+"."+iparray[1]+"."+iparray[2] #I never claimed to be a ruby programmer netname = case netw when "192.168.4" then "siteA" when "10.1.1" then "sit...
2011 May 05
1
variables inside a template for my hp ilo device
...ide a template. Any ideas on how I can accomplish this? # Define the two variables which will be used to determin which network the ilo will go on ilonet = ''21'' gwbit = ''240'' dns = ''10.0.1.19'' netmask = ''255.255.255.0'' iparray = ipaddress.split(''.'') iloip = iparray[0] + ''.'' + iparray[1] + ''.'' + iparray[2] + ''.'' + ilonet gwarray = iloip.split(''.'') gateway = gwarray[0] + ''.'' + gwarray[1] + ''.'' + gwa...