Closed ghost closed 6 years ago
@jwhite530 I'm having a hard time replicating this as shown below:
ch3ll@thecakeisalie ~/docker/37187 docker run -it -v /home/ch3ll/git/salt/:/testing/ ch3ll/issues:37197 /bin/bash
[root@6701e73865eb /]# salt-call --local state.sls test
[WARNING ] /testing/salt/grains/core.py:1493: DeprecationWarning: The "osmajorrelease" will be a type of an integer.
local:
----------
ID: /etc/postfix/main.cf
Function: file.append
Result: True
Comment: Appended 1 lines
Started: 20:07:43.782199
Duration: 7.364 ms
Changes:
----------
diff:
---
+++
@@ -677,3 +677,4 @@
# readme_directory: The location of the Postfix README files.
#
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
+relayhost = smtp.wsu.edu
Summary for local
------------
Succeeded: 1 (changed=1)
Failed: 0
------------
Total states run: 1
Total run time: 7.364 ms
[root@6701e73865eb /]# salt-call --local state.sls test
[WARNING ] /testing/salt/grains/core.py:1493: DeprecationWarning: The "osmajorrelease" will be a type of an integer.
local:
----------
ID: /etc/postfix/main.cf
Function: file.append
Result: True
Comment: File /etc/postfix/main.cf is in correct state
Started: 20:07:51.831142
Duration: 5.396 ms
Changes:
Summary for local
------------
Succeeded: 1
Failed: 0
------------
Total states run: 1
Total run time: 5.396 ms
Also here is a docker container fo my test case:
docker run -it -v /home/ch3ll/git/salt/:/testing/ ch3ll/issues:37197 salt-call --local state.sls test
(where /home/ch3ll/git/salt/ is a local git clone repo of salt)Can you share a sanitized version of the postfix file that is causing issues. I simply did a yum install postfix
and used the default postfix file.Or provide any other information to help me replicate this issue or point out where my test case is incorrect. Thanks
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Description of Issue/Question
I created this state:
When I apply the state I can lots of things are being changed in it which should not be:
Why? This causes the state to make changes every time it is applied although the text it should simply be appending is already appended. The end result is correct, the file does have the text appended to it.
Versions Report