このページは[TypeReference]を翻訳しているものです。 翻訳に拙いところはあると思いますし、元ページも自動生成されているドキュメントということで、重複や矛盾(古いバージョン向けの記述が生き残っていると思われるもの)も一部にあります。 全く使ったことがない機能など翻訳していない部分もあります。 翻訳の間違いや誤字、元ページの更新などに気づいた方もぜひ修正お願いします。
以前にこのページに含まれていたメタパラメータに関する記述は本家に準じて分離しました。
- リソースタイプ
- augeas
- computer
- cron
- exec
- file
- filebucket
- group
- host
- k5login
- macauthorization
- mailalias
- maillist
- mcx
- mount
- nagios_command
- nagios_contact
- Parameters
- address1
- address2
- address3
- address4
- address5
- address6
- alias
- can_submit_commands
- contact_name
- contactgroups
- ensure
- host_notification_commands
- host_notification_options
- host_notification_period
- host_notifications_enabled
- pager
- provider
- register
- retain_nonstatus_information
- retain_status_information
- service_notification_commands
- service_notification_options
- service_notification_period
- service_notifications_enabled
- target
- use
- Parameters
- nagios_contactgroup
- nagios_host
- Parameters
- action_url
- active_checks_enabled
- address
- alias
- check_command
- check_freshness
- check_interval
- check_period
- contact_groups
- contacts
- display_name
- ensure
- event_handler
- event_handler_enabled
- failure_prediction_enabled
- first_notification_delay
- flap_detection_enabled
- flap_detection_options
- freshness_threshold
- high_flap_threshold
- host_name
- hostgroups
- icon_image
- icon_image_alt
- initial_state
- low_flap_threshold
- max_check_attempts
- notes
- notes_url
- notification_interval
- notification_options
- notification_period
- notifications_enabled
- obsess_over_host
- parents
- passive_checks_enabled
- process_perf_data
- provider
- register
- retain_nonstatus_information
- retain_status_information
- retry_interval
- stalking_options
- statusmap_image
- target
- use
- vrml_image
- Parameters
- nagios_hostdependency
- nagios_hostescalation
- nagios_hostextinfo
- nagios_hostgroup
- nagios_service
- Parameters
- _naginator_name
- action_url
- active_checks_enabled
- check_command
- check_freshness
- check_interval
- check_period
- contact_groups
- contacts
- display_name
- ensure
- event_handler
- event_handler_enabled
- failure_prediction_enabled
- first_notification_delay
- flap_detection_enabled
- flap_detection_options
- freshness_threshold
- high_flap_threshold
- host_name
- hostgroup_name
- icon_image
- icon_image_alt
- initial_state
- is_volatile
- low_flap_threshold
- max_check_attempts
- normal_check_interval
- notes
- notes_url
- notification_interval
- notification_options
- notification_period
- notifications_enabled
- obsess_over_service
- parallelize_check
- passive_checks_enabled
- process_perf_data
- provider
- register
- retain_nonstatus_information
- retain_status_information
- retry_check_interval
- retry_interval
- service_description
- servicegroups
- stalking_options
- target
- use
- Parameters
- nagios_servicedependency
- nagios_serviceescalation
- nagios_serviceextinfo
- nagios_servicegroup
- nagios_timeperiod
- notify
- package
- resources
- schedule
- selboolean
- selmodule
- service
- ssh_authorized_key
- sshkey
- tidy
- user
- yumrepo
- zfs
- zone
- zpool
リソースタイプ
namevarはリソースを一意に識別するパラメータです。タイプ宣言の先頭部に文字列とそれに続くコロンが与えられた時にnamevarとして処理されます。
file { "/etc/passwd":
owner => root,
group => root,
mode => 644
}
上記のコードにおいては /etc/passwd がnamevarにあたります。これはfileリソースタイプの管理対象となるファイルのパスであり、他のリソースタイプとの依存解決の際の識別子としても働きます。
- Parametersは、システムを直接更新したり、puppetdの振る舞いを変更したり(例: execリソースで検索パスを定義する、またはfileインスタンスにおいて再帰的解決の有無を設定する)といった操作内容を記述します。
- Providerは抽象化レイヤのような概念であり、リソースを操作するための低レベルな機能を提供します。これは通常、外部コマンドの呼び出し形式(adduserやuseradd)を意味します。Providerが特定のライブラリを必要とする場合は、完全修飾パス名および相対パス名で指定します。完全修飾パス名ならば、指定したパスにバイナリが存在しなければなりません。相対パス名で指定する場合は、puppetはシェルのパスが通っているディレクトリから探します。
- FeaturesにはProviderごとに差異がある機能を記述します。Providerを選択する際にご確認ください。
augeas
ファイルシステムに対する一つまたは複数の変更を augeas を通じて適用します。
- augeas (http://www.augeas.net) が必要です。
- ruby-augeasが必要です。
文字列を使うサンプル
augeas{"test1" :
context => "/files/etc/sysconfig/firstboot",
changes => "set RUN_FIRSTBOOT YES",
onlyif => "match other_value size > 0",
}
カスタムレンズを使うサンプル
augeas{"jboss_conf":
context => "/files",
changes => [
"set /etc/jbossas/jbossas.conf/JBOSS_IP $ipaddress",
"set /etc/jbossas/jbossas.conf/JAVA_HOME /usr"
],
load_path => "$/usr/share/jbossas/lenses",
}
Features
- execute_chanfes : Actually make the changes
- need_to_run? : If the command should run
- parse_commands : Parse the command string
| Provider | execute_changes | need_to_run? | parse_commands |
| augeas | x | x | x |
Parameters
changes
changesパラメータはファイルシステムに対する変更を表します。一個のコマンド文字列か複数個のコマンドの配列を渡すことができます。
set [PATH] [VALUE] Sets the value VALUE at loction PATH
rm [PATH] Removes the node at location PATH
remove [PATH] Synonym for rm
clear [PATH] Keeps the node at PATH, but removes the value.
ins [LABEL] [WHERE] [PATH]
Inserts an empty node LABEL either [WHERE={before|after}] PATH.
insert [LABEL] [WHERE] [PATH]
Synonym for ins
contextパラメータが宣言されている場合は、相対パスの親パスとして解釈されます。
context
コンテキストパスです。指定は必須ではありません。相対パスを指定する際の親ディレクトリとして解釈されます。絶対パス指定には影響しません。
force
Optional command to force the augeas type to execute even if it thinks changes will not be made. This does not overide the only setting. If onlyif is set, then the foce setting will not override that result
load_path
Optional colon separated list of directories; these directories are searched for schema definitions
name
- namevar
このタスクの名前です。一意に識別可能である必要があります。
onlyif
Optional augeas command and comparisons to control the execution of this type. Supported onlyif syntax:
get [AUGEAS_PATH] [COMPARATOR] [STRING] match [MATCH_PATH] size [COMPARATOR] [INT] match [MATCH_PATH] include [STRING] match [MATCH_PATH] == [AN_ARRAY] match [MATCH_PATH] != [AN_ARRAY]
where:
AUGEAS_PATH is a valid path scoped by the context MATCH_PATH is a valid match synatx scoped by the context COMPARATOR is in the set [> >= != == <= <] STRING is a string INT is a number AN_ARRAY is in the form ['a string', 'another']
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- augeas: Supported features: execute_changes, need_to_run?, parse_commands.
returns
The expected return code from the augeas command. Should not be set
root
A file system path; all files loaded by Augeas are loaded underneath ROOT
type_check
Set to true if augeas should perform typechecking. Optional, defaults to false Valid values are true, false.
computer
Computer object management using DirectoryService? on OS X. Note that these are distinctly different kinds of objects to 'hosts', as they require a MAC address and can have all sorts of policy attached to them. This provider only manages Computer objects in the local directory service domain, not in remote directories. If you wish to manage /etc/hosts on Mac OS X, then simply use the host type as per other platforms. This type primarily exists to create localhost Computer objects that MCX policy can then be attached to.
Parameters
en_address
The MAC address of the primary network interface. Must match en0.
ensure
Control the existences of this computer record. Set this attribute to present to ensure the computer record exists. Set it to absent to delete any computer records with this name Valid values are present, absent.
ip_address
The IP Address of the Computer object.
name
- namevar
The authoritative 'short' name of the computer record.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- directoryservice: Computer object management using DirectoryService? on OS X.
Note that these are distinctly different kinds of objects to 'hosts', as they require a MAC address and can have all sorts of policy attached to them. This provider only manages Computer objects in the local directory service domain, not in remote directories. If you wish to manage /etc/hosts on Mac OS X, then simply use the host type as per other platforms. Default for operatingsystem == darwin.
realname
The 'long' name of the computer record.
cron
cronジョブを管理します。必須パラメータはcommandとuserのみで、その他は省略できます。実行間隔についての指定がない場合は毎分に設定されます。While the name of the cron job is not part of the actual job, it is used by Puppet to store and retrieve it.
既に登録されているジョブと名前以外が全て一致するジョブを指定した場合、そのジョブは等価であるとみなされ、新しい名前は永続的に関連付けられます。 このように関連付けが済むと以後はその名前で管理を行うことができます。
例
cron { logrotate:
command => "/usr/sbin/logrotate",
user => root,
hour => 2,
minute => 0
}
どのパラメータも配列で指定することができます。
cron { logrotate:
command => "/usr/sbin/logrotate",
user => root,
hour => [2, 4]
}
範囲で指定したり、*/2のような記法で間隔を指定することもできます。(該当ホストのcronデーモンがそれをサポートしている限りにおいて有効です。)
cron { logrotate:
command => "/usr/sbin/logrotate",
user => root,
hour => ['2-4'],
minute => '*/10'
}
全てのcronパラメータはabsentをサポートしています。これは既存の値を打ち消します。
Parameters
command
実行するコマンドです。常に絶対パスで指定するべきです。実行時にユーザーのプロファイルは参照されないので、環境変数もenvironmentパラメータで手動で指定するなどして読み込む必要があります。
ensure
登録か削除かです。有効な値はpresent, absentです。
environment
cronジョブに関連付けられる環境変数です。crontabにおいてヘッダ部とジョブが記述される部分の間に記述されます。他のものに対する影響については保証はありません。重複した場合は先に記述されたほうが打ち消されることになります。 puppetは自動的に環境変数とcronジョブを関連付けることができません。もし既に環境変数を設定したcronジョブを走らせている場合、puppetはそれらをそのまま残しますが、特定のジョブ専用に関連付けません。 設定はcrontabに記述されるのと同じように指定する必要があります。例: PATH=/bin:/usr/bin:/usr/sbin.
hour
cronジョブが実行される時間です。有効な値は0から23のいずれかです。
minute
cronジョブが実行される分です。有効な値は0から59のいずれかです。
month
cronジョブが実行される月です。有効な値は1から12のいずれかの数値、または月の名前(e.g., December)です。
monthday
cronジョブが実行される月の中の日です。有効な値は1から31のいずれかです。
name
- namevar
cronジョブのシンボリックな名前です。This name is used for human reference only and is generated automatically for cron jobs found on the system. This generally won't matter, as Puppet will do its best to match existing cron jobs against specified jobs (and Puppet adds a comment to cron jobs it adds), but it is at least possible that converting from unmanaged jobs to managed jobs might require manual intervention.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- crontab: Required binaries: crontab.
special
Special schedules only supported on FreeBSD.
target
cronジョブの置き場所です。crontabスタイルのファイルを任意の場所で管理することができます。
user
cronジョブを実行するユーザーです。指定するユーザーはcronジョブを実行する権限を持つ必要があります。puppetはそれをチェックできません。 デフォルトはpuppetを実行しているユーザーです。
weekday
cronジョブが実行される週の中の日です。有効な値は0から7のいずれかの数値(0と7は日曜日)か、曜日の名前(e.g., Tuesday)です。
exec
execリソースは外部コマンドを実行します。このメカニズムによって実行されるコマンドは、何度実行しても問題が起こらない、つまり冪等であることが非常に重要です。コマンドを冪等にする簡単な方法は、createsパラメータなどを使って、ある条件を満たす場合にしか実行しないようにすることです。
また refreshonly パラメータを使用することで、イベント発生時にしかコマンドを実行しないように制御することもできます。イベント発生時に任意のコマンドを実行するよう設定するときに便利です。
特筆すべき点として、execは同じ名前を持つインスタンスが複数存在してもエラーと見なされません。ある種の機能を実現するためにはこのような仕様にするしかなかったのですが、事を複雑にしているのも確かです。特に、他のリソースの依存リソースとして重複する名前を持つexecインスタンスを使用することはできません。どちらのインスタンスを指定しているのか、Puppetには区別がつかないからです。
For example:
# defined in the production class
exec { "make":
cwd => "/prod/build/dir",
path => "/usr/bin:/usr/sbin:/bin"
}
. etc. .
# defined in the test class
exec { "make":
cwd => "/test/build/dir",
path => "/usr/bin:/usr/sbin:/bin"
}
これがexec以外のタイプであったなら、同じ名前を持つインスタンスが複数の場所に存在するというエラーになるでしょう。しかし上の例が異なる意図を持つことは明らかですから、execは特別扱いする必要があります。
できる限り、名前の重複は避けることをお奨めします。
execが他のリソースからイベントを受け取ると、コマンドを再実行します(または、refreshパラメータで指定されたコマンドを実行します)。
execは、標準ではPuppetに備わっていない機能を実現するために使われます。それは短期的に見れば適切な(そして避けられない)使い方と言えますが、できるだけ早くPuppetのネイティブなリソースタイプに移し替えることを推奨します。もしあなたがexecを使って多くの作業をこなしているのなら、少なくともどんなことをしているのか、Reductive Labsに知らせてください。そうすれば、あなたがexecを使って行っている作業のための、ネイティブなリソースタイプを作ることができるでしょう。
Parameters
command
- namevar
実際に実行するコマンドです。絶対パスで指定するか、コマンド名のみで指定して別途pathパラメータで検索パスを指定する必要があります。コマンドの実行に成功した場合、コマンドの全ての出力がインスタンスの標準ログレベル(通常はnotice)で記録されます。コマンドの実行に失敗した場合(コマンドの返り値がreturnsパラメータで指定された値と異なる場合)、errログレベルで記録されます。
creates
コマンドが作成するファイルです。このパラメータが指定されたなら、指定されたファイルが存在しない場合のみコマンドを実行します。
exec { "tar xf /my/tar/file.tar":
cwd => "/var/tmp",
creates => "/var/tmp/myfile",
path => ["/usr/bin", "/usr/sbin"]
}
cwd
コマンドを実行するディレクトリです。指定したディレクトリが存在しないなら、コマンドは失敗します。
env
このパラメータは非推奨です。代わりにenvironmentパラメータを使用してください。
environment
該当コマンド実行時に追加される環境変数です。もし、これを使ってPATHを設定するなら、pathの属性を上書きするのに注意してください。複数の環境変数を追加する場合は配列を使ってください。
group
コマンドを実行するグループです。これはプラットホームによっては意図したように動かないようです。それはRubyのせいでもPuppetのせいでもなく、別のユーザーとしてコマンドを実行する際に発生する問題です。
logoutput
コマンドの出力をログに記録するかどうかを指定します。デフォルトではexecリソースタイプのloglevelで記録します。コマンドの実行がエラーとなった場合にだけ出力を記録したい場合は on_failure を指定してください。使用できる値は true, false, on_failure それから任意のログレベルです。つまり true, false, on_failure, debug, info, notice, warning, err, alert, emerge, crit となります。
onlyif
このパラメータが設定されたなら、コマンドが0を返したときだけ実行します。例えば
exec { "logrotate":
path => "/usr/bin:/usr/sbin:/bin",
onlyif => "test `du /var/log/messages | cut -f1` -gt 100000"
}
上記の場合、testがtrueを返したときだけlogrotateを実行します。
このコマンドは、commandパラメータで指定するコマンドと同じルールに従うのに注意してください。pathパラメータが設定されていないならば、絶対パスで指定する必要があります。
onlyifパラメータは配列を受け取ることもできます。
onlyif => ["test -f /tmp/file1", "test -f /tmp/file2"]
上記の場合、全ての条件がtrueを返した場合だけcommandパラメータで指定したコマンドが実行されます。
path
実行コマンドを探す検索パスです。pathパラメータを指定しない場合、実行するコマンドは絶対パスで指定しなければいけません。複数のパスは配列として指定するか、コロンで区切った文字列として指定します。
refresh
refresh時に実行されるコマンドを指定します。デフォルトではcommandパラメータで指定したコマンドが再実行されますが、別のコマンドを指定することができます。
refreshonly
refresh以外ではコマンドを実行しないかどうかを指定します。 このパラメータは、他のリソースタイプが更新された場合のみにコマンドを実行したい場合に有用です。
# Pull down the main aliases file
file { "/etc/aliases":
source => "puppet://server/module/aliases"
}
# Rebuild the database, but only when the file changes
exec { newaliases:
path => ["/usr/bin", "/usr/sbin"],
subscribe => File["/etc/aliases"],
refreshonly => true
}
subscribeパラメータおよび他のリソースタイプで指定されたnotifyパラメータだけがrefreshを呼び出すことができます。requireは含まれません。refreshonlyパラメータは常にsubscribeパラメータかnotifyパラメータと組み合わせて使用する必要があります。有効な値はtrueおよびfalseです。
returns
コマンドの実行結果として予期する戻り値です。実行されたコマンドが他の値を返したら、エラーと判断します。デフォルトは0です。配列を使用して複数の値を指定することもできます。
timeout
コマンドの最長実行時間です。単位は秒です。このパラメータで指定した秒数が経過してもコマンドが終了しなかった場合は、失敗した判断して実行を中止します。0以下の値を使用すると、timeoutは無効になります。
unless
このパラメータを指定すると、先にunlessパラメータで指定したコマンドを実行して戻り値が0以外を返した時のみ、commandパラメータで指定したコマンドを実行します。例えば
exec { "/bin/echo root >> /usr/lib/cron/cron.allow":
path => "/usr/bin:/usr/sbin:/bin",
unless => "grep root /usr/lib/cron/cron.allow 2>/dev/null"
}
この例は、Solarisにおいてcron.allowファイルにrootがまだ存在しない場合のみ追加します。
このコマンドは、commandパラメータで指定するコマンドと同じルールに従うのに注意してください。pathパラメータが設定されていないならば、絶対パスで指定する必要があります。
user
userはコマンドを実行するユーザです。これを使用した場合、現在どんなエラーも得られないことに注意してください。Rubyのバグの為です。このパラメータで指定するユーザーをpuppetで作成する場合、該当するuserリソースタイプをrequireで指定したものとみなされます。
file
ファイルシステム内のファイルおよびディレクトリを操作します。所有権やアクセス権の設定を行ったり、ファイルをリモートサーバから取得して配置することができます。Puppet熟練者は、fileリソースタイプを使用を避けてなるべく専用のリソースタイプを使用することになるでしょう。
他のリソースタイプでは間に合わず、fileリソースタイプを頻繁に使用しているようでしたら、Reductive Labsに連絡してください。あなたのニーズに合ったリソースタイプを協力して開発することができることを望んでいます。
Parameters
backup
ファイルを置き換える前にバックアップをすべきでしょうか。filebucketを通してファイルをバックアップするという手があります。filebucketはファイルとMD5チェックサムの対を保存し、また用意に取り出すことができます。filebucketはローカルまたはリモートに存在するものを指定できます。その際には backup => (filebucket名) という形式で指定します。ピリオドで始まる文字列を与えた場合は、あなたが与えた文字列はファイル名として解釈され、Puppetはfilebucket名をその外部ファイルから読み取ります。falseを与えた場合には、バックアップは無効になります。
デフォルトでpuppetは自動的にローカルにpuppetという名のfilebucketを作成します。サーバ上のfilebucketを使用する場合は下記のように設定する必要があります。
filebucket { main:
server => puppet
}
デフォルトでpuppetmasterdデーモンは一つのfilebucketを作成します。そのためpuppetサーバが存在するホストをバックアップとして使用することが通常は可能です。一箇所で下記のように宣言すれば、マニフェストの全ての箇所で使用できます。
file { "/my/file":
source => "/path/in/nfs/or/something",
backup => main
}
これでファイルはpuppetサーバにバックアップされるようになります。
単一のfilebucketを使用する利点は、ファイルを集中管理できることと、自動的にバージョン管理ができることです。ファイルの復旧は現在は手動で行うしかありませんが、最終的にはトランザクションを考慮して自動的に実行できるようになるでしょう。
checksum
チェックサムを用いてファイルの変更を検知することができます。チェックサムは、ファイルコピーの際に内部的にも使用されていますし、またTripwireのようなファイル変更モニター等でも使用されているものです。チェックサムを指定することで、ファイルの変更を検知し変更された際に他のオブジェクトにsubscribeイベントを送ったりできます。
チェックサムの種類は多数あります。デフォルトではmd5が使用されます。有効な値はmd5, md5lite, timestamp, mtime, timeのいずれかです。
content
ファイルの内容を文字列で指定することができます。改行、タブ、空白はエスケープ文字で記述可能です。このパラメータの目的はある種の限定的なテンプレート機能を提供することです。
define resolve(nameserver1, nameserver2, domain, search) {
$str = "search $search
domain $domain
nameserver $nameserver1
nameserver $nameserver2
"
file { "/etc/resolv.conf":
content => $str
}
}
この属性は特にテンプレートを使用する際に有用です。
ensure
ファイルが存在しない時に作成するか否かです。有効な値はabsent(またはfalse), present, file, directoryです。presentはどんな形式であれファイルが存在することを担保し、もしファイルが存在しなければ空のファイルを作成します。absentはファイルが存在しないことを担保し、もしファイルがあれば削除しますし、ディレクトリが存在しなおかつ別途recurseパラメータがtrueであれば削除します。 それ以外の値はシンボリックリンクとして解釈されます。以下の例はリンクを作成します。
# Useful on solaris
file { "/etc/inetd.conf":
ensure => "/etc/inet/inetd.conf"
}
相対パス指定のリンクを作成することもできます。
# Useful on solaris
file { "/etc/inetd.conf":
ensure => "inet/inetd.conf"
}
もし有効な値(absentやpresent等)と同じ名前の相対パス指定のリンクを作成する必要がある場合は ./ などを先頭につけて明示的に指定してください。 ディレクトリを対象にした再帰的なシンボリックリンクを作成することもできます。
force
強制的に実行します。現在のところディレクトリをシンボリックリンクに置き換える場合にのみ使用可能です。有効な値はtrue, falseです。
group
所有するグループです。グループの名前または数値のIDで指定できます。
ignore
指定したパターンにマッチするファイルに対して操作を行わないためのパラメータです。再帰的な処理で多数のファイルが対象になる際に一部だけ除外する際に有用です。Rubyに内蔵されたグロビングエンジンを使用しているので、シェルのメタ文字等は完全にサポートされます。例えば [a-z]*. はそのディレクトリ内で */*. を除外します。
links
ファイル操作中のリンクの扱い方を指定します。ファイルのコピー操作において、followはリンク対象ファイルをリンクの代わりにコピーします。manageはリンク自体をコピーします。ignoreはリンクを除外します。コピーを行わない時、manageとignoreは等価です(なぜならローカルファイルシステムのリンクを完全に無視することは不可能だからです)。followはリンクを追跡します。有効な値はfollow, manage, ignoreです。
mode
アクセス権です。現在のところ比較的記法が限定されています。0664のように厳密に記述してください。
owner
所有者です。ユーザーの名前か数値のIDで指定できます。
path
- namevar
操作対象のファイルパスです。完全修飾パスである必要があります。
purge
管理されていないファイルをパージするかどうかです。パージされたファイル用のfilebucketを設定している場合はそこにアップロードされますが、そうでなければ削除されます。このパラメータはごく限られた機会でしか必要のないものですので、よく理解して使用してください。ディレクトリを再帰的に操作する場合のみ、時に有用です。
purgeパラメータとsourceパラメータを同時に使用した場合、puppetはリモートシステムに存在しないファイルをpurgeします。有効な値はtrue, falseです。
recurse
再帰処理の際の深さ、動作を指定します。有効な値はtrue, false, inf, remote, または数値で表した深度です。
recurselimit
再帰処理の際の深さ、動作を指定します。有効な値は数値で表した深度のみです。
replace
内容が同じファイルが既に存在している場合でもそれを置き換えるかどうかです。このパラメータは初期化時に有用です。有効な値はtrue(yes), false(no)です。
selrange
What the SELinux range component of the context of the file should be. Any valid SELinux range component is accepted. For example s0 or SystemHigh?. If not specified it defaults to the value returned by matchpathcon for the file, if any exists. Only valid on systems with SELinux support enabled and that have support for MCS (Multi-Category Security).
selrole
What the SELinux role component of the context of the file should be. Any valid SELinux role component is accepted. For example role_r. If not specified it defaults to the value returned by matchpathcon for the file, if any exists. Only valid on systems with SELinux support enabled.
seltype
What the SELinux type component of the context of the file should be. Any valid SELinux type component is accepted. For example tmp_t. If not specified it defaults to the value returned by matchpathcon for the file, if any exists. Only valid on systems with SELinux support enabled.
seluser
What the SELinux user component of the context of the file should be. Any valid SELinux user component is accepted. For example user_u. If not specified it defaults to the value returned by matchpathcon for the file, if any exists. Only valid on systems with SELinux support enabled.
source
コピー元のファイルの所在です。コピー時にはチェックサムで正常性を確認します。有効な値は完全修飾パスかURIです。現在サポートされているURIタイプはpuppetとfileのみです。
これは、puppetが専用のリソースタイプでサポートしていない各種のファイル、システム間で共通でないファイル等を操作する主な仕組みです。例えば
class sendmail {
file { "/etc/mail/sendmail.cf":
source => "puppet://server/module/sendmail.cf"
}
}
サーバ名を省略することもできます。その場合、マニフェストを配信しているpuppetサーバが指定され、またローカルファイルシステムを使用するものと解釈されます。
ファイルサーバの設定についてはそちらのドキュメントを参照してください。
複数のファイルソースを指定した場合、候補のうち最初に存在していたものが使用されます。これによりいくつかのパスからファイルを探すことができます。
file { "/path/to/my/file":
source => [
"/nfs/files/file.$host",
"/nfs/files/file.$operatingsystem",
"/nfs/files/file"
]
}
この仕組みを使ってリンクをコピーすることはできません。リンクについてはlinksパラメータを参照してください。
sourceselect
全ての有効なソースを使用するか、それとも最初の一つだけを使用するか、です。このパラメータは再帰的なコピーにおいてのみ有効です。デフォルトでは、見つかった最初の一つのソースだけを使用します。しかしこのパラメータにallを設定すると、複数のディレクトリをマージして存在するファイルをかき集めるようなことができます。有効な値はfirst, allです。
target
リンクを作成する際のリンクターゲットです。現在はシンボリックリンクのみをサポートしています。有効な値はnotlinkおよびパス文字列です。
type
A read-only state to check the file type.
filebucket
バックアップファイルを保管する場所です。filebucketが定義されない場合、ファイルはそれぞれカレントディレクトリにバックアップされます。filebucketはそのホスト全体もしくはサイト全体で共有します。ファイルおよびチェックサムを保管して、後で必要があれば復旧することができます。filebucketは単体では動作せず、fileリソースタイプでbackupパラメータを指定することで機能します。
現在、filebucketは意図せず削除されてしまったファイルを手動で復旧する場合にのみ有用です。いずれトランザクションが完全にサポートされた時には、filebucketがアンドゥ操作のために使われる予定です。
通常、ネットワーク全体に一つのバックアップする場所をデフォルトとして指定するとよいでしょう。
# Define the bucket
filebucket { main: server => puppet }
# Specify it as the default target
File { backup => main }
puppetサーバはデフォルトで一つのfilebucketを作成します。それがデフォルトの設定として機能します。
Parameters
name
- namevar
filebucketの名前。
path
ローカルにfilebucketを置く場合のパス。このパラメータが未設定の場合はfilebucketはリモートであるとみなされ、remoteパラメータを設定する必要があります。
port
リモートサーバが接続を受け付けるポート。デフォルトは8140。
server
filebucketを提供するリモートサーバです。このパラメータが指定された場合はpathパラメータは無視されます。ローカルにfilebucketを持つ場合はpathパラメータを指定してください。あるいは設定ファイルや起動時のコマンドラインオプションで指定することもできます。
group
グループを管理します。ほとんどのプラットホームではグループの作成のみ可能で、ユーザーをグループに所属させるにはuserリソースタイプを使用する必要があります。
OS Xなどのいくつかのプラットホームでは、ユーザーの所属情報はユーザー側ではなくグループ側の属性として扱われます。そういったプラットホームではmanages_membersおよびmembersをサポートしたProviderを使用する必要があります。
Features
- manages_members: ユーザーとグループの所属関係をグループ側の属性として管理する
| Provider | manages_members |
| directoryservice | X |
| groupadd | |
| ldap | |
| pw |
Parameters
allowdupe
重複するGIDを許容するか否かです。このパラメータはFreeBSDでは無視されます(pwのmanページを参照してください)。有効な値はtrue, falseです。
auth_membership
whether the provider is authoritative for group membership.
ensure
グループを作成するか削除するかです。有効な値はpresent, absentです。
gid
数値で表現されるグループのIDです。指定しない場合はプラットホームに依存した方法で適当な値が割り振られますが、極力指定すべきでしょう。
members
グループに所属するユーザーです。所属情報がユーザー側ではなくグループ側の属性として扱われるプラットホームで使用します。別途manages_membersパラメータも指定する必要があります。
name
- namevar
グループの名前です。プラットホームごとに異なる制約があります。最大8文字まで、1文字目は英字、というようななるべく厳しい制約を持つプラットホームに合わせて命名したほうが良いでしょう。
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- directoryservice: OS Xのグループ管理機能。
Required binaries: /usr/bin/dscl. Default for operatingsystem == darwin. Supported features: manages_members.
- groupadd: groupaddとそのilkを使うグループ管理。ほとんどのプラットホームにおけるデフォルト。
Required binaries: groupdel, groupadd, groupmod.
- ldap: LDAPを介したグループ管理。このProviderを使用するにはldapbaseを含めてLDAP関連の設定が正しく行われている必要があります。またクライアントからLDAPに書き込むためにldapuserおよびldappasswordを明示的に指定する必要があります。
注意:GIDを手動で指定しない場合にこのProviderはそれを自動作成しますが、既存のグループを全て確認して番号を振るので潜在的に高くつく処理になります。
- pw: pwを介したグループ管理。FreeBSDでのみ有効です。
Required binaries: /usr/sbin/pw. Default for operatingsystem == freebsd.
host
host登録を管理します。多くのプラットホームでは/etc/hostsが相当しますが、OS Xなどいくつかのプラットホームでは別の仕組みが使われています。
Parameters
alias
ホストの別名です。複数の値を指定する場合は配列を使用してください。 注意:このパラメータと同名のメタパラメータが存在しており、メタパラメータのaliasとしても同時に指定されているものとしてpuppetは解釈するので、悪影響が及ばないように注意を払わなくてはなりません。
ensure
そのエントリが登録されているべきかどうかです。有効な値はpresent, absentです。
ip
ホストのIPアドレスです。IPv4またはIPv6で指定できます。
name
- namevar
ホスト名です。
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- parsed:
target
対象ファイルが書き込まれる先です。Providerがディスクに書き込む際に使用されます。
k5login
Manage the .k5login file for a user. Specify the full path to the .k5login file as the name and an array of principals as the property principals.
Parameters
ensure
リソースが存在すべきか否かです。有効な値はpresent, absentです。
mode
Manage the k5login file's mode
path
- namevar
管理対象のファイルのパスです。完全修飾パスである必要があります。
principals
The principals present in the .k5login file.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- k5login: The k5login provider is the only provider for the k5login
macauthorization
Manage the Mac OS X authorization database. See: http://developer.apple.com/documentation/Security/Conceptual/Security_Overview/Security_Services/chapter_4_section_5.html for more information.
Parameters
allow_root
Corresponds to 'allow-root' in the authorization store, renamed due to hyphens being problematic. Specifies whether a right should be allowed automatically if the requesting process is running with uid == 0. AuthorizationServices? defaults this attribute to false if not specified Valid values are true, false.
auth_class
Corresponds to 'class' in the authorization store, renamed due to 'class' being a reserved word. Valid values are user, evaluate-mechanisms, allow, deny, rule.
auth_type
type - can be a 'right' or a 'rule'. 'comment' has not yet been implemented. Valid values are right, rule.
authenticate_user
Corresponds to 'authenticate-user' in the authorization store, renamed due to hyphens being problematic. Valid values are true, false.
comment
The 'comment' attribute for authorization resources.
ensure
The basic property that the resource should be in. Valid values are present, absent.
group
The user must authenticate as a member of this group. This attribute can be set to any one group.
k_of_n
k-of-n describes how large a subset of rule mechanisms must succeed for successful authentication. If there are 'n' mechanisms, then 'k' (the integer value of this parameter) mechanisms must succeed. The most common setting for this parameter is '1'. If k-of-n is not set, then 'n-of-n' mechanisms must succeed.
mechanisms
an array of suitable mechanisms.
name
- namevar
The name of the right or rule to be managed. Corresponds to 'key' in Authorization Services. The key is the name of a rule. A key uses the same naming conventions as a right. The Security Server uses a rule’s key to match the rule with a right. Wildcard keys end with a ‘.’. The generic rule has an empty key value. Any rights that do not match a specific rule use the generic rule.
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は
- macauthorization: Manage Mac OS X authorization database rules and rights.
Required binaries: /usr/bin/security, /usr/bin/sw_vers. Default for operatingsystem == darwin.
rule
The rule(s) that this right refers to.
session_owner
Corresponds to 'session-owner' in the authorization store, renamed due to hyphens being problematic. Whether the session owner automatically matches this rule or right. Valid values are true, false.
shared
If this is set to true, then the Security Server marks the credentials used to gain this right as shared. The Security Server may use any shared credentials to authorize this right. For maximum security, set sharing to false so credentials stored by the Security Server for one application may not be used by another application. Valid values are true, false.
timeout
The credential used by this rule expires in the specified number of seconds. For maximum security where the user must authenticate every time, set the timeout to 0. For minimum security, remove the timeout attribute so the user authenticates only once per session.
tries
The number of tries allowed.
mailalias
Eメールのエイリアスをローカルデータベースに作成します。
Parameters
ensure
このリソースが存在すべきか否かです。有効な値はpresent, absentです。
name
- namevar
エイリアス名です。
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- aliases:
recipient
Eメールの転送先(受取人)です。複数の値を指定する場合は配列を使用してください。
target
aliasesファイルが書き込まれるパスです。Providerによって使用されます。
maillist
メーリングリストを管理します。このリソースタイプは現在、メーリングリストの作成と削除のみに対応しており、既にあるものを設定し直すことはできません。
Parameters
admin
メーリングリストの管理人のメールアドレスです。
description
メーリングリストの説明です。
ensure
リソースが存在すべきかどうかです。有効な値はpresent, absentです。
mailserver
メールサーバのホスト名です。
name
- namevar
メーリングリストの名前です。
password
管理人のパスワードです。
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- mailman: Required binaries: /usr/lib/mailman/mail/mailman, /usr/lib/mailman/bin/list_lists, /usr/lib/mailman/bin/rmlist, /usr/lib/mailman/bin/newlist.
webserver
The name of the host providing web archives and the administrative interface.
mcx
MCX object management using DirectoryService? on OS X.
Original Author: Jeff McCune? <mccune.jeff@gmail.com>
The default provider of this type merely manages the XML plist as reported by the dscl -mcxexport command. This is similar to the content property of the file type in Puppet.
The recommended method of using this type is to use Work Group Manager to manage users and groups on the local computer, record the resulting puppet manifest using the command 'ralsh mcx' then deploying this to other machines.
Features
- manages_content: The provider can manage MCXSettings as a string.
| Provider | manages_content |
| mcxcontent | X |
Parameters
content
The XML Plist. The value of MCXSettings in DirectoryService?. This is the standard output from the system command: dscl localhost -mcxexport /Local/Default/<ds_type>/<ds_name> Note that ds_type is capitalized and plural in the dscl command. Requires features manages_content.
ds_name
The name to attach the MCX Setting to. e.g. 'localhost' when ds_type => computer. This setting is not required, as it may be parsed so long as the resource name is parseable. e.g. /Groups/admin where 'group' is the dstype.
ds_type
The DirectoryService? type this MCX setting attaches to. Valid values are user, group, computer, computerlist.
ensure
Create or remove the MCX setting. Valid values are present, absent.
name
- namevar
The name of the resource being managed. The default naming convention follows Directory Service paths:
/Computers/localhost /Groups/admin /Users/localadmin
The ds_type and ds_name type parameters are not necessary if the default naming convention is followed.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- mcxcontent: MCX Settings management using DirectoryService? on OS X.
This provider manages the entire MCXSettings attribute available to some directory services nodes. This management is 'all or nothing' in that discrete application domain key value pairs are not managed by this provider. It is recommended to use WorkGroup? Manager to configure Users, Groups, Computers, or ComputerLists?, then use 'ralsh mcx' to generate a puppet manifest from the resulting configuration. Original Author: Jeff McCune? (mccune.jeff@gmail.com) Required binaries: /usr/bin/dscl. Default for operatingsystem == darwin. Supported features: manages_content.
mount
Manages mounted filesystems, including putting mount information into the mount table. The actual behavior depends on the value of the 'ensure' parameter.
Note that if a mount receives an event from another resource, it will try to remount the filesystems if ensure is set to mounted.
Features
- refreshable: The provider can remount the filesystem.
| Provider | refreshable |
| parsed | X |
Parameters
atboot
Whether to mount the mount at boot. Not all platforms support this.
blockdevice
The device to fsck. This is property is only valid on Solaris, and in most cases will default to the correct value.
device
The device providing the mount. This can be whatever device is supporting by the mount, including network devices or devices specified by UUID rather than device path, depending on the operating system.
dump
Whether to dump the mount. Not all platforms + support this. Valid values are 1 or 0. or 2 on FreeBSD, Default is 0. Values can match /(0|1)/, /(0|1)/.
ensure
Control what to do with this mount. Set this attribute to present to make sure the filesystem is in the filesystem table but not mounted (if the filesystem is currently mounted, it will be unmounted). Set it to absent to unmount (if necessary) and remove the filesystem from the fstab. Set to mounted to add it to the fstab and mount it. Valid values are present (also called unmounted), absent, mounted.
fstype
The mount type. Valid values depend on the operating system.
name
- namevar
The mount path for the mount.
options
Mount options for the mounts, as they would appear in the fstab.
pass
The pass in which the mount is checked.
path
The deprecated name for the mount point. Please use name now.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- parsed: Required binaries: mount, umount. Supported features: refreshable.
remounts
Whether the mount can be remounted mount -o remount. If this is false, then the filesystem will be unmounted and remounted manually, which is prone to failure. Valid values are true, false.
target
The file in which to store the mount table. Only used by those providers that write to disk.
nagios_command
The Nagios type command. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_command.cfg, but you can send them to a different file by setting their target attribute.
You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.
Parameters
command_line
Nagios configuration file parameter.
command_name
- namevar
The name parameter for Nagios type command
ensure
The basic property that the resource should be in. Valid values are present, absent.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- naginator:
target
target
use
Nagios configuration file parameter.
nagios_contact
The Nagios type contact. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_contact.cfg, but you can send them to a different file by setting their target attribute.
You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.
Parameters
address1
Nagios configuration file parameter.
address2
Nagios configuration file parameter.
address3
Nagios configuration file parameter.
address4
Nagios configuration file parameter.
address5
Nagios configuration file parameter.
address6
Nagios configuration file parameter.
alias
Nagios configuration file parameter.
can_submit_commands
Nagios configuration file parameter.
contact_name
- namevar
The name parameter for Nagios type contact
contactgroups
Nagios configuration file parameter.
Nagios configuration file parameter.
ensure
The basic property that the resource should be in. Valid values are present, absent.
host_notification_commands
Nagios configuration file parameter.
host_notification_options
Nagios configuration file parameter.
host_notification_period
Nagios configuration file parameter.
host_notifications_enabled
Nagios configuration file parameter.
pager
Nagios configuration file parameter.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- naginator:
register
Nagios configuration file parameter.
retain_nonstatus_information
Nagios configuration file parameter.
retain_status_information
Nagios configuration file parameter.
service_notification_commands
Nagios configuration file parameter.
service_notification_options
Nagios configuration file parameter.
service_notification_period
Nagios configuration file parameter.
service_notifications_enabled
Nagios configuration file parameter.
target
target
use
Nagios configuration file parameter.
nagios_contactgroup
The Nagios type contactgroup. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_contactgroup.cfg, but you can send them to a different file by setting their target attribute.
You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.
Parameters
alias
Nagios configuration file parameter.
contactgroup_members
Nagios configuration file parameter.
contactgroup_name
- namevar
The name parameter for Nagios type contactgroup
ensure
The basic property that the resource should be in. Valid values are present, absent.
members
Nagios configuration file parameter.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- naginator:
register
Nagios configuration file parameter.
target
target
use
Nagios configuration file parameter.
nagios_host
The Nagios type host. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_host.cfg, but you can send them to a different file by setting their target attribute.
You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.
Parameters
action_url
Nagios configuration file parameter.
active_checks_enabled
Nagios configuration file parameter.
address
Nagios configuration file parameter.
alias
Nagios configuration file parameter.
check_command
Nagios configuration file parameter.
check_freshness
Nagios configuration file parameter.
check_interval
Nagios configuration file parameter.
check_period
Nagios configuration file parameter.
contact_groups
Nagios configuration file parameter.
contacts
Nagios configuration file parameter.
display_name
Nagios configuration file parameter.
ensure
The basic property that the resource should be in. Valid values are present, absent.
event_handler
Nagios configuration file parameter.
event_handler_enabled
Nagios configuration file parameter.
failure_prediction_enabled
Nagios configuration file parameter.
first_notification_delay
Nagios configuration file parameter.
flap_detection_enabled
Nagios configuration file parameter.
flap_detection_options
Nagios configuration file parameter.
freshness_threshold
Nagios configuration file parameter.
high_flap_threshold
Nagios configuration file parameter.
host_name
- namevar
The name parameter for Nagios type host
hostgroups
Nagios configuration file parameter.
icon_image
Nagios configuration file parameter.
icon_image_alt
Nagios configuration file parameter.
initial_state
Nagios configuration file parameter.
low_flap_threshold
Nagios configuration file parameter.
max_check_attempts
Nagios configuration file parameter.
notes
Nagios configuration file parameter.
notes_url
Nagios configuration file parameter.
notification_interval
Nagios configuration file parameter.
notification_options
Nagios configuration file parameter.
notification_period
Nagios configuration file parameter.
notifications_enabled
Nagios configuration file parameter.
obsess_over_host
Nagios configuration file parameter.
parents
Nagios configuration file parameter.
passive_checks_enabled
Nagios configuration file parameter.
process_perf_data
Nagios configuration file parameter.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- naginator:
register
Nagios configuration file parameter.
retain_nonstatus_information
Nagios configuration file parameter.
retain_status_information
Nagios configuration file parameter.
retry_interval
Nagios configuration file parameter.
stalking_options
Nagios configuration file parameter.
statusmap_image
Nagios configuration file parameter.
target
target
use
Nagios configuration file parameter.
vrml_image
Nagios configuration file parameter.
nagios_hostdependency
The Nagios type hostdependency. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_hostdependency.cfg, but you can send them to a different file by setting their target attribute.
You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.
Parameters
_naginator_name
- namevar
The name parameter for Nagios type hostdependency
dependency_period
Nagios configuration file parameter.
dependent_host_name
Nagios configuration file parameter.
dependent_hostgroup_name
Nagios configuration file parameter.
ensure
The basic property that the resource should be in. Valid values are present, absent.
execution_failure_criteria
Nagios configuration file parameter.
host_name
Nagios configuration file parameter.
hostgroup_name
Nagios configuration file parameter.
inherits_parent
Nagios configuration file parameter.
notification_failure_criteria
Nagios configuration file parameter.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- naginator:
register
Nagios configuration file parameter.
target
target
use
Nagios configuration file parameter.
nagios_hostescalation
The Nagios type hostescalation. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_hostescalation.cfg, but you can send them to a different file by setting their target attribute.
You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.
Parameters
_naginator_name
- namevar
The name parameter for Nagios type hostescalation
contact_groups
Nagios configuration file parameter.
contacts
Nagios configuration file parameter.
ensure
The basic property that the resource should be in. Valid values are present, absent.
escalation_options
Nagios configuration file parameter.
escalation_period
Nagios configuration file parameter.
first_notification
Nagios configuration file parameter.
host_name
Nagios configuration file parameter.
hostgroup_name
Nagios configuration file parameter.
last_notification
Nagios configuration file parameter.
notification_interval
Nagios configuration file parameter.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- naginator:
register
Nagios configuration file parameter.
target
target
use
Nagios configuration file parameter.
nagios_hostextinfo
The Nagios type hostextinfo. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_hostextinfo.cfg, but you can send them to a different file by setting their target attribute.
You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.
Parameters
ensure
The basic property that the resource should be in. Valid values are present, absent.
host_name
- namevar
The name parameter for Nagios type hostextinfo
icon_image
Nagios configuration file parameter.
icon_image_alt
Nagios configuration file parameter.
notes
Nagios configuration file parameter.
notes_url
Nagios configuration file parameter.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- naginator:
register
Nagios configuration file parameter.
statusmap_image
Nagios configuration file parameter.
target
target
use
Nagios configuration file parameter.
vrml_image
Nagios configuration file parameter.
nagios_hostgroup
The Nagios type hostgroup. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_hostgroup.cfg, but you can send them to a different file by setting their target attribute.
You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.
Parameters
action_url
Nagios configuration file parameter.
alias
Nagios configuration file parameter.
ensure
The basic property that the resource should be in. Valid values are present, absent.
hostgroup_members
Nagios configuration file parameter.
hostgroup_name
- namevar
The name parameter for Nagios type hostgroup
members
Nagios configuration file parameter.
notes
Nagios configuration file parameter.
notes_url
Nagios configuration file parameter.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- naginator:
register
Nagios configuration file parameter.
target
target
use
Nagios configuration file parameter.
nagios_service
The Nagios type service. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_service.cfg, but you can send them to a different file by setting their target attribute.
You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.
Parameters
_naginator_name
- namevar
The name parameter for Nagios type service
action_url
Nagios configuration file parameter.
active_checks_enabled
Nagios configuration file parameter.
check_command
Nagios configuration file parameter.
check_freshness
Nagios configuration file parameter.
check_interval
Nagios configuration file parameter.
check_period
Nagios configuration file parameter.
contact_groups
Nagios configuration file parameter.
contacts
Nagios configuration file parameter.
display_name
Nagios configuration file parameter.
ensure
The basic property that the resource should be in. Valid values are present, absent.
event_handler
Nagios configuration file parameter.
event_handler_enabled
Nagios configuration file parameter.
failure_prediction_enabled
Nagios configuration file parameter.
first_notification_delay
Nagios configuration file parameter.
flap_detection_enabled
Nagios configuration file parameter.
flap_detection_options
Nagios configuration file parameter.
freshness_threshold
Nagios configuration file parameter.
high_flap_threshold
Nagios configuration file parameter.
host_name
Nagios configuration file parameter.
hostgroup_name
Nagios configuration file parameter.
icon_image
Nagios configuration file parameter.
icon_image_alt
Nagios configuration file parameter.
initial_state
Nagios configuration file parameter.
is_volatile
Nagios configuration file parameter.
low_flap_threshold
Nagios configuration file parameter.
max_check_attempts
Nagios configuration file parameter.
normal_check_interval
Nagios configuration file parameter.
notes
Nagios configuration file parameter.
notes_url
Nagios configuration file parameter.
notification_interval
Nagios configuration file parameter.
notification_options
Nagios configuration file parameter.
notification_period
Nagios configuration file parameter.
notifications_enabled
Nagios configuration file parameter.
obsess_over_service
Nagios configuration file parameter.
parallelize_check
Nagios configuration file parameter.
passive_checks_enabled
Nagios configuration file parameter.
process_perf_data
Nagios configuration file parameter.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- naginator:
register
Nagios configuration file parameter.
retain_nonstatus_information
Nagios configuration file parameter.
retain_status_information
Nagios configuration file parameter.
retry_check_interval
Nagios configuration file parameter.
retry_interval
Nagios configuration file parameter.
service_description
Nagios configuration file parameter.
servicegroups
Nagios configuration file parameter.
stalking_options
Nagios configuration file parameter.
target
target
use
Nagios configuration file parameter.
nagios_servicedependency
The Nagios type servicedependency. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_servicedependency.cfg, but you can send them to a different file by setting their target attribute.
You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.
Parameters
_naginator_name
- namevar
The name parameter for Nagios type servicedependency
dependency_period
Nagios configuration file parameter.
dependent_host_name
Nagios configuration file parameter.
dependent_hostgroup_name
Nagios configuration file parameter.
dependent_service_description
Nagios configuration file parameter.
ensure
The basic property that the resource should be in. Valid values are present, absent.
execution_failure_criteria
Nagios configuration file parameter.
host_name
Nagios configuration file parameter.
hostgroup_name
Nagios configuration file parameter.
inherits_parent
Nagios configuration file parameter.
notification_failure_criteria
Nagios configuration file parameter.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- naginator:
register
Nagios configuration file parameter.
service_description
Nagios configuration file parameter.
target
target
use
Nagios configuration file parameter.
nagios_serviceescalation
The Nagios type serviceescalation. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_serviceescalation.cfg, but you can send them to a different file by setting their target attribute.
You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.
Parameters
_naginator_name
- namevar
The name parameter for Nagios type serviceescalation
contact_groups
Nagios configuration file parameter.
contacts
Nagios configuration file parameter.
ensure
The basic property that the resource should be in. Valid values are present, absent.
escalation_options
Nagios configuration file parameter.
escalation_period
Nagios configuration file parameter.
first_notification
Nagios configuration file parameter.
host_name
Nagios configuration file parameter.
hostgroup_name
Nagios configuration file parameter.
last_notification
Nagios configuration file parameter.
notification_interval
Nagios configuration file parameter.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- naginator:
register
Nagios configuration file parameter.
service_description
Nagios configuration file parameter.
target
target
use
Nagios configuration file parameter.
nagios_serviceextinfo
The Nagios type serviceextinfo. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_serviceextinfo.cfg, but you can send them to a different file by setting their target attribute.
You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.
Parameters
_naginator_name
- namevar
The name parameter for Nagios type serviceextinfo
action_url
Nagios configuration file parameter.
ensure
The basic property that the resource should be in. Valid values are present, absent.
host_name
Nagios configuration file parameter.
icon_image
Nagios configuration file parameter.
icon_image_alt
Nagios configuration file parameter.
notes
Nagios configuration file parameter.
notes_url
Nagios configuration file parameter.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- naginator:
register
Nagios configuration file parameter.
service_description
Nagios configuration file parameter.
target
target
use
Nagios configuration file parameter.
nagios_servicegroup
The Nagios type servicegroup. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_servicegroup.cfg, but you can send them to a different file by setting their target attribute.
You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.
Parameters
action_url
Nagios configuration file parameter.
alias
Nagios configuration file parameter.
ensure
The basic property that the resource should be in. Valid values are present, absent.
members
Nagios configuration file parameter.
notes
Nagios configuration file parameter.
notes_url
Nagios configuration file parameter.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- naginator:
register
Nagios configuration file parameter.
servicegroup_members
Nagios configuration file parameter.
servicegroup_name
- namevar
The name parameter for Nagios type servicegroup
target
target
use
Nagios configuration file parameter.
nagios_timeperiod
The Nagios type timeperiod. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_timeperiod.cfg, but you can send them to a different file by setting their target attribute.
You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.
Parameters
alias
Nagios configuration file parameter.
ensure
The basic property that the resource should be in. Valid values are present, absent.
exclude
Nagios configuration file parameter.
friday
Nagios configuration file parameter.
monday
Nagios configuration file parameter.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- naginator:
register
Nagios configuration file parameter.
saturday
Nagios configuration file parameter.
sunday
Nagios configuration file parameter.
target
target
thursday
Nagios configuration file parameter.
timeperiod_name
- namevar
The name parameter for Nagios type timeperiod
tuesday
Nagios configuration file parameter.
use
Nagios configuration file parameter.
wednesday
Nagios configuration file parameter.
notify
任意のメッセージをpuppetdのランタイムログに出力します。
Parameters
message
出力されるメッセージです。
name
- namevar
メッセージの名前であり、あなた自身が参照するための任意のタグです。
withpath
オブジェクトを完全パスで表現するかどうかです。有効な値はtrue, falseです。
package
パッケージを管理します。現在のところ、パッケージ管理システムは大きく二つに分かれます。yumやaptのように自らパッケージを取得する機能を持つものと、rpmやsunのように持たないものです。パッケージを取得できないProviderを使用する場合には、sourceパラメータで取得元を指定する必要があります。
puppetは使用すべきパッケージ管理システムをプラットホームから自動的に判定するでしょう。必要であればproviderパラメータを用いて手動で指定することもできます。それぞれのproviderは動作環境や前提として必要なパッケージが異なりますのでご確認ください。
Features
- installable: パッケージをインストールすることができる。
- purgeable: パッケージをpurgeすることができる。これは削除したパッケージおよび設定ファイルを保有することを意味する。この機能は不可逆の影響を及ぼすので使用には注意を要する。
- uninstallable: パッケージをアンインストールすることができる。
- upgradeable: パッケージを最新のバージョンにアップグレードすることができる。最新版に限る。
- versionable: インストールされているパッケージのバージョンを判定することができる。また特定のバージョンのパッケージをインストール、またはアップグレードすることができる。
| Provider | installable | purgeable | uninstallable | upgradeable | versionable |
| appdmg | X | ||||
| apple | X | ||||
| apt | X | X | X | X | X |
| aptitude | X | X | X | X | X |
| aptrpm | X | X | X | X | X |
| blastwave | X | X | X | ||
| darwinport | X | X | X | ||
| dpkg | X | X | X | X | |
| fink | X | X | X | X | X |
| freebsd | X | X | |||
| gem | X | X | X | X | |
| hpux | X | X | |||
| openbsd | X | X | |||
| pkgdmg | X | ||||
| portage | X | X | X | X | |
| ports | X | X | X | ||
| rpm | X | X | X | X | |
| rug | X | X | X | X | |
| sun | X | X | X | ||
| sunfreeware | X | X | X | ||
| up2date | X | X | X | ||
| urpmi | X | X | X | X | |
| yum | X | X | X | X | X |
Parameters
adminfile
インストールしようとしているパッケージのpackage defaultsを持つ一つのファイルです。このパラメータは現在Solarisでのみ使用可能です。値はシステムの規約に従って検証されます。Solarisにおいては完全修飾パスであるか/var/sadm/install/adminに存在するファイルである必要があることを意味するでしょう。
allowcdrom
aptにおいてCD-ROMからパッケージを読み込むことを許可するか否かです。有効な値はtrue, falseです。
category
A read-only parameter set by the package.
configfiles
既存の設定ファイルを残すか置き換えるか、です。ほとんどのProviderはこのパラメータに対応していません。有効な値はkeeo, replaceです。
description
A read-only parameter set by the package.
ensure
パッケージのあるべき状態です。latestは常に最新のバージョンがインストールされていることを要求します。purgedは設定ファイルを隔離してパッケージを削除します。有効な値はpresent(またはinstalled), absent, purged, latest、またはバージョン番号です。latestおよびバージョン番号は、パッケージを取得できるProviderでのみ有効です。
instance
A read-only parameter set by the package.
name
- namevar
パッケージ名です。これはパッケージ管理システムごとに異なりますし、とりわけSolarisでは人間には理解し辛い物です。パッケージ名を抽象化して扱いたい場合は、下記のようにエイリアスを作成してください。
# In the 'openssl' class
$ssl = $operatingsystem ? {
solaris => SMCossl,
default => openssl
}
# It is not an error to set an alias to the same value as the
# object name.
package { $ssl:
ensure => installed,
alias => openssl
}
. etc. .
$ssh = $operatingsystem ? {
solaris => SMCossh,
default => openssh
}
# Use the alias to specify a dependency, rather than
# having another selector to figure it out again.
package { $ssh:
ensure => installed,
alias => openssh,
require => Package[openssl]
}
platform
A read-only parameter set by the package.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- appdmg: Package management which copies application bundles to a target. Required binaries: /usr/bin/hdiutil, /usr/bin/curl, /usr/bin/ditto. Supported features: installable.
- apple: Package management based on OS X's builtin packaging system. This is essentially the simplest and least functional package system in existence -- it only supports installation; no deletion or upgrades. The provider will automatically add the .pkg extension, so leave that off when specifying the package name. Required binaries: /usr/sbin/installer. Supported features: installable.
- apt: Package management via apt-get. Required binaries: /usr/bin/apt-cache, /usr/bin/apt-get, /usr/bin/debconf-set-selections. Default for operatingsystem == debianubuntu. Supported features: installable, purgeable, uninstallable, upgradeable, versionable.
- aptitude: Package management via aptitude. Required binaries: /usr/bin/aptitude, /usr/bin/apt-cache. Supported features: installable, purgeable, uninstallable, upgradeable, versionable.
- aptrpm: Package management via apt-get ported to rpm. Required binaries: rpm, apt-cache, apt-get. Supported features: installable, purgeable, uninstallable, upgradeable, versionable.
- blastwave: Package management using Blastwave.org's pkg-get command on Solaris. Required binaries: pkg-get. Supported features: installable, uninstallable, upgradeable.
- darwinport: Package management using DarwinPorts? on OS X. Required binaries: /opt/local/bin/port. Supported features: installable, uninstallable, upgradeable.
- dpkg: Package management via dpkg. Because this only uses dpkg and not apt, you must specify the source of any packages you want to manage. Required binaries: /usr/bin/dpkg-deb, /usr/bin/dpkg-query, /usr/bin/dpkg. Supported features: installable, purgeable, uninstallable, upgradeable.
- fink: Package management via fink. Required binaries: /sw/bin/dpkg-query, /sw/bin/apt-cache, /sw/bin/apt-get, /sw/bin/fink. Supported features: installable, purgeable, uninstallable, upgradeable, versionable.
- freebsd: The specific form of package management on FreeBSD. This is an extremely quirky packaging system, in that it freely mixes between ports and packages. Apparently all of the tools are written in Ruby, so there are plans to rewrite this support to directly use those libraries. Required binaries: /usr/sbin/pkg_info, /usr/sbin/pkg_add, /usr/sbin/pkg_delete. Supported features: installable, uninstallable.
- gem: Ruby Gem support. If a URL is passed via source, then that URL is used as the remote gem repository; if a source is present but is not a valid URL, it will be interpreted as the path to a local gem file. If source is not present at all, the gem will be installed from the default gem repositories. Required binaries: gem. Supported features: installable, uninstallable, upgradeable, versionable.
- hpux: HP-UX's packaging system. Required binaries: /usr/sbin/swremove, /usr/sbin/swinstall, /usr/sbin/swlist. Default for operatingsystem == hp-ux. Supported features: installable, uninstallable.
- openbsd: OpenBSD's form of pkg_add support. Required binaries: pkg_info, pkg_add, pkg_delete. Default for operatingsystem == openbsd. Supported features: installable, uninstallable.
- pkgdmg: Package management based on Apple's Installer.app and DiskUtility?.app. This package works by checking the contents of a DMG image for Apple pkg or mpkg files. Any number of pkg or mpkg files may exist in the root directory of the DMG file system. Sub directories are not checked for packages. See the wiki docs </trac/puppet/wiki/DmgPackages> for more detail.Required binaries: /usr/bin/hdiutil, /usr/bin/curl, /usr/sbin/installer. Default for operatingsystem == darwin. Supported features: installable.
- portage: Provides packaging support for Gentoo's portage system. Required binaries: /usr/bin/update-eix, /usr/bin/emerge, /usr/bin/eix. Default for operatingsystem == gentoo. Supported features: installable, uninstallable, upgradeable, versionable.
- ports: Support for FreeBSD's ports. Again, this still mixes packages and ports. Required binaries: /usr/local/sbin/portupgrade, /usr/local/sbin/portversion, /usr/local/sbin/pkg_deinstall, /usr/sbin/pkg_info. Default for operatingsystem == freebsd. Supported features: installable, uninstallable, upgradeable.
- rpm: RPM packaging support; should work anywhere with a working rpm binary. Required binaries: rpm. Supported features: installable, uninstallable, upgradeable, versionable.
- rug: Support for suse rug package manager. Required binaries: /usr/bin/rug, rpm. Default for operatingsystem == susesles. Supported features: installable, uninstallable, upgradeable, versionable.
- sun: Sun's packaging system. Requires that you specify the source for the packages you're managing. Required binaries: /usr/sbin/pkgrm, /usr/bin/pkginfo, /usr/sbin/pkgadd. Default for operatingsystem == solaris. Supported features: installable, uninstallable, upgradeable.
- sunfreeware: Package management using sunfreeware.com's pkg-get command on Solaris. At this point, support is exactly the same as blastwave support and has not actually been tested. Required binaries: pkg-get. Supported features: installable, uninstallable, upgradeable.
- up2date: Support for Red Hat's proprietary up2date package update mechanism. Required binaries: /usr/sbin/up2date-nox. Default for lsbdistrelease == 2.134 and operatingsystem == redhatoelovm. Supported features: installable, uninstallable, upgradeable.
- urpmi: Support via urpmi. Required binaries: rpm, urpmi, urpmq. Default for operatingsystem == mandrivamandrake. Supported features: installable, uninstallable, upgradeable, versionable.
- yum: Support via yum. Required binaries: yum, rpm, python. Default for operatingsystem == fedoracentosredhat. Supported features: installable, purgeable, uninstallable, upgradeable, versionable.
responsefile
パッケージのインストール時に発生する質問に対する入力内容を記述したファイル。現在、SolarisおよびDebianでのみ有効です。値はシステムの規則によって検証されますが、パスは絶対パスで入力すべきです。
root
A read-only parameter set by the package.
source
パッケージの場所です。ローカルファイルシステム(またはnfs等)のパスか、使用しているパッケージ管理システムがサポートしている種類のURLである必要があります。puppet自体はファイルの取得を行いません。
status
A read-only parameter set by the package.
type
Providerを指定するパラメータで、現在は非推奨です。providerパラメータを使用してください。
vendor
A read-only parameter set by the package.
resources
This is a metatype that can manage other resource types. Any metaparams specified here will be passed on to any generated resources, so you can purge umanaged resources but set noop to true so the purging is only logged and does not actually happen.
Parameters
name
- namevar
The name of the type to be managed.
purge
Purge unmanaged resources. This will delete any resource that is not specified in your configuration and is not required by any specified resources. Valid values are true, false.
unless_system_user
This keeps system users from being purged. By default, it does not purge users whose UIDs are less than or equal to 500, but you can specify a different UID as the inclusive limit. Valid values are true, false. Values can match /\d+$/.
schedule
Defined schedules for Puppet. The important thing to understand about how schedules are currently implemented in Puppet is that they can only be used to stop a resource from being applied, they never guarantee that it is applied.
Every time Puppet applies its configuration, it will collect the list of resources whose schedule does not eliminate them from running right then, but there is currently no system in place to guarantee that a given resource runs at a given time. If you specify a very restrictive schedule and Puppet happens to run at a time within that schedule, then the resources will get applied; otherwise, that work may never get done.
Thus, it behooves you to use wider scheduling (e.g., over a couple of hours) combined with periods and repetitions. For instance, if you wanted to restrict certain resources to only running once, between the hours of two and 4 AM, then you would use this schedule:
schedule { maint:
range => "2 - 4",
period => daily,
repeat => 1
}
With this schedule, the first time that Puppet runs between 2 and 4 AM, all resources with this schedule will get applied, but they won't get applied again between 2 and 4 because they will have already run once that day, and they won't get applied outside that schedule because they will be outside the scheduled range.
Puppet automatically creates a schedule for each valid period with the same name as that period (e.g., hourly and daily). Additionally, a schedule named puppet is created and used as the default, with the following attributes:
schedule { puppet:
period => hourly,
repeat => 2
}
This will cause resources to be applied every 30 minutes by default.
Parameters
name
- namevar
The name of the schedule. This name is used to retrieve the schedule when assigning it to an object:
schedule { daily:
period => daily,
range => [2, 4]
}
exec { "/usr/bin/apt-get update":
schedule => daily
}
period
The period of repetition for a resource. Choose from among a fixed list of hourly, daily, weekly, and monthly. The default is for a resource to get applied every time that Puppet runs, whatever that period is.
Note that the period defines how often a given resource will get applied but not when; if you would like to restrict the hours that a given resource can be applied (e.g., only at night during a maintenance window) then use the range attribute.
If the provided periods are not sufficient, you can provide a value to the repeat attribute, which will cause Puppet to schedule the affected resources evenly in the period the specified number of times. Take this schedule:
schedule { veryoften:
period => hourly,
repeat => 6
}
This can cause Puppet to apply that resource up to every 10 minutes.
At the moment, Puppet cannot guarantee that level of repetition; that is, it can run up to every 10 minutes, but internal factors might prevent it from actually running that often (e.g., long-running Puppet runs will squash conflictingly scheduled runs).
See the periodmatch attribute for tuning whether to match times by their distance apart or by their specific value. Valid values are hourly, daily, weekly, monthly, never.
periodmatch
Whether periods should be matched by number (e.g., the two times are in the same hour) or by distance (e.g., the two times are 60 minutes apart). Valid values are number, distance.
range
The earliest and latest that a resource can be applied. This is always a range within a 24 hour period, and hours must be specified in numbers between 0 and 23, inclusive. Minutes and seconds can be provided, using the normal colon as a separator. For instance:
schedule { maintenance:
range => "1:30 - 4:30"
}
This is mostly useful for restricting certain resources to being applied in maintenance windows or during off-peak hours.
repeat
How often the application gets repeated in a given period. Defaults to 1. Must be an integer.
selboolean
Manages SELinux booleans on systems with SELinux support. The supported booleans are any of the ones found in /selinux/booleans/.
Parameters
name
- namevar
The name of the SELinux boolean to be managed.
persistent
If set true, SELinux booleans will be written to disk and persist accross reboots. The default is false. Valid values are true, false.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- getsetsebool: Manage SELinux booleans using the getsebool and setsebool binaries. Required binaries: /usr/sbin/getsebool, /usr/sbin/setsebool.
value
Whether the the SELinux boolean should be enabled or disabled. Valid values are on, off.
selmodule
Manages loading and unloading of SELinux policy modules on the system. Requires SELinux support. See man semodule(8) for more information on SELinux policy modules.
Parameters
ensure
The basic property that the resource should be in. Valid values are present, absent.
name
- namevar
The name of the SELinux policy to be managed. You should not include the customary trailing .pp extension.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- semodule: Manage SELinux policy modules using the semodule binary. Required binaries: /usr/sbin/semodule.
selmoduledir
The directory to look for the compiled pp module file in. Currently defaults to /usr/share/selinux/targeted. If selmodulepath is not specified the module will be looked for in this directory in a in a file called NAME.pp, where NAME is the value of the name parameter.
selmodulepath
The full path to the compiled .pp policy module. You only need to use this if the module file is not in the directory pointed at by selmoduledir.
syncversion
If set to true, the policy will be reloaded if the version found in the on-disk file differs from the loaded version. If set to false (the default) the the only check that will be made is if the policy is loaded at all or not. Valid values are true, false.
service
サービス(またはdaemon)を管理します。サービスはプラットホームによって非常に多彩であり、いくつかのプラットホームでは非常に簡素であったり、または非常に体系的で強力であったりします。puppetのサービスはそれぞれの短所を概ね隠蔽します。(例えばstatusコマンドがない場合にはプロセステーブルからサービス名を検索します)ですが、Providerごとの動作を確認して認識しておいたほうが良いでしょう。あるいは、一つのプラットホームだけを使用することで非常に良い結果を得ることもできるでしょう。
このリソースタイプが他のリソースからのイベントを受け取った際に、サービスは再起動されます。実際に再起動に使用されるコマンドはプラットホームに依存します。もし自分で定義する場合はrestartパラメータに指定してください。
Features
- controllable: The provider uses a control variable.
- enableable: The provider can enable and disable the service
- refreshable: The provider can restart the service.
| Provider | controllable | enableable | refreshable |
| base | X | ||
| daemontools | X | X | |
| debian | X | X | |
| freebsd | X | X | |
| gentoo | X | X | |
| init | X | ||
| launchd | X | X | |
| redhat | X | X | |
| runit | X | X | |
| smf | X | X |
Parameters
binary
daemonのパスです。プラットホームがinitスクリプトをサポートしていない場合のみ必要です。startパラメータが指定されない場合に、このバイナリがサービスを起動するのに使用されます。
control
The control variable used to manage services (originally for HP-UX). Defaults to the upcased service name plus START replacing dots with underscores, for those providers that support the controllable feature.
enable
システム起動時にサービスが自動的に起動するように設定するかどうかです。このパラメータを指定した際の実際の動きはプラットホームによって全く異なります。有効な値はtrue, falseです。Providerがその機能をサポートしている必要があります。
ensure
サービスが起動しているかどうかです。有効な値はstopped(またはfalse), running(またはtrue)です。
hasrestart
initスクリプトがrestartコマンドに対応しているかどうかです。falseの場合はstopコマンドとstartコマンドを続けて使用します。有効な値はtrue, falseです。
hasstatus
initスクリプトがstatusコマンドに対応しているかどうかです。サービスが既に起動しているかどうかを確認する際に使用されます。statusコマンドに対応していない場合は、statusパラメータに代替となるコマンドを指定する必要があります。 何も指定しない場合は、プロセステーブルからサービス名で検索します。 有効な値はtrue, falseです。
manifest
Specify a command to config a service, or a path to a manifest to do so.
name
- namevar
走らせるサービスの名前です。この名前はプロセステーブルから検索する際にも使用されます。
path
initスクリプトを探すパスです。複数の値をコロンで区切って文字列で指定するか、配列で指定することができます
pattern
プロセステーブルから探す際のパターンです。initスクリプトがstopコマンドおよびstatusコマンドに対応していない場合において、サービスの停止およびサービスの稼働状態を確認する際に使用されます。 これが指定されていない場合は、サービス名が代わりに使用されます。 単純な文字列か、Rubyの正規表現を使用できます。
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- base: The simplest form of service support. You have to specify enough about your service for this to work; the minimum you can specify is a binary for starting the process, and this same binary will be searched for in the process table to stop the service. It is preferable to specify start, stop, and status commands, akin to how you would do so using init.
Required binaries: kill. Supported features: refreshable.
- daemontools': Daemontools service management. This provider manages daemons running supervised by D.J.Bernstein daemontools. It tries to detect the service directory, with by order of preference:
- /service
- /etc/service
- /var/lib/svscan
The daemon directory should be placed in a directory that can be by default in:
- /var/lib/service
- /etc
or this can be overriden in the service resource parameters:
service {
"myservice":
provider => "daemontools", path => "/path/to/daemons";
}
This provider supports out of the box:
- start/stop (mapped to enable/disable)
- enable/disable
- restart
- status
If a service has ensure => "running", it will link /path/to/daemon to /path/to/service, which will automatically enable the service. If a service has ensure => "stopped", it will only down the service, not remove the /path/to/service link. Required binaries: /usr/bin/svstat, /usr/bin/svc. Supported features: enableable, refreshable.
- debian: Debian's form of init-style management.
The only difference is that this supports service enabling and disabling via update-rc.d and determines enabled status via invoke-rc.d. Required binaries: /usr/sbin/update-rc.d, /usr/sbin/invoke-rc.d. Default for operatingsystem == debianubuntu. Supported features: enableable, refreshable.
- freebsd: FreeBSD's (and probably NetBSD?) form of init-style service management.
Uses rc.conf.d for service enabling and disabling. Default for operatingsystem == freebsd. Supported features: enableable, refreshable.
- gentoo: Gentoo's form of init-style service management.
Uses rc-update for service enabling and disabling. Required binaries: /sbin/rc-update. Default for operatingsystem == gentoo. Supported features: enableable, refreshable.
- init: Standard init service management.
This provider assumes that the init script has no status command, because so few scripts do, so you need to either provide a status command or specify via hasstatus that one already exists in the init script. Supported features: refreshable.
- launchd: launchd service management framework.
This provider manages launchd jobs, the default service framework for Mac OS X, that has also been open sourced by Apple for possible use on other platforms. See:
This provider reads plists out of the following directories:
- /System/Library/LaunchDaemons
- /System/Library/LaunchAgents
- /Library/LaunchDaemons
- /Library/LaunchAgents
and builds up a list of services based upon each plists "Label" entry. This provider supports:
- ensure => running/stopped,
- enable => true/false
- status
- restart
Here is how the Puppet states correspond to launchd states:
- stopped => job unloaded
- started => job loaded
- enabled => 'Disable' removed from job plist file
- disabled => 'Disable' added to job plist file
Note that this allows you to do something launchctl can't do, which is to be in a state of "stopped/enabled or "running/disabled". Required binaries: /usr/bin/sw_vers, /bin/launchctl. Default for operatingsystem == darwin. Supported features: enableable, refreshable.
- redhat: Red Hat's (and probably many others) form of init-style service management:
Uses chkconfig for service enabling and disabling. Required binaries: /sbin/chkconfig, /sbin/service. Default for operatingsystem == redhatfedorasusecentosslesoelovm. Supported features: enableable, refreshable.
- runit: Runit service management.
This provider manages daemons running supervised by Runit. It tries to detect the service directory, with by order of preference:
- /service
- /var/service
- /etc/service
The daemon directory should be placed in a directory that can be by default in:
- /etc/sv
or this can be overriden in the service resource parameters:
service {
"myservice":
provider => "runit", path => "/path/to/daemons";
}
This provider supports out of the box:
- start/stop
- enable/disable
- restart
- status
Required binaries: /usr/bin/sv. Supported features: enableable, refreshable.
*smf: Support for Sun's new Service Management Framework.
Starting a service is effectively equivalent to enabling it, so there is only support for starting and stopping services, which also enables and disables them, respectively. By specifying manifest => "/path/to/service.xml", the SMF manifest will be imported if it does not exist. Required binaries: /usr/sbin/svcadm, /usr/bin/svcs, /usr/sbin/svccfg. Default for operatingsystem == solaris. Supported features: enableable, refreshable.
restart
restartコマンドを指定します。指定しない場合は、stopコマンドとstartコマンドを続けて実行します。
start
startコマンドを指定します。ほとんどのサービスはstartコマンドに対応しているので、指定する必要はないでしょう。
status
statusコマンドを指定します。指定しない場合は、自動的に判断されます。通常はプロセステーブルから検索します。
stop
stopコマンドを指定します。
ssh_authorized_key
SSHのauthorized_keysを管理します。現在、二種類の鍵に対応しています。
Parameters
ensure
リソースが存在すべきか否かです。有効な値はpresent, absentです。
key
鍵です。文字列または16進数の数値で指定します。
name
- namevar
The SSH key comment. This attribute is currently used as a system-wide primary key and therefore has to be unique.
options
Key options, see sshd(8) for possible values. Multiple values should be specified as an array.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- parsed: Parse and generate authorized_keys files for SSH.
target
The absolute filename in which to store the SSH key. This property is optional and should only be used in cases where keys are stored in a non-standard location (ie not in ~user/.ssh/authorized_keys).
type
The encryption type used: ssh-dss or ssh-rsa. Valid values are ssh-dss (also called dsa), ssh-rsa (also called rsa).
user
The user account in which the SSH key should be installed. The resource will automatically depend on this user.
sshkey
SSHホスト鍵を管理します。このリソースタイプは/etc/ssh/ssh_known_hostsに鍵をインストールする機能を持ちます。ユーザーのauthorized_keysについては別のリソースタイプを参照してください。
Parameters
alias
Any alias the host might have. Multiple values must be specified as an array. Note that this parameter has the same name as one of the metaparams; using this parameter to set aliases will make those aliases available in your Puppet scripts.
ensure
リソースが存在すべきか否かです。有効な値はpresent, absentです。
key
鍵です。文字列または16進数の数値で指定します。
name
- namevar
鍵と関連付けられるホスト名です。
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- parsed: Parse and generate host-wide known hosts files for SSH.
target
The file in which to store the ssh key. Only used by the parsed provider.
type
The encryption type used. Probably ssh-dss or ssh-rsa. Valid values are ssh-dss (also called dsa), ssh-rsa (also called rsa).
tidy
指定した条件を満たす場合に不要なファイルを削除します。複数の条件を指定した場合は(andではなく)orとみなされます。巨大である、と、古すぎる、二つの条件を指定した際などに、巨大だが新しいファイルは削除されます。 ageパラメータもsizeパラメータも指定しない場合は、必ず削除されます。 This resource type works by generating a file resource for every file that should be deleted and then letting that resource perform the actual deletion.
Parameters
age
Tidy files whose age is equal to or greater than the specified time. You can choose seconds, minutes, hours, days, or weeks by specifying the first letter of any of those words (e.g., '1w').
Specifying 0 will remove all files.
backup
Whether tidied files should be backed up. Any values are passed directly to the file resources used for actual file deletion, so use its backup documentation to determine valid values.
matches
One or more (shell type) file glob patterns, which restrict the list of files to be tidied to those whose basenames match at least one of the patterns specified. Multiple patterns can be specified using an array.
Example:
tidy { "/tmp":
age => "1w",
recurse => false,
matches => [ "[0-9]pub*.tmp", "*.temp", "tmpfile?" ]
}
This removes files from /tmp if they are one week old or older, are not in a subdirectory and match one of the shell globs given.
Note that the patterns are matched against the basename of each file -- that is, your glob patterns should not have any '/' characters in them, since you are only specifying against the last bit of the file.
path
- namevar
The path to the file or directory to manage. Must be fully qualified.
recurse
If target is a directory, recursively descend into the directory looking for files to tidy. Valid values are true, false, inf. Values can match /[0-9]+$/.
rmdirs
Tidy directories in addition to files; that is, remove directories whose age is older than the specified criteria. This will only remove empty directories, so all contained files must also be tidied before a directory gets removed. Valid values are true, false.
size
Tidy files whose size is equal to or greater than the specified size. Unqualified values are in kilobytes, but b, k, and m can be appended to specify bytes, kilobytes, and megabytes, respectively. Only the first character is significant, so the full word can also be used.
type
Set the mechanism for determining age. Valid values are atime, mtime, ctime.
user
ユーザーを管理します。基本的にこのタイプはシステムのユーザーを作成します。よって通常のユーザーを管理する便利な機能のいくつかを欠いています。 This resource type uses the prescribed native tools for creating groups and generally uses POSIX APIs for retrieving information about them. /etc/passwdやそれに類するファイルを直接書き換えるようなことはしません。
Features
- allows_duplicates: The provider supports duplicate users with the same UID.
- manages_homedir: The provider can create and remove home directories.
- manages_passwords: The provider can modify user passwords, by accepting a password hash.
- manages_solaris_rbac: The provider can manage roles and normal users
| Provider | allows_duplicates | manages_homedir | manages_passwords | manages_solaris_rbac |
| directoryservice | X | |||
| hpuxuseradd | X | X | ||
| ldap | X | |||
| pw | X | X | ||
| user_role_add | X | X | X | X |
| useradd | X | X | X |
Parameters
allowdupe
重複するUIDを許容するかどうかです。有効な値はtrue, falseです。
auth_membership
Whether specified auths should be treated as the only auths of which the user is a member or whether they should merely be treated as the minimum membership list. Valid values are inclusive, minimum.
auths
The auths the user has. Multiple auths should be specified as an array. Requires features manages_solaris_rbac.
comment
A description of the user. Generally is a user's full name.
ensure
存在すべきかどうかです。有効な値はpresent, absent, roleです。 (原文:)The basic state that the object should be in. Valid values are present, absent, role.(roleの説明がない)
gid
ユーザーのプライマリグループです。数値または名前で指定します。
groups
ユーザーが所属するプライマリグループ以外のグループです。複数のグループは配列で指定してください。
home
ホームディレクトリです。The directory must be created separately and is not currently checked for existence.
key_membership
Whether specified key value pairs should be treated as the only attributes of the user or whether they should merely be treated as the minimum list. Valid values are inclusive, minimum.
keys
Specify user attributes in an array of keyvalue pairs Requires features manages_solaris_rbac.
managehome
Whether to manage the home directory when managing the user. Valid values are true, false.
membership
Whether specified groups should be treated as the only groups of which the user is a member or whether they should merely be treated as the minimum membership list. Valid values are inclusive, minimum.
name
- namevar
ユーザーの名前です。命名規則はOSごとに異なります。半角英字で始まる8文字以内の文字列に収めるのが無難です。
password
ユーザーのパスワードです。プラットホームが要求する暗号化された文字列です。Be sure to enclose any value that includes a dollar sign ($) in single quotes ('). Requires features manages_passwords.
profile_membership
Whether specified roles should be treated as the only roles of which the user is a member or whether they should merely be treated as the minimum membership list. Valid values are inclusive, minimum.
profiles
The profiles the user has. Multiple profiles should be specified as an array. Requires features manages_solaris_rbac.
project
The name of the project associated with a user Requires features manages_solaris_rbac.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- directoryservice: User management using DirectoryService? on OS X. Required binaries: /usr/bin/dscl. Default for operatingsystem == darwin. Supported features: manages_passwords.
- hpuxuseradd: User management for hp-ux! Undocumented switch to special usermod because HP-UX regular usermod is TOO STUPID to change stuff while the user is logged in. Required binaries: /usr/sam/lbin/userdel.sam, /usr/sam/lbin/usermod.sam, /usr/sbin/useradd. Default for operatingsystem == hp-ux. Supported features: allows_duplicates, manages_homedir.
- ldap: User management via ldap. This provider requires that you have valid values for all of the ldap-related settings, including ldapbase. You will also almost definitely need settings for ldapuser and ldappassword, so that your clients can write to ldap.
Note that this provider will automatically generate a UID for you if you do not specify one, but it is a potentially expensive operation, as it iterates across all existing users to pick the appropriate next one. Supported features: manages_passwords.
- pw: User management via pw on FreeBSD. Required binaries: pw. Default for operatingsystem == freebsd. Supported features: allows_duplicates, manages_homedir.
- user_role_add: User management inherits useradd and adds logic to manage roles on Solaris using roleadd. Required binaries: roleadd, roledel, rolemod, userdel, useradd, usermod. Default for operatingsystem == solaris. Supported features: allows_duplicates, manages_homedir, manages_passwords, manages_solaris_rbac.
- useradd: User management via useradd and its ilk. Note that you will need to install the Shadow Password Ruby library often known as ruby-libshadow to manage user passwords. Required binaries: userdel, useradd, usermod. Supported features: allows_duplicates, manages_homedir, manages_passwords.
role_membership
Whether specified roles should be treated as the only roles of which the user is a member or whether they should merely be treated as the minimum membership list. Valid values are inclusive, minimum.
roles
The roles the user has. Multiple roles should be specified as an array. Requires features manages_solaris_rbac.
shell
The user's login shell. The shell must exist and be executable.
uid
The user ID. Must be specified numerically. For new users being created, if no user ID is specified then one will be chosen automatically, which will likely result in the same user having different IDs on different systems, which is not recommended. This is especially noteworthy if you use Puppet to manage the same user on both Darwin and other platforms, since Puppet does the ID generation for you on Darwin, but the tools do so on other platforms.
yumrepo
The client-side description of a yum repository. Repository configurations are found by parsing /etc/yum.conf and the files indicated by reposdir in that file (see yum.conf(5) for details)
Most parameters are identical to the ones documented in yum.conf(5)
Continuation lines that yum supports for example for the baseurl are not supported. No attempt is made to access files included with the include directive
Parameters
baseurl
The URL for this repository. Set this to 'absent' to remove it from the file completely Valid values are absent. Values can match /.*/.
descr
A human readable description of the repository. Set this to 'absent' to remove it from the file completely Valid values are absent. Values can match /.*/.
enabled
Whether this repository is enabled or disabled. Possible values are '0', and '1'. Set this to 'absent' to remove it from the file completely Valid values are absent. Values can match /(0|1)/.
enablegroups
Determines whether yum will allow the use of package groups for this repository. Possible values are '0', and '1'. Set this to 'absent' to remove it from the file completely Valid values are absent. Values can match /(0|1)/.
exclude
List of shell globs. Matching packages will never be considered in updates or installs for this repo. Set this to 'absent' to remove it from the file completely Valid values are absent. Values can match /.*/.
failovermethod
Either 'roundrobin' or 'priority'. Set this to 'absent' to remove it from the file completely Valid values are absent. Values can match /roundrobin|priority/.
gpgcheck
Whether to check the GPG signature on packages installed from this repository. Possible values are '0', and '1'.
Set this to 'absent' to remove it from the file completely Valid values are absent. Values can match /(0|1)/.
gpgkey
The URL for the GPG key with which packages from this repository are signed. Set this to 'absent' to remove it from the file completely Valid values are absent. Values can match /.*/.
include
A URL from which to include the config. Set this to 'absent' to remove it from the file completely Valid values are absent. Values can match /.*/.
includepkgs
List of shell globs. If this is set, only packages matching one of the globs will be considered for update or install. Set this to 'absent' to remove it from the file completely Valid values are absent. Values can match /.*/.
keepalive
Either '1' or '0'. This tells yum whether or not HTTP/1.1 keepalive should be used with this repository. Set this to 'absent' to remove it from the file completely Valid values are absent. Values can match /(0|1)/.
metadata_expire
Number of seconds after which the metadata will expire. Set this to 'absent' to remove it from the file completely Valid values are absent. Values can match /[0-9]+/.
mirrorlist
The URL that holds the list of mirrors for this repository. Set this to 'absent' to remove it from the file completely Valid values are absent. Values can match /.*/.
name
- namevar
The name of the repository.
priority
Priority of this repository from 1-99. Requires that the priorities plugin is installed and enabled. Set this to 'absent' to remove it from the file completely Valid values are absent. Values can match /[1-9][0-9]?/.
protect
Enable or disable protection for this repository. Requires that the protectbase plugin is installed and enabled. Set this to 'absent' to remove it from the file completely Valid values are absent. Values can match /(0|1)/.
proxy
URL to the proxy server for this repository. Set this to 'absent' to remove it from the file completely Valid values are absent. Values can match /.*/.
proxy_password
Password for this proxy. Set this to 'absent' to remove it from the file completely Valid values are absent. Values can match /.*/.
proxy_username
Username for this proxy. Set this to 'absent' to remove it from the file completely Valid values are absent. Values can match /.*/.
timeout
Number of seconds to wait for a connection before timing out. Set this to 'absent' to remove it from the file completely Valid values are absent. Values can match /[0-9]+/.
zfs
Manage zfs. Create destroy and set properties on zfs instances.
Parameters
compression
The compression property.
copies
The copies property.
ensure
The basic property that the resource should be in. Valid values are present, absent.
mountpoint
The mountpoint property.
name
- namevar
The full name for this filesystem. (including the zpool)
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- solaris: Provider for Solaris zfs. Required binaries: /usr/sbin/zfs. Default for operatingsystem == solaris.
quota
The quota property.
reservation
The reservation property.
sharenfs
The sharenfs property.
snapdir
The sharenfs property.
zone
Solaris zones.
Parameters
autoboot
Whether the zone should automatically boot. Valid values are true, false.
create_args
Arguments to the zonecfg create command. This can be used to create branded zones.
ensure
The running state of the zone. The valid states directly reflect the states that zoneadm provides. The states are linear, in that a zone must be configured then installed, and only then can be running. Note also that halt is currently used to stop zones.
id
The numerical ID of the zone. This number is autogenerated and cannot be changed.
inherit
The list of directories that the zone inherits from the global zone. All directories must be fully qualified.
install_args
Arguments to the zoneadm install command. This can be used to create branded zones.
ip
The IP address of the zone. IP addresses must be specified with the interface, separated by a colon, e.g.: bge0:192.168.0.1. For multiple interfaces, specify them in an array.
name
- namevar
The name of the zone.
path
The root of the zone's filesystem. Must be a fully qualified file name. If you include '%s' in the path, then it will be replaced with the zone's name. At this point, you cannot use Puppet to move a zone.
pool
The resource pool for this zone.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- solaris: Provider for Solaris Zones. Required binaries: /usr/sbin/zonecfg, /usr/sbin/zoneadm. Default for operatingsystem == solaris.
realhostname
The actual hostname of the zone.
shares
Number of FSS CPU shares allocated to the zone.
sysidcfg
The text to go into the sysidcfg file when the zone is first booted. The best way is to use a template:
# $templatedir/sysidcfg
system_locale=en_US
timezone=GMT
terminal=xterms
security_policy=NONE
root_password=<%= password %>
timeserver=localhost
name_service=DNS {domain_name=<%= domain %>
name_server=<%= nameserver %>}
network_interface=primary {hostname=<%= realhostname %>
ip_address=<%= ip %>
netmask=<%= netmask %>
protocol_ipv6=no
default_route=<%= defaultroute %>}
nfs4_domain=dynamic
And then call that:
zone { myzone:
ip => "bge0:192.168.0.23",
sysidcfg => template(sysidcfg),
path => "/opt/zones/myzone",
realhostname => "fully.qualified.domain.name"
}
The sysidcfg only matters on the first booting of the zone, so Puppet only checks for it at that time.
zpool
Manage zpools. Create and delete zpools. The provider WILL NOT SYNC, only report differences.
Supports vdevs with mirrors, raidz, logs and spares.
Parameters
disk
The disk(s) for this pool. Can be an array or space separated string
ensure
The basic property that the resource should be in. Valid values are present, absent.
log
Log disks for this pool. (doesn't support mirroring yet)
mirror
List of all the devices to mirror for this pool. Each mirror should be a space separated string. mirror => ["disk1 disk2", "disk3 disk4"]
pool
- namevar
The name for this pool.
provider
このオブジェクトが使用するProviderを明示的に指定します。これを指定する機会は稀でしょう。デフォルトではpuppetがプラットホームに適したProviderを自動的に使用します。有効な値は下記の通りです。
- solaris: Provider for Solaris zpool. Required binaries: /usr/sbin/zpool. Default for operatingsystem == solaris.
raid_parity
Determines parity when using raidz property.
raidz
List of all the devices to raid for this pool. Should be an array of space separated strings. raidz => ["disk1 disk2", "disk3 disk4"]
spare
Spare disk(s) for this pool.
