cookbook (repository) の作成

[~/chef-test/chef-repo]$ knife cookbook create ope-user -o site-cookbooks
** Creating cookbook ope-user
** Creating README for cookbook: ope-user
** Creating CHANGELOG for cookbook: ope-user
** Creating metadata for cookbook: ope-user
[~/chef-test/chef-repo]$

recipe の作成

実行

[~/chef-test/chef-repo]$ knife solo cook melody
Running Chef on melody...
Checking Chef version...
Uploading the kitchen...
Generating solo config...
Running Chef...
Starting Chef Client, version 11.8.2
Compiling Cookbooks...
Converging 4 resources
Recipe: hello::default
  * log[Hello Knife!] action write

Recipe: ope-user::default
  * user[ope] action create
    - create user user[ope]

  * group[ope] action create
    - alter group group[ope]
    - replace group members with new list of members

  * group[wheel] action modify
    - modify group group[wheel]
    - add missing member(s): ope

Chef Client finished, 4 resources updated
[~/chef-test/chef-repo]$ ssh melody
Last login: Sun Feb 16 11:03:59 2014 from 192.168.38.1
[vagrant@vagrant-centos-6 ~]$ su ope
パスワード:
[ope@vagrant-centos-6 vagrant]$ whoami
ope
[ope@vagrant-centos-6 vagrant]$ groups
ope wheel
[ope@vagrant-centos-6 vagrant]$

git commit

うまく行ったので commit する

[~/chef-test/chef-repo]$ git add .
[~/chef-test/chef-repo]$ git commit -m "add ope-user"

Chef


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS   sitemap
Last-modified: 2014-02-16 (日) 23:17:05 (1023d)
ISBN10
ISBN13
9784061426061