本文介绍了如何使用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保护副本?
发布评论