如何使用Puppet保护副本?

编程入门 行业动态 更新时间:2024-10-27 08:25:46
本文介绍了如何使用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保护副本?

本文发布于:2023-11-09 16:05:26,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1572818.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:副本   如何使用   Puppet

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!