-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Closed
Milestone
Description
Running salt 0.9.5 on master and client with a simple sate file like the following
postfix:
pkg:
- installed
service:
- enable: True
- running
- watch:
- file: /etc/postfix/main.cf
/etc/postfix/main.cf:
file:
- managed
- source: salt://pbx/postfix/main.cf
- template: jinja
- mode: 644
- require:
- pkg: postfix
A trivial change to the main.cf file produces the following output:
----------
State: - file
Name: /etc/postfix/main.cf
Function: managed
Result: True
Comment: File /etc/postfix/main.cf updated
Changes: diff: ---
+++
@@ -1,3 +1,4 @@
+#Test
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
----------
State: - service
Name: postfix
Function: running
Result: True
Comment: Service restarted
Changes: postfix: True
However is you add a requires declaration for the postfix service state then the service no longer restarts.
State file:
postfix:
pkg:
- installed
service:
- enable: True
- running
- require:
- pkg: postfix
- watch:
- file: /etc/postfix/main.cf
/etc/postfix/main.cf:
file:
- managed
- source: salt://pbx/postfix/main.cf
- template: jinja
- mode: 644
- require:
- pkg: postfix
Output:
----------
State: - file
Name: /etc/postfix/main.cf
Function: managed
Result: True
Comment: File /etc/postfix/main.cf updated
Changes: diff: ---
+++
@@ -1,4 +1,3 @@
-#Test
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
Metadata
Metadata
Assignees
Labels
No labels