- Mastering Puppet 5
- Ryan Russell Yates Jason Southgate
- 177字
- 2021-07-16 17:46:12
Roles
Let's take another step back and consider what we want to achieve with the roles part of the pattern. The overarching task is to piece together these building-brick-like profile classes into full tech stacks, which we call roles, and are now the second part of our full pattern:

Here you can see that we have taken the composite profiles from our previous example, and stacked them one on top of the other, to produce a full tech stack. We are also utilizing two additional shared profiles:
- profile::base is included in all machines, including workstations. It manages security baselines and so on, using conditional logic for OS-specific profiles; for example, profile:: base::ubuntu, profile::base::redhat, and so on, as needed.
- profile::server is included in all machines that provide a service over the network, and configures services such as NTP, firewalls, monitoring, logging, and so on.
Let's look again at the fully functional LAMP stack as an example in Puppet DSL:
# LAMP stack
class role::lamp {
include profile::web::apache
include profile::db::mysql
include profile::programming::php
include profile::server
include profile::base
}
推薦閱讀
- 手繪圖說數(shù)字電路圖
- 輕松跟我學(xué)Protel 99SE電路設(shè)計(jì)與制版
- 電子產(chǎn)品調(diào)試技能上崗實(shí)訓(xùn)
- 無線網(wǎng)絡(luò)優(yōu)化分析
- 現(xiàn)代電力電子學(xué)
- 5G網(wǎng)絡(luò)深度覆蓋技術(shù)基礎(chǔ)解析
- 分組傳送網(wǎng)技術(shù)
- 智能手機(jī)軟硬件維修從入門到精通
- 妙用微信微博就讀它
- 4G手機(jī)維修輕松學(xué)
- 通信專業(yè)綜合能力與實(shí)務(wù):交換技術(shù)
- 5G網(wǎng)絡(luò)建設(shè)實(shí)踐與模式創(chuàng)新
- 航天測(cè)量船衛(wèi)星通信地球站技術(shù)
- 輕松玩轉(zhuǎn)DSP:基于TMS320F2833x
- 現(xiàn)代通信原理