是否有可能使盐需要附加一个特定的文件,而不是仅仅存在的文件?
看来我只能要求一个file状态。 源代码看起来像去掉了require属性中的任何方法名称。
在下面的例子中,我只想让foo服务运行,如果我的行被添加到/etc/security/limits.conf。
file.append: - name: /etc/security/limits.conf - text: - root hard nofile 65535 - root soft nofile 65535 foo: service.running: - enable: True - require: - file.append: /etc/security/limits.conf
你可以改变一下:
foo_file: file.append: - name: /etc/security/limits.conf - text: - root hard nofile 65535 - root soft nofile 65535 foo: service.running: - enable: True - require: - file: foo_file
这应该做到这一点。