Skip to content

Instantly share code, notes, and snippets.

@noomii
noomii / gist:1155725
Created August 19, 2011 00:48
Github finger print - puppet
class sshkey {
sshkey {"github.com":
ensure => present,
key => "AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==",
type => rsa,
}
check_mode { "/etc/ssh/ssh_known_hosts":
@noomii
noomii / bootstrap
Created August 18, 2011 22:02
Hotfix bootstrap
yes | sudo aptitude install ruby
yes | sudo aptitude install rubygems
sudo gem install puppet -v 2.7.1 --no-ri --no-rdoc
cd /var/lib/gems/1.8/gems/puppet-2.7.1/
sudo ./install.rb
cd /usr/local/
sudo wget https://raw.github.com/gist/1154831/7459b804e94582fe6ea2a5baef2a8215f3cc839e/set_hostname.sh
sudo chmod u+x set_hostname.sh
sudo ./set_hostname.sh
sudo bash -c "echo '/usr/local/set_hostname.h' >> /etc/rc.local"
@noomii
noomii / set_hostname.sh
Created August 18, 2011 18:53
Set hostname for hotfix instance
#!/bin/bash
DOMAIN=noomii.com
HOSTNAME=hotfix
IPV4='184.73.226.144'
# Set the host name
hostname $HOSTNAME
echo $HOSTNAME > /etc/hostname
@noomii
noomii / gist:1131067
Created August 8, 2011 01:47
Compile vim puppet
class vim {
$version = "7.3"
Exec {
path => [
'/usr/local/bin'
,'/usr/bin'
,'/bin'
],
}
file { "/usr/local/src": ensure => directory }
info: Caching certificate for rafael.development.noomii
info: Caching certificate_revocation_list for ca
info: Caching catalog for rafael.development.noomii
info: Applying configuration version '1312736064'
notice: /Stage[main]/Ssh::Install/Package[ssh]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Mysql::Server/Package[mysql-server]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Base-packages/Exec[apt-get-update]/returns: executed successfully
notice: /Stage[main]/Base-packages/Package[build-essential]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Base-packages/Package[libcurl3-openssl-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Vim/Exec[download-vim-7.3-from-source]/returns: executed successfully