数据中心基础设施自动化运维之puppet专项
http://forge.puppetlabs.com/treydock/yum_cron 【puppet功能扩展forge】
http://docs.puppetlabs.com/references/latest/type 【puppet 资源类型】
Every resource has a type, a title, and a set of attributes:
general form of a resource declaration is:
The resource type, in lower-case
An opening curly brace
The title, which is a string
A colon
Optionally, any number of attribute and value pairs, each of which consists of:
An attribute name, which is a bare word
A => (arrow, fat comma, or hash rocket)
A value, which can be any data type, depending on what the attribute requires
A trailing comma (note that the comma is optional after the final attribute/value pair)
Optionally, a semicolon, followed by another title, colon, and attribute block
A closing curly brace
core of the Puppet language is declaring resources;
Groups of resources can be organized into classes;
catalog will be in memory as a Ruby object, transmitted as JSON, and persisted to disk as YAML;
case $operatingsystem {
centos, redhat: { $service_name = 'ntpd' }
debian, ubuntu: { $service_name = 'ntp' }
}
package { 'ntp':
ensure => installed,
}
service { 'ntp':
name => $service_name,
ensure => running,
enable => true,
subscribe => File['ntp.conf'],
}
file { 'ntp.conf':
path => '/etc/ntp.conf',
ensure => file,
require => Package['ntp'],
source => "puppet:///modules/ntp/ntp.conf",
# This source file would be located on the puppet master at
# /etc/puppetlabs/puppet/modules/ntp/files/ntp.conf (in Puppet Enterprise)
# or
# /etc/puppet/modules/ntp/files/ntp.conf (in open source Puppet)
}
数据中心基础设施自动化运维之puppet专项的更多相关文章
- 企业级自动化运维工具---puppet详解
本文收录在Linux运维企业架构实战系列 1.认识puppet 1.1 引入 puppet是什么,咱们先不用专业的名词解释它,咱们先描述一些工作场景,看明白这些工作场景,自然会知道puppet是什么. ...
- 项目10.2-企业级自动化运维工具---puppet详解
1.认识puppet 1.1 引入 puppet是什么,咱们先不用专业的名词解释它,咱们先描述一些工作场景,看明白这些工作场景,自然会知道puppet是什么. (1)场景一: 管理员想要在100台服务 ...
- 自动化运维工具——puppet详解(一)
一.puppet 介绍 1.puppet是什么 puppet是一个IT基础设施自动化管理工具,它能够帮助系统管理员管理基础设施的整个生命周期: 供应(provisioning).配置(configur ...
- 自动化运维工具——puppet详解(二)
一.class 类 1)什么是类? 类是puppet中命名的代码模块,常用于定义一组通用目标的资源,可在puppet全局调用: 类可以被继承,也可以包含子类: 具体定义的语法如下: class NAM ...
- 自动化运维工具 ~puppet~
一.模板的应用 到目前为止,资源申报.定义类.声明类等所有功能都只能一个manifest文件中实现,但这却非有效的基于puppet管理IT资源架构的方式.实践 中,一般需要把manifest文件分解成 ...
- 自动化运维之puppet的学习(如何找到你需要的模块)
https://forge.puppetlabs.com/ puppet 模块下载 http://kisspuppet.com/2014/01/14/puppet_forge_modules/ pu ...
- centos6.5环境自动化运维之puppet实现nginx反向代理功能及puppet安装配置详解
puppet是一种Linux.Unix.windows平台的集中配置管理系统,使用自有的puppet描述语言,可管理配置文件.用户.cron任务.软件包.系统服务等.puppet把这些系统实体称之为资 ...
- 自动化运维工具之Puppet基础入门
一.简介 puppet是什么?它能做什么? puppet是一个IT基础设施自动化运维工具,它能够帮助系统管理员管理基础设施的整个生命周期:比如,安装服务,提供配置文件,启动服务等等一系列操作:基于pu ...
- 自动化运维之Saltstack
第三十八课 自动化运维之Saltstack 目录 一.自动化运维介绍 二. saltstack安装 三. 启动saltstack服务 四. saltstack配置认证 五. saltstack远程执行 ...
随机推荐
- hive与hbase的区别与联系
共同点:1.hbase与hive都是架构在hadoop之上的.都是用hadoop作为底层存储 区别:2.Hive是建立在Hadoop之上为了减少MapReduce jobs编写工作的批处理系统,HBa ...
- 深度(Depth)概念
强化对深度的理解 在老版本的NGUI中,UI的显示层次关系是依靠z轴进行的.在新版本的NGUI中,所有UI的z轴都被统一,然后用深度来决定和管理显示的层次关系.关于深度,要记住一下关键点: 1.每一个 ...
- [Jquery] Jquery获取浏览器宽高的代码
<script type="text/javascript"> $(document).ready(function() { alert($(window).heigh ...
- Dynamic Programming (DP) 问题总结
所有的 DP 问题都可以简单得用 Recursion 的方式实现.这通常是最容易想到的思路. 问题是这种实现不够 efficient,存在 subproblem 被重复计算的情况.有两种解决这个问题的 ...
- Error format not a string literal and no format arguments解决方案
原地址: http://blog.csdn.net/joeblackzqq/article/details/25985299 cData.cpp:355:30:error:format not a s ...
- maven 项目编译时候提示:Error building POM (may not be this project's POM).
编译时候提示Error building POM (may not be this project's POM)的错误,具体信息如下: [0] 'dependencies.dependency.ver ...
- nginx 域名rewrite跳转
转自:http://blog.csdn.net/xingfujie/article/details/7337832 需求:nginx规则,所有对OA.bccom.info的访问,redirect到uc ...
- Cassandra查询语言CQL的基本使用
在window环境下运行CQL语言要先安装python环境,在linux下不需要,cassandra内置了python. 1.查看python版本:python --version2.运行pythod ...
- easyui源码翻译1.32--TimeSpinner(时间微调)
前言 扩展自$.fn.spinner.defaults.使用$.fn.timespinner.defaults重写默认值对象.下载该插件翻译源码 时间微调组件的创建基于微调组件.它和数字微调类似,但是 ...
- Linux IP 路由实现
以下代码取自 kernel . [数据结构] 该结构被基于路由表的classifier使用,用于跟踪与一个标签(tag)相关联的路由流量的统计信息,该统计信息中包含字节数和报文数两类信息. 这个结构包 ...