LoginSignup
1

More than 5 years have passed since last update.

Puppet 4.4 リリースノート ピックアップ

Last updated at Posted at 2016-09-13

Puppet4.4.0(2016/3/16リリース)の、リリースノートで個人的に気になる変更をピックアップしてみました。動作確認とかはしてないので、間違っている部分があればご指摘ください。

4.4では、機能追加が多めです。

この投稿時点で、すでに4.6が出ています。
過去バージョンでの変更のフォロー用です。

Puppet 4.4.0

Released March 16, 2016.

New features

Iterable and Iterator Types added

PUP-5730

指定の間隔nで繰り返す、step関数が追加されました。

PUP-5730: The iterative function an_iterable.step(n) has been added. It yields every nth successor from its input iterable when chained into another function. (後略...)

配列での利用例が、Function Referenceの方に記載されています。
data配列の要素を先頭から、3個間隔で処理する例です。

# For the array $data, call a block with the first element and then with each 3rd successor element
$data = [1,2,3,4,5,6,7,8]
$data.step(3) |$item| {
 notice($item)
}
# Puppet notices the values '1', '4', '7'.

Arrays from Iterator values with splat

PUP-5836

ループ処理に使う配列が簡単に用意できる、*(splat operator)が追加されました。

PUP-5836: It is possible to produce an Array from Iterator values by using the splat operator. As an example the expression:

*[1,2,3].reverse_each 
# produces [3,2,1] 

Misc new features and behaviors

PUP-5729

逆順に繰り返す、reverse_each関数が追加されました。

PUP-5729: The function reverse_each has been added. It works similar to the each function but iterates over elements in reverser order. (後略...)

配列での利用例が、Function Referenceの方に記載されています。
data配列の要素を、後ろから順に処理する例です。

# Puppet will log a notice for each of the three items
# in $data in reverse order.
$data = [1,2,3]
$data.reverse_each |$item| { notice($item) }

逆順なので、3,2,1です。

PUP-1376

定義の一部をスキップするskip_tags設定が追加されました。

PUP-1376: This adds a new skip_tags setting, as a compliment to the tags setting. This new setting allows skipping resources based on tags, and is applied before the tags setting is applied.

使い方は、以前試した投稿をご参考に。
Puppetで定義の一部を無効化するskip_tags

PUP-5608

非推奨ながらRuby 2.3をサポート。

PUP-5608: This adds initial Ruby 2.3 support. However, note that using Puppet with 2.3.0 is not yet recommended.

PUP-1072

fileリソースで、source属性にURLを設定できるようになりました。HTTPやHTTPS経由で直接ファイル取得できます。

PUP-1072: This adds support for ‘http’ and ‘https’ URLS as source attributes to the file resource.

使い方は、以前試した投稿をご参考に。
Puppet4.xではじめるサーバ設定自動化 7(ファイル変更)

PUP-4748

(マスター側にないファイルを削除する)purge属性で変更があったときに、依存関係を定義しているリソースにイベントが通知されるようになりました。

PUP-4748: It’s now possible to purge a resource that has downstream dependents, such as notifying a service to restart. This reinstates behavior that was possible prior to PUP-1963.

Bug Fixes

環境によっては、影響ありそうなバグがいくつか修正されているようです。
細かいので省略。

Puppet 4.4.1

Released March 24, 2016.

Enhancements

PUP-5877

Hieraのファイルに記載する値に、.(ドット)が使えるようになりました。(どんな場面で使うかは不明。Facter?)

PUP-5877: Hiera data files that provide values at the environment and module levels can now provide values from variables with a . in their names, provided that name is properly quoted. For example, this value from production/data/common.yaml is now legal:

    env_production_hardware_platform: "%{'hardware.platform'}"

その他、バグ修正は省略。

Puppet 4.4.2

Released April 26, 2016.

セキュリティ関連の修正(CVE-2016-2785)とバグ修正

参考

Puppet 4.4 Release Notes
https://docs.puppet.com/puppet/4.4/reference/release_notes.html

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1