- 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
}
推薦閱讀
- EGPRS網(wǎng)絡(luò)演進(jìn)
- 新手學(xué)修手機(jī)
- 基于集成學(xué)習(xí)的角反射體目標(biāo)雷達(dá)識(shí)別理論與方法
- 通信專業(yè)綜合能力(中級(jí))
- 射頻微波電路設(shè)計(jì)
- 通信線路工程設(shè)計(jì)、施工與維護(hù)(第2版)
- WCDMA基站系統(tǒng)原理與裝調(diào)維護(hù)
- 無線網(wǎng)絡(luò)優(yōu)化分析
- 振動(dòng)信號(hào)的盲源分離技術(shù)及應(yīng)用
- LED及其應(yīng)用技術(shù)問答
- 深入理解邊緣計(jì)算:云、邊、端工作原理與源碼分析
- 基于Multisim的電子系統(tǒng)設(shè)計(jì)、仿真與綜合應(yīng)用(第2版)
- LTE/LTE-Advanced系統(tǒng)架構(gòu)和關(guān)鍵技術(shù)
- 經(jīng)典礦石機(jī)鑒賞與現(xiàn)代礦石機(jī)制作
- 電子工程師自學(xué)速成:設(shè)計(jì)篇