hi all,
Please help me with the following:
I need to be sure aptitude update has run before puppet tries to
install mysql_percona:
in SHORT:
require => [
Apt::pin['libmysqlclient18_libmysqlclient-dev'],
Apt::source['Mysql_Percona'],
],
in LONG I've got these pieces:
define apt::source ($deb_type, $url, $dist, $opt, $ensure) {
include apt
file {
"${apt::basedir}/sources.list.d/${name}.list":
content => "#$name\n$deb_type $url $dist $opt\n\n",
notify => Exec['aptitude-update'],
ensure => $ensure;
}
}
define apt::pin ($pkg, $pin, $prio, $ensure) {
include apt
file {
"${apt::basedir}/preferences.d/${name}":
content => "Package: $pkg\nPin: $pin\nPin-Priority: $prio\n\n",
notify => Exec['aptitude-update'],
owner => root,
group => root,
mode => "660",
ensure => $ensure;
}
}
and:
apt::source {
"Mysql_Percona":
deb_type => "deb",
url => "http://repo.percona.com/apt",
dist => "squeeze",
opt => "main",
ensure => present;
"Mysql_Percona_src":
deb_type => "deb-src",
url => "http://repo.percona.com/apt",
dist => "squeeze",
opt => "main",
ensure => present;
}
apt::pin {
"libmysqlclient18_libmysqlclient-dev":
pkg => "libmysqlclient18 libmysqlclient-dev",
pin => "origin repo.percona.com",
prio => "750",
ensure => present;
}
package {
['libmysqlclient-dev','libconfig-ini-perl','libconfig-inifiles-
perl','libtimedate-perl','libdbi-perl','libterm-readkey-perl']:
>>>>>>>>> this is what I want <<<<<<<<<<<<<<<<<<<<
require => [
Apt::pin['libmysqlclient18_libmysqlclient-dev'],
Apt::source['Mysql_Percona'],
],
>>>>>>>>> this is what I want <<<<<<<<<<<<<<<<<<<<
ensure => latest;
"percona-server-server-5.5":
require => [
File['/etc/init.d/mysql','/etc/mysql/my.cnf', '/srv/mysql/
data', '/srv/mysqllog/binlog','/etc/apt/sources.list.d/
Mysql_Percona.list'],
Class['defaultclass'],
package['libmysqlclient-dev','libconfig-ini-perl','libconfig-
inifiles-perl','libtimedate-perl','libdbi-perl','libterm-readkey-
perl'],
],
ensure => present;
"percona-server-client-5.5":
require => [
File['/etc/apt/sources.list.d/Mysql_Percona.list'],
Class['defaultclass'],
package['libmysqlclient-dev','libconfig-ini-perl','libconfig-
inifiles-perl','libtimedate-perl','libdbi-perl','libterm-readkey-
perl'],
],
ensure => present;
}
result is now: Syntax error at '::pin'; expected ']' at ....
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.