Puppet の Augeas を使用して carbon.conf ファイルの内容を管理したいと考えています。以前、Puppet で xml ファイルを管理するために Augeas を使用したことがありますが、うまく機能しました。
ただし、今回は puppet カタログが適用されても、carbon.conf ファイルには何も起こりません。ログにもエラーはありません。パペットマニフェストファイルのコードは次のとおりです。
augeas { 'cache config':
notify => Service[carbon-cache],
incl => '/opt/graphite/conf/carbon.conf',
context => '/cache',
lens => 'Carbon.lns',
changes => [
"set UDP_RECEIVER_PORT 2013",
"set LINE_RECEIVER_PORT 2013",
"set PICKLE_RECEIVER_PORT 2014",
];
}
デバッグ ログには、次の内容が表示されます。
Debug: Augeas[cache config](provider=augeas): Opening augeas with root /, lens path /var/lib/puppet/lib/augeas/lenses, flags 64
Debug: Augeas[cache config](provider=augeas): Augeas version 1.0.0 is installed
Debug: Augeas[cache config](provider=augeas): Will attempt to save and only run if files changed
Debug: Augeas[cache config](provider=augeas): sending command 'set' with params ["/cache/UDP_RECEIVER_PORT", "2013"]
Debug: Augeas[cache config](provider=augeas): sending command 'set' with params ["/cache/LINE_RECEIVER_PORT", "2013"]
Debug: Augeas[cache config](provider=augeas): sending command 'set' with params ["/cache/PICKLE_RECEIVER_PORT", "2014"]
Debug: Augeas[cache config](provider=augeas): Skipping because no files were changed
Debug: Augeas[cache config](provider=augeas): Closed the augeas connection
ここで何が欠けていますか?
augtool
コマンドラインから使用すると、コマンドls /files/
は次のフォルダーのみをリストすることにも気付きました
augtool> ls /files/
etc/ = (none)
usr/ = (none)
boot/ = (none)
ここも見/opt
たかった…。