我在我的后缀sls中pipe理main.cfconfiguration文件。 如果同一个爪子也分配了amavis状态,则content_filter = smtp-amavis:[127.0.0.1]:10024应该被追加到托pipe的main.cf文件中。
我的后缀sls看起来像这样:
/etc/postfix/main.cf: file.managed: - template: jinja - source: salt://postfix/files/etc/postfix/main.cf
在我的amaviss sls中 ,我尝试附加上述行:
/etc/postfix/main.cf-amavis: file.append: - name: /etc/postfix/main.cf - text: "content_filter = smtp-amavis:[127.0.0.1]:10024" - require_in: - file: /etc/postfix/main.cf
然而, append发生之前manage而不是执行它,反之亦然。
Name: /etc/postfix/main.cf - Function: file.append - Result: Changed Name: /etc/postfix/main.cf - Function: file.managed - Result: Changed
将内容追加到托pipe文件的正确方法是什么? 还是有另一种方法来解决我的问题?
你要不要require_in :
/etc/postfix/main.cf-amavis: file.append: - name: /etc/postfix/main.cf - text: "content_filter = smtp-amavis:[127.0.0.1]:10024" - require: - file: /etc/postfix/main.cf