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


puppet连载24:虚拟资源
image.png

---使用数据库存储
[master]
storeconfigs = true
dbadapter = mysql
dbname = puppet
dbuser = puppet
dbpassword = xx
dbserver = localhost
dbsocket = xx

相关文章:

  • 2022-01-25
  • 2021-06-29
  • 2022-02-18
  • 2021-08-26
  • 2021-09-02
  • 2022-02-24
  • 2021-12-31
  • 2021-09-13
猜你喜欢
  • 2021-06-21
  • 2021-07-19
  • 2021-06-07
  • 2021-09-27
  • 2022-01-13
  • 2021-11-23
  • 2021-10-04
相关资源
相似解决方案