タグ

関連タグで絞り込む (2)

タグの絞り込みを解除

attributesと動的に関するtmsanrinshaのブックマーク (1)

  • ChefでデフォルトのAttributesを動的に設定する方法 - wadahiroの日記

    ChefのAttributesで悩んだことがあったのでメモ。結論から言うと、AttributeファイルではできなくてRecipe内で定義するしかなさそう。 説明のために、Chefで構築するソフトウェアが以下のディレクトリ構造であるとする。 /opt +-sample ・・・インストール先のベースディレクトリ +-bin +-data ・・・仮想のソフトウェアのデータディレクトリ +-logs ・・・仮想のソフトウェアのログ出力ディレクトリ このソフトウェアのインストール先、データディレクトリ、ログ出力先をAttributesでパラメタ化する。Attributeを素直に書くとこうなる。 sample/attributes/default.rb default[:sample][:base_dir] = "/opt/sample" default[:sample][:data_dir] = "

    ChefでデフォルトのAttributesを動的に設定する方法 - wadahiroの日記
    tmsanrinsha
    tmsanrinsha 2016/10/19
    node.defaultにする必要あり?
  • 1