-2

このhttps://github.com/andytinycat/puppet-rhnsatelliteを実装しようとしています。ユーザー名とパスワードを設定しましたmodule/rhnsatellite/manifest/init.pp

class rhnsatellite( $server_url = "https://test.example.com/XMLRPC", $username = "testuserver", $password = "test@123" ) { file {'/etc/puppetlabs/puppet/rhn.conf': owner => root, group => root, mode => 0600, content => template('rhnsatellite/rhn.conf.erb') } }

私はパペットを初めて使用し、 site.pp でサテライトレポを呼び出す方法がわかりません。クライアント マシンで実行すると構文エラーが発生します。クライアントで node 'client' { include vmware class { rhnsatellite : satelliterepo {channel => 'base-stash-el6', } include sudo include sssd include hardening include base-httpd include hpom class { sshd: } } 実行すると次のエラーが発生します。 [root@client puppet]# puppet agent --test --noop --environment=test Info: Retrieving plugin Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/tenant.rb Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppet_vardir.rb Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/windows.rb Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/log_exists_jbossecaps.rb Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/custom_auth_conf.rb Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/concat_basedir.rb Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/cluster.rb Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/postgres_default_version.rb Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/dtap.rb Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppetdb_server_status.rb Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/ip6tables_version.rb Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/pe_version.rb Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/root_home.rb Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/log_exists_jbosshouse.rb Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptables_persistent_version.rb Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/gateway.rb Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptables_version.rb Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/facter_dot_d.rb Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment test: Syntax error at '{'; expected '}' at /etc/puppetlabs/puppet/environments/test/manifests/site.pp:1157 on node client Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run [root@client puppet]#`

4

1 に答える 1

1

module/rhnsatellite/manifest/init.pp には触れないでください。そのままにしておいてください。rhnsatellite クラスのデフォルト パラメータをオーバーライドするには、次のように site.pp に配置します。

class { "rhnsatellite":
    server_url  => "https://test.example.com/XMLRPC",
    username => "testuserver",
    password => "test@123",
}

そして、この部分を完全に削除します:

class { rhnsatellite :
    satelliterepo {channel => 'base-stash-el6',
}
于 2015-08-24T16:15:21.280 に答える