Skip to content

Instantly share code, notes, and snippets.

View midacts's full-sized avatar
🗝️
It's a secret to everybody

John McCarthy midacts

🗝️
It's a secret to everybody
View GitHub Profile
@midacts
midacts / gist:5415401
Created April 18, 2013 19:06
/etc/puppetlabs/facter/facts.d/puppet_enterprise_installer.txt
fact_stomp_port=61613
fact_stomp_server=puppet.midacts.local
fact_is_puppetagent=true
fact_is_puppetmaster=true
fact_is_puppetca=true
fact_is_puppetconsole=true
fact_puppetmaster_certname=puppet.midacts.local
puppet module install puppetlabs/stdlib
Preparing to install into /etc/puppetlabs/puppet/modules ...
Downloading from http://forge.puppetlabs.com ...
Installing -- do not interrupt ...
/etc/puppetlabs/puppet/modules
âââ puppetlabs-stdlib (v4.0.2)
THEN
puppet agent -t
@midacts
midacts / gist:5421103
Created April 19, 2013 15:29
clamav::database
class clamav::database {
require clamav::params
# Copies the main.cvd files to the node's local clamav database directory
file { 'main_cvd':
ensure => file,
path => "${clamav::params::main_origin}",
source => 'puppet:///modules/clamav/main.cvd',
mode => 644,
@midacts
midacts / gist:5699057
Created June 3, 2013 15:40
/etc/foreman/database.yml
production:
adapter : mysql
database : puppet
host : localhost
port : 3306
username : puppet
password : XXXXXXXXXXX
encoding : utf8
development:
@midacts
midacts / gist:5721986
Last active December 18, 2015 03:59
Installation of Foreman 1.1 on Debain Squeeze errors.
Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install foreman-sqlite3' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
bundler foreman foreman-proxy libnet-ping-ruby libnet-ping-ruby1.8
libsinatra-ruby libsqlite3-0 libsqlite3-dev rake ruby-rack
ruby-rack-protection ruby-sinatra ruby-tilt rubygems-integration sudo unzip
zip
Suggested packages:
sqlite3-doc
@midacts
midacts / gist:5724442
Created June 6, 2013 19:58
puppet agent --test error after foreman install.
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Error 400 on SERVER: Failed to find server.example.local via exec: Execution of '/etc/puppet/node.rb server.example.local' returned 1:
Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed when searching for node server.example.local: Failed to find server.example.local via exec: Execution of '/etc/puppet/node.rb server.example.local' returned 1:
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
ISP -> wifi routrer (local home network) -> (100M away) 8port switch -> (another 100M away) -> 8 port switch
@midacts
midacts / gist:10185664
Created April 8, 2014 20:23
default apache site file
cat <<EOA > /etc/apache2/sites-available/default
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
# http://www.thegeekstuff.com/2014/08/emc-naviseccli-navisphere-cli/
# naviseccli -h H1_SPA storagegroup –list –gname SGroup_1
Param (
[string]$host
[switch]$list
[string]$gname
)
$var = naviseccli -h $host storagegroup
NAME TYPE VALUE
---- ---- -----
Storage Group Name string SERVER01
Storage Group UID string C2:B8:54:34:47:H3:D2:....
HBA/SP Pairs string
HBA UID string 50:FF:01:995:C6:2D:11....
HBA UID string 50:FF:01:995:C6:2D:11....
HBA UID string 50:FF:01:995:C6:2D:11....
HBA UID string 50:FF:01:995:C6:2D:11....
HLU/ALU Pairs string