Requisite of file.append

Posted by Jeff Strunk on Server Fault See other posts from Server Fault or by Jeff Strunk
Published on 2013-07-01T20:55:40Z Indexed on 2013/07/01 23:07 UTC
Read the original article Hit count: 163

Filed under:

Is it possible to make salt require that a particular file was appended to as opposed to the file merely existing?

It seems like I can only require a file state. The source looks like it strips out any method names from a require attribute.

In the example below, I only want the foo service to run if my lines have been appended to /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

© Server Fault or respective owner

Related posts about salt