Skip to content

Instantly share code, notes, and snippets.

@jorgelo
Created January 7, 2014 20:14
Show Gist options
  • Save jorgelo/8306098 to your computer and use it in GitHub Desktop.
Save jorgelo/8306098 to your computer and use it in GitHub Desktop.
class mariadb {
service {"mysql":
ensure => running,
require => [Exec["mariadb-repo"], Package["mariadb-server"]]
}
package {[mariadb-server, mariadb-common]:
ensure => installed,
require => exec["mariadb-repo"],
}
exec { "mariadb-repo":
command => "apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db; add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu precise main';apt-get update;DEBIAN_FRONTEND=noninteractive apt-get -y -f install mariadb-server",
creates => "/var/log/mysql/mariadb-bin.index",
path => ["/usr/bin", "/bin"],
timeout => 0,
notify => Service["mysql"]
#refreshonly => true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment