如何使用Puppet保护副本? [英] How to secure copy using Puppet?

查看:69
本文介绍了如何使用Puppet保护副本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图将目录从我的主服务器复制到其他主机.我有一个脚本,可以签出代码并将其放在特定目录中. 我的脚本如下所示.

I have been trying to copy a directory from my master to different hosts. I have a script that checks out a code and puts it in certain directory. My script looks like below.

#!/bin/bash
export CVSROOT=:pserver:anonymous@server101:2401/cvs/PXI/
cvs checkout -r 2_a Jcode
mv  Jcode /etc/example/puppettest/

现在我想将此Jcode复制到主机上.

Now I want to copy this Jcode to my hosts.

推荐答案

假设您尝试将/etc/example/puppettest复制到节点,则必须在${configdir}/fileserver.conf中创建安装点,然后可以使用recurse参数file资源.

Assuming you are trying to copy /etc/example/puppettest to your nodes you would have to create a mount point in ${configdir}/fileserver.conf then you can use the recurse parameter of the file resource.

以下未经过测试:

[jcode]
  path /etc/example/puppettest/
  allow *

文件声明

file { '/path/to/directory/on/node':
  ensure  => directory,
  recurse => true,
  source  => 'puppet:///jcode/Jcode'
}

这篇关于如何使用Puppet保护副本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆