人偶中“::nfs::server::export”处的语法错误
Syntax error at '::nfs::server::export' in puppet
我收到以下语法错误:
但我没有发现我的代码有任何错误。任何人都可以解释原因并帮助我解决它吗?
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at '::nfs::server::export' at /etc/puppetlabs/code/environments/production/modules/profiles/manifests/nfsserver.pp:18:21 on node puppetmaster.solartis.net
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
以下是我尝试执行的人偶代码。请完成以下内容。
class profiles::nfsserver($nfs_exports_global=hiera_hash('nfs::nfs_exports_global',
false)) inherits nfs {
class {
'::nfs': server_enabled=> true, client_enabled=> false, nfs_v4=> true, nfs_v4_idmap_domain=> $: : domain, nfs_v4_export_root=>'/opt/JbossRepo', nfs_v4_export_root_clients=>'192.168.5.0/24(rw,fsid=root,insecure,no_subtree_check,async,no_root_squash)',
}
$defaults_nfs_exports= {
ensure=>'mounted', clients=>'192.168.5.0/24(rw,insecure,no_subtree_check,async,no_root_squash)
}
if $nfs_exports_global {
create_resources('::nfs::server::export', $nfs_exports_global, $defaults_nfs_exports)
}
}
我发现了一个丢失的单曲'(执行 diff -bw 以查看它在哪里)使用 puppet parser validate
获得反馈
class profiles::nfsserver($nfs_exports_global=hiera_hash('nfs::nfs_exports_global',
false)) inherits nfs {
class {
'::nfs': server_enabled=> true, client_enabled=> false, nfs_v4=> true, nfs_v4_idmap_domain=> $::domain, nfs_v4_export_root=>'/opt/JbossRepo', nfs_v4_export_root_clients=>'192.168.5.0/24(rw,fsid=root,insecure,no_subtree_check,async,no_root_squash)',
}
$defaults_nfs_exports= {
ensure=>'mounted', clients=>'192.168.5.0/24(rw,insecure,no_subtree_check,async,no_root_squash)'
}
if $nfs_exports_global {
create_resources('::nfs::server::export', $nfs_exports_global, $defaults_nfs_exports)
}
}
我收到以下语法错误:
但我没有发现我的代码有任何错误。任何人都可以解释原因并帮助我解决它吗?
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at '::nfs::server::export' at /etc/puppetlabs/code/environments/production/modules/profiles/manifests/nfsserver.pp:18:21 on node puppetmaster.solartis.net
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
以下是我尝试执行的人偶代码。请完成以下内容。
class profiles::nfsserver($nfs_exports_global=hiera_hash('nfs::nfs_exports_global',
false)) inherits nfs {
class {
'::nfs': server_enabled=> true, client_enabled=> false, nfs_v4=> true, nfs_v4_idmap_domain=> $: : domain, nfs_v4_export_root=>'/opt/JbossRepo', nfs_v4_export_root_clients=>'192.168.5.0/24(rw,fsid=root,insecure,no_subtree_check,async,no_root_squash)',
}
$defaults_nfs_exports= {
ensure=>'mounted', clients=>'192.168.5.0/24(rw,insecure,no_subtree_check,async,no_root_squash)
}
if $nfs_exports_global {
create_resources('::nfs::server::export', $nfs_exports_global, $defaults_nfs_exports)
}
}
我发现了一个丢失的单曲'(执行 diff -bw 以查看它在哪里)使用 puppet parser validate
获得反馈
class profiles::nfsserver($nfs_exports_global=hiera_hash('nfs::nfs_exports_global',
false)) inherits nfs {
class {
'::nfs': server_enabled=> true, client_enabled=> false, nfs_v4=> true, nfs_v4_idmap_domain=> $::domain, nfs_v4_export_root=>'/opt/JbossRepo', nfs_v4_export_root_clients=>'192.168.5.0/24(rw,fsid=root,insecure,no_subtree_check,async,no_root_squash)',
}
$defaults_nfs_exports= {
ensure=>'mounted', clients=>'192.168.5.0/24(rw,insecure,no_subtree_check,async,no_root_squash)'
}
if $nfs_exports_global {
create_resources('::nfs::server::export', $nfs_exports_global, $defaults_nfs_exports)
}
}