Created
August 6, 2012 21:04
-
-
Save llowder/3278444 to your computer and use it in GitHub Desktop.
Puppet 3 rc3 / hiera 1 rc4 / hiera-puppet rc2 issues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| node 'puppet3-test.XXXXX.com' { | |
| ######################################## | |
| # Basic Server Configuration Items # | |
| ######################################## | |
| # -- Basenode -- # | |
| class { 'basenode': | |
| is_puppet_master => true, | |
| } | |
| # -- Resolver -- # | |
| include resolver | |
| resolver::resolv_conf { 'XXXXX.com': } | |
| # -- Sudoers -- # | |
| basenode::sudoers { 'XXXXX': | |
| group => '%XXXXX', | |
| commands => 'ALL=NOPASSWD: ALL', | |
| } | |
| # -- Files and Directories -- # | |
| # include tn_web::usr_local_bin | |
| # include tn_web::etc | |
| # include bash_src_scripts::usr_local_share_bash | |
| # -- Miscellaneous Packages & Services -- # | |
| package { 'p7zip-full': ensure => installed ; } | |
| package { 'unzip': ensure => installed ; } | |
| package { 'ncftp': ensure => installed ; } | |
| package { 'nfs-common': ensure => installed ; } | |
| service { 'portmap': | |
| ensure => running, | |
| require => Package['nfs-common']; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'nodes/*.pp' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class basenode ($is_puppet_master = false, $apt_host = 'repo.XXXXXX.com') { | |
| include basenode::sudo_defaults | |
| include basenode::apt_defaults | |
| group { 'XXXX': | |
| ensure => 'present', | |
| } | |
| add_user { 'XXXXX': | |
| uid => 'YYYYY', | |
| gid => 'ZZZZZ' | |
| } | |
| add_ssh_key { 'XXXXX': | |
| key => 'longrandomstring' | |
| type => 'ssh-rsa', | |
| } | |
| case $::operatingsystem { | |
| 'Ubuntu': { | |
| if $::is_virtual { | |
| package { 'irqbalance': ensure => absent, notify => Exec['kill-irqbalance'] } | |
| } | |
| package { | |
| 'ntp': ensure => installed; | |
| 'puppet': ensure => installed; | |
| } | |
| file { | |
| '/etc/ntp.conf': | |
| ensure => present, | |
| owner => 'root', | |
| group => 'root', | |
| mode => '0644', | |
| source => 'puppet:///modules/basenode/ntp.conf', | |
| require => Package['ntp'], | |
| notify => Exec['update-ntp-config']; | |
| '/etc/default/puppet': | |
| ensure => present, | |
| owner => 'root', | |
| group => 'root', | |
| mode => '0644', | |
| source => 'puppet:///modules/basenode/puppet.default'; | |
| '/etc/local.seeds': | |
| ensure => present, | |
| owner => 'root', | |
| group => 'root', | |
| mode => '0644', | |
| source => 'puppet:///modules/basenode/local.seeds'; | |
| } | |
| exec{ | |
| '/usr/bin/debconf-set-selections /etc/local.seeds': | |
| subscribe => File['/etc/local.seeds'], | |
| refreshonly => true; | |
| '/usr/sbin/dpkg-reconfigure -fnoninteractive dash': | |
| subscribe => File['/etc/local.seeds'], | |
| refreshonly => true; | |
| } | |
| basenode::apt_keys { | |
| 'E5D17263AAFDD5DB': ensure => present, apt_key_url => "http://${apt_host}/keys"; | |
| '0D5CA2C7094D0420': ensure => present, apt_key_url => "http://${apt_host}/keys"; | |
| '1054B7A24BD6EC30': ensure => present, apt_key_url => "http://${apt_host}/keys"; | |
| '99B656EA8683D8A2': ensure => present, apt_key_url => "http://${apt_host}/keys"; | |
| 'DA6F74CAADC00FFA': ensure => present, apt_key_url => "http://${apt_host}/keys"; | |
| } | |
| basenode::aptrepo { | |
| 'main_security.list': | |
| uri => "http://${apt_host}/security", | |
| distribution => "${::lsbdistcodename}-security", | |
| component => [ 'main restricted', 'universe', 'multiverse']; | |
| 'main.list': | |
| uri => "http://${apt_host}/ubuntu", | |
| distribution => $::lsbdistcodename, | |
| component => [ 'main restricted', 'universe', 'multiverse']; | |
| 'partners.list': | |
| uri => "http://${apt_host}/partner", | |
| distribution => $::lsbdistcodename, | |
| component => 'partner'; | |
| 'updates.list': | |
| uri => "http://${apt_host}/ubuntu", | |
| distribution => "${::lsbdistcodename}-updates", | |
| component => [ 'main restricted', 'universe', 'multiverse']; | |
| 'puppet.list': | |
| uri => "http://${apt_host}/puppet", | |
| distribution => $::lsbdistcodename, | |
| component => [ 'main' ]; | |
| 'puppetlabs.list': | |
| uri => "http://${apt_host}/puppetlabs", | |
| distribution => $::lsbdistcodename, | |
| component => [ 'main' ]; | |
| 'postgres.list': | |
| uri => "http://${apt_host}/postgresql", | |
| distribution => $::lsbdistcodename, | |
| component => [ 'main' ]; | |
| 'local.list': | |
| uri => "http://${apt_host}/oreilly", | |
| distribution => './', | |
| component => ['']; | |
| } | |
| } | |
| ... | |
| default: { } | |
| } | |
| file { | |
| '/etc/puppet/puppet.conf': | |
| ensure => present, | |
| owner => 'root', | |
| group => 'root', | |
| mode => '0644', | |
| content => template('basenode/puppet.conf.erb'); | |
| } | |
| exec { 'kill-irqbalance': | |
| command => '/usr/bin/pkill irqbalance', | |
| refreshonly => true; | |
| } | |
| exec { 'update-ntp-config': | |
| command => '/etc/init.d/ntp restart', | |
| refreshonly => true; | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment