Skip to content

Instantly share code, notes, and snippets.

View natemccurdy's full-sized avatar

Nate McCurdy natemccurdy

View GitHub Profile
@natemccurdy
natemccurdy / has_wordpress.pp
Last active August 29, 2015 14:14
Check if Wordpress is installed for Fundamentals Capstone Lab
#/etc/puppetlabs/puppet/modules/classroom/lib/facter/has_wordpress.rb
require 'net/http'
Facter.add('has_wordpress') do
setcode do
begin
http = Net::HTTP.new(Facter.value("ipaddress"), '80')
req = Net::HTTP::Get.new('/wp-login.php')
req['Content-Type'] = 'plain/html'
resp = http.request(req)
@natemccurdy
natemccurdy / blog.pp
Last active February 3, 2017 00:05
Puppet Fundamentals Capstone
# $modulepath/profiles/manifests/blog.pp
class profiles::blog {
include mysql::server
include mysql::bindings
include apache
include apache::mod::php
include wordpress
}