enc*_*ush 6 puppet puppetmaster puppet-agent
我正在尝试将/vagrant/scripts
位于 puppet master 上的文件夹及其子文件夹复制到代理中。我在以下配置中使用init.pp
:
file {
'/home/vagrant/scripts':
ensure => 'file',
source => 'puppet:///modules/ycsb/scripts',
path => '/home/vagrant/YCSB/scripts',
owner => 'vagrant',
group => 'vagrant',
mode => '0744', # Use 0700 if it is sensitive
}
Run Code Online (Sandbox Code Playgroud)
当我检查代理时,我可以看到/scripts
文件夹,但没有其子文件夹。知道为什么会这样吗?
enc*_*ush 10
我刚刚发现了问题。首先,在确保参数中使用“目录”而不是“文件” 。其次,使复制过程递归以包括所有子文件夹。
file {
'/home/vagrant/scripts':
ensure => 'directory',
source => 'puppet:///modules/ycsb/scripts',
recurse => 'remote',
path => '/home/vagrant/YCSB/scripts',
owner => 'vagrant',
group => 'vagrant',
mode => '0744', # Use 0700 if it is sensitive
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
11891 次 |
最近记录: |