为什么Puppet需要两次运行来更新bash?

林学习木偶,我试图更新bash(没有猜测为什么奖品)。

这是在我的site.pp

file { "/etc/apt/sources.list.d/shellshock.list": source => "puppet:///files/shellshock.list", owner => "root", group => "root", mode => "0644", ensure => present, } -> exec { "instantRepoUpdate": command => "/usr/bin/aptitude update", refreshonly => true, } -> package {"bash": ensure => latest, } 

从什么我在这里读取https://docs.puppetlabs.com/puppet/latest/reference/lang_relationships.html这应该转化为:

安装/etc/apt/sources.list.d/shellshock.list ,然后运行aptitude update,然后确保bash是最新版本

它确实,但只有两个代理运行。 我希望它在一次运行中按顺序执行所有三个操作。

更新:我已经尝试添加“要求=”Exec [..,要求=>文件[…]的EXEC和包资源,我得到了相同的结果。

您设置了refreshonly => true ,因此您需要使用通知箭头( ~> )。