Skip to content

Instantly share code, notes, and snippets.

network --device=lo
em1
em2
em3
em4 --bootproto=static --ip=10.1.16.107 --netmask=255.255.255.0 --gateway=10.1.16.254 --nameserver=10.1.18.52 --hostname=s07.a.example.com
network --device=lo
em1
em2
em3
em4 --bootproto=static --ip=10.1.17.107 --netmask=255.255.255.0 --gateway=10.1.16.254 --nameserver=10.1.18.52 --hostname=s07.a.example.com
{
"boot_files": {},
"comment": "",
"ctime": 1353706932.7770619,
"depth": 3,
"enable_gpxe": 0,
"fetchable_files": {},
"gateway": "10.1.16.254",
"hostname": "s07.a.example.com",
"image": "",
# wget -S http://10.1.18.101/cobbler_api
--2012-12-17 18:12:47-- http://10.1.18.101/cobbler_api
Connecting to 10.1.18.101:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 502 Proxy Error
Date: Mon, 17 Dec 2012 18:12:47 GMT
Content-Length: 401
Keep-Alive: timeout=10, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
[rbowes@s01 ~]$ df -h
abrt-addon-python-2.0.8-6.el6.centos.x86_64
audit-libs-python-2.2-2.el6.x86_64
dbus-python-0.83.0-6.1.el6.x86_64
libreport-python-2.0.9-5.el6.centos.x86_64
libselinux-python-2.0.94-5.3.el6.x86_64
libsemanage-python-2.0.43-4.1.el6.x86_64
libxml2-python-2.7.6-8.el6_3.4.x86_64
newt-python-0.52.11-3.el6.x86_64
policycoreutils-python-2.0.83-19.24.el6.x86_64
[root@s07 ~]# ifconfig
bond0 Link encap:Ethernet HWaddr BC:30:5B:F0:32:6C
inet6 addr: fe80::be30:5bff:fef0:326c/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:6515232 errors:0 dropped:0 overruns:0 frame:0
TX packets:8108130 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4645238939 (4.3 GiB) TX bytes:9954279696 (9.2 GiB)
bond0.16 Link encap:Ethernet HWaddr BC:30:5B:F0:32:6C
[root@s01 ~]# ifconfig
bond0 Link encap:Ethernet HWaddr BC:30:5B:F0:EE:8C
inet6 addr: fe80::be30:5bff:fef0:ee8c/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:3151457 errors:0 dropped:330 overruns:0 frame:0
TX packets:4817138 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:464996200 (443.4 MiB) TX bytes:5565123241 (5.1 GiB)
bond0.18 Link encap:Ethernet HWaddr BC:30:5B:F0:EE:8C
class config::sysctl::hugepages{
$memory = hiera_hash('memory')
$required_memory_keys = [
'reserved',
'huge_pagesize'
]
validate_hash_content($memory, $required_memory_keys)
$nr_hugepages = ( $memorysize_raw - $memory['reserved'] ) / $memory['huge_pagesize']
module Puppet::Parser::Functions
newfunction(:int, :type => :rvalue) do |args|
if (args.size != 1) then
raise(Puppet::ParseError, "int(): Wrong number of arguments "+
"given #{args.size} for 1")
end
Puppet::Parser::Functions.function('is_numeric')
raise (Puppet::ParseError, "int(): expecting a number, got #{args[0].inspect} which is of type #{args[0].class}") unless function_is_numeric([args[0]])
end
args[0].to_i
[rbowes@s01 rpmbuild]$ ES_PACKAGE=elasticsearch-0.20.2.zip
[rbowes@s01 rpmbuild]$ ES_DIR=${ES_PACKAGE%%.zip}
[rbowes@s01 rpmbuild]$ SITE=https://github.com/downloads/elasticsearch/elasticsearch
[rbowes@s01 rpmbuild]$ if [ ! -d "$ES_DIR" ] ; then
> wget --no-check-certificate $SITE/$ES_PACKAGE
> unzip $ES_PACKAGE
> fi
--2013-01-28 22:06:43-- https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.20.2.zip
Resolving github.com... 207.97.227.239
Connecting to github.com|207.97.227.239|:443... connected.
Given a hiera hash structure like this:
networks:
NET_192.168_1:
address: 192.168.1.0/24
comment: 192.168.1.x subnet
NET_10_1:
address: 10.1.0.0/16
comment: all 10.1.x.x networks
LOCALHOST: