puppet file server

Posted by Gosuke Miyashita Mon, 19 Mar 2007 10:22:17 GMT

puppet サーバ上のファイルをクライアントに配布するには、file server 機能を利用するらしい。というわけで、ドキュメント File Serving Configuration から要点を抜き出してみる。

/etc/puppet/fileserver.conf の設定

[module]
    path /path/to/files
    allow *.domain.com
    deny *.wireless.domain.com

こう設定すると、

/path/to/files/sudoers

というファイルを

puppet://server/module/sudoers

で取得できるようになる。

manifest の設定

"the Puppet language" が記述される設定ファイルを manifest と呼ぶらしい。要は puppet クライアントをどう管理するか、が記述された設定ファイルですね。(上の /etc/puppet/fileserver.conf は manifest ではない。)

puppet file server 上のファイルを配布するには、以下の様な設定を manifest に記述。

# copy a remote file to /etc/sudoers
file { "/etc/sudoers":
    mode   => 440,
    owner  => root,
    group  => root,
    source => "puppet://server/module/sudoers"
}

source がポイント。

詳細は File Serving Configuration を参照。

Trackbacks

Use the following link to trackback from your own site:
http://blog.mizzy.org/articles/trackback/319

Comments

Leave a response

Comments