Building Puppet 4.0 test environment with Vagrant

Puppet 4.0 RC is released Here’s some notes how to build CentOS/vagrant/puppet master and agent and some relevant links Release notes https://puppetlabs.com/blog/release-candidate-open-source-puppet-4.0 https://groups.google.com/forum/#!msg/puppet-announce/Wl9Ag2gRmXM/RpdggribgvwJ Prerequisities for test environment VirtualBox Grab and install VirtualBox¬†https://www.virtualbox.org/wiki/Downloads Vagrant Grab and install Vagrant¬†https://www.vagrantup.com/downloads.html CentOS Get minimal…

Python and MySQLdb quick note

Quick note for basic stuff in python: #import stuff import MySQLdb # connect try: db = MySQLdb.connect(host=”localhost”, user=”user”, passwd=”password”, db=”mydb”) except Exception, e: sys.exit(“Problem connecting to DB: %s” % e) # Cursor cur = db.cursor() # Defer warnings if needed,…

Failing node ids from puppet dashboard

mysql> select distinct(node_id) from reports where id = any (select report_id from report_logs where message like ‘%Could not evaluate: undefined method%each_line%’); Substitute %Could not evaluate: undefined method%each_line% with error you want to find out

OSX 10.9 a.k.a Mavericks and puppet

Hmh, Apple got me with my pants down with their announcement about Mavericks being free-for-all as we have been managing some Macs with puppet. Current plan before that was to finally upgrade puppet infra to 3.3.1 from latest 2.7-series…Well, good…

YASPI

Case: yum fails: http://yum.puppetlabs.com/el/6/dependencies/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 – “Failed to connect to 2600:3c00::f03c:91ff:fe69:6bf0: Network is unreachable” in a machine which doesn’t have IPv6 connectivity Solution: Since connections go through proxy, define it to respective repo config Root cause:…

HTML info page from pdfs in a directory

Script uses pdfinfo to get information from pdf-files in directory and prints that in a webpage, put it in a webserver directory along pdfs Prereqs: pdfinfo #!/bin/sh # # Digs info from pdf and presents it in htmlpage # INFOCMD=”/usr/bin/pdfinfo”…