Puppet-2:Puppet 配置第一个Agent
2015-09-22 00:00
239 查看
创建必要的目录。Manifests存放模块的主要配置文件init.pp
Puppet在应用类后会首先加载init.pp读取必要的信息
如果init.pp使用templates函数,会读取templates目录下的erb模块文件
当前的变量也会传入templates函数中
Puppet在应用类后会首先加载init.pp读取必要的信息
如果init.pp使用templates函数,会读取templates目录下的erb模块文件
当前的变量也会传入templates函数中
mkdir -p /etc/puppet/modules/test/{manifests,templates,files} vi /etc/puppet/modules/test/manifests/init.pp 定义类: class test{ file{"/tmp/$hostname.txt": context => "Hello world"; } } 定义模板 vi /etc/puppet/modules/test/templates/test.esb hostname <%= fqdn %> 定义节点信息:节点目录可以任意定义,只需再site配置文件中import即可ru: vi /etc/pupprt/manifests/nodes/agent1.harry.com.pp node 'agent1.harry.com'{ include test } 在site.pp文件中import节点信息 vi /etc/puppet/manifests/site.pp import nodes/agent1.harry.com.pp
相关文章推荐
- angular之filter的几种调用方式
- Ember.js 入门指南——工具类的助手
- Ember.js 入门指南——路由简介
- Java基础之集合框架
- databinding学习(4)
- Win2003中配置FTP服务,开启防火墙导致客户端无法连接【精华详解】
- Centos解决Apache配置虚拟主机问题。Apache欢迎页可以打开,但是网站目录定位不上
- spring 的 RedisTemplate解决Serializer
- thrift
- GCD-创建queue的特殊参数DISPATCH_QUEUE_SERIAL
- 涟漪动画ripple
- Getting Started: Configuring Mac for Android
- Unit Testing RxJava Observables and Subscriptions
- 树形结构数据后台处理:一次循环生成树
- Android Activity生命周期详解
- bloom过滤器 (从网上找了几个链接 供学习)
- node.js环境搭建记录
- The remote system refused the connection 解决方法
- 使用java对文件中关键字进行统计,并作排序
- Java中Map转为List的方法