厨师什么时候更新资源



我不太确定厨师何时更新资源。这是我运行的命令和我得到的响应:

sudo chef-client -zr "recipe[workstation]"
[2017-10-03T14:01:26+00:00] WARN: No config file found or specified on command line, using command line options.
Starting Chef Client, version 12.14.89
resolving cookbooks for run list: ["workstation"]
[2017-10-03T14:01:28+00:00] WARN: Cookbook 'cookbooks' is empty or entirely chefignored at /home/centos/cookbooks/cookbooks
Synchronizing Cookbooks:
  - workstation (0.2.1)
Installing Cookbook Gems:
Compiling Cookbooks...
Converging 7 resources
Recipe: workstation::setup
  * yum_package[vim-enhanced] action install (up to date)
  * yum_package[emacs] action install (up to date)
  * yum_package[tree] action install (up to date)
  * yum_package[git] action install (up to date)
  * yum_package[ntp] action install (up to date)
  * template[/etc/motd] action create
    - update content in file /etc/motd from c102c5 to e0c53e
    --- /etc/motd   2017-09-22 16:41:57.273701730 +0000
    +++ /etc/.chef-motd20171003-2405-1ygf6go    2017-10-03 14:01:34.211094244 +0000
    @@ -1,7 +1,7 @@
     This server is the property of Syed
       HOSTNAME: ip-172-31-35-182
       IPADRESS: 172.31.35.182
    -  CPU: 2400.046
    +  CPU: 2400.108
       MEMORY: 1014976kB
       NAME: Syed
    - restore selinux security context
  * service[ntpd] action enable (up to date)
  * service[ntpd] action start
    - start service service[ntpd]
Running handlers:
Running handlers complete
Chef Client finished, 2/8 resources updated in 07 seconds

只是要明确我是厨师的全新B。改变任何东西。任何帮助都会很棒。谢谢。

这个文档对我学习厨师的融合方式有帮助。

https://coderanger.net/two-pass/

此外,看起来您正在使用具有时间戳作为其价值的一部分的模板,因此资源将始终更新。

至于NTPD以及为什么需要重新启动它。.没有任何理由从上次融合到食谱时就不会运行,而服务资源如果不需要任何东西,那么服务资源无济于事做完了。唯一的解释是收敛之间存在一些外部状态变化。服务器重新启动并没有设置NTPD以自动启动,或者某些过程/人员停止了服务。

因为您在谈论可变响应,看到您收到的其他响应的一些示例将很有帮助。但是总的来说,如果您期望收敛之间没有状态变化并且看到资源收敛。

最新更新