Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
## Node Definition node 'ctier.domain.net' inherits manager { $myserverid = "22" include cx::db } ## MySQL Module definition (mysql/manifests/init.pp) # MySQL installation and initialization module - ensure mysql is installed class mysql { package { ["mysql"]: ensure => present } package { ["mysql-server"]: ensure => present } file { "/var/log/mysql": ensure => directory, owner => "mysql", group => "mysql", mode => "755", require => Package["mysql"], } if $myserverid { $mysqlid = $myserverid }else{ $mysqlid = "0" } notice($mysqlid) file { "/etc/my.cnf": ensure => present, owner => "root", group => "root", mode => "644", require => Package["mysql-server"], content => template("/etc/puppet/modules/modules/mysql/templates/my.erb"); } $password = "temp" exec { "Set MySQL server root password": subscribe => [ Package["mysql-server"], Package["mysql"] ], refreshonly => true, unless => "mysqladmin -uroot -p$password status", path => "/bin:/usr/bin", command => "mysqladmin -uroot password $password", } exec { "Initialize the database before first boot": subscribe => [ Package["mysql-server"], Package["mysql"] ], refreshonly => true, unless => "mysqladmin -uroot -p$password status", path => "/bin:/usr/bin", command => "/usr/bin/mysql_install_db", } service { "mysqld": ensure => running, enable => true, subscribe => File["/etc/my.cnf"]; }
This paste will be private.
From the Design Piracy series on my blog: