
复制class server::test {            $extlookup_datadir = "/etc/puppet/modules/extdata/"            $extlookup_precedence = [ "%{name}", "test" ]            $A_db_host = extlookup("A_HOST")            $A_db_port = extlookup("A_PORT")            $A_db_usr = extlookup("A_USER")            $A_db_pwd = extlookup("A_PASSWD")            $A_db_name = extlookup("A_DB_NAME")            file { config_file:            path => "/tmp/server.conf,            content => template("server/server.conf.erb"),            }            }            注:上面的类会读取/etc/puppet/modules/extdata/test.csv里的内容,然后使用puppet 模板            来生成新配置文件,上面的b2b供应网类是用来测试,实际使用需要添加相应的源码库服务启动等,以及服务与配置相关关联.            3.我们来看下test.csv内的文件内容:1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.云服务器提供商