Chef リポジトリ作成
Chef リポジトリ作成
ワークステーションにて「chef generate repo」コマンドで chef-repo を作成し、以降の作業ディレクトリとします。
$ chef generate repo chef-repo
chef-repo を生成すると下記のようなディレクトリ構成になります。
chef-repo
├── .gitignore
├── LICENSE
├── README.md
├── chefignore
├── cookbooks
│ └── README.md
├── data_bags
│ └── README.md
├── environments
│ └── README.md
└── roles
└── README.md
git init されている状態なのでコミットをしておきましょう。
$ git add .
$ git commit -m 'initial commit'
Knife Zero の設定ファイル作成
chef-repo 直下に knife.rb を配置します。
local_mode true
chef_repo_path File.expand_path('../', __FILE__)
knife[:ssh_attribute] = "knife_zero.host"
knife[:use_sudo] = true
knife[:automatic_attribute_whitelist] = %w[
chef_packages
hostname
ipaddress
os
os_version
platform
platform_version
]
Author And Source
この問題について(Chef リポジトリ作成), 我々は、より多くの情報をここで見つけました https://qiita.com/okinaka/items/7dc9e0a2cf3e02804653著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .