class account::virtual {
@user {"mysql":
ensure => present,
uid => 27,
gid => 27,
home => "/var/lib/mysql",
shell => "/bin/bash",
}
@user {"apache":
ensure => present,
uid => 48,
gid => 48,
home => "/var/www",
shell => "/sbin/nologin",
}
}
调用
class webapp {
realize(User["mysql"])
}
-> 顺序
<- before
~> notify
<~ notify
---使用数据库存储
[master]
storeconfigs = true
dbadapter = mysql
dbname = puppet
dbuser = puppet
dbpassword = xx
dbserver = localhost
dbsocket = xx