Closed fzipi closed 4 years ago
@fzipi Do you know what the contents of /var/adm/postfix.configured
need to be to prevent this from happening?
@myii The file just need to exist (it is a lock).
It is called by /etc/postfix/system/config_postfix
:
#!/bin/bash
if [ ! -e /var/adm/postfix.configured ]; then
echo "First configuration of postfix"
/usr/sbin/config.postfix
touch /var/adm/postfix.configured
fi
So we just need to have that file managed.
Another file that may have impact is /etc/sysconfig/mail
:
## Path: Network/Mail/General
## Description: Basic general MTA configuration
## Type: yesno
## Default: yes
## Config: postfix,sendmail
#
# If you don't want to let SuSEconfig generate your
# configuration file, set this to no
#
MAIL_CREATE_CONFIG="yes"
Maybe we want to disable that one also...
@myii The file just need to exist (it is a lock). ... So we just need to have that file managed.
Another file that may have impact is
/etc/sysconfig/mail
:... # If you don't want to let SuSEconfig generate your # configuration file, set this to no ...
Maybe we want to disable that one also...
@fzipi Ah, OK. Hopefully this is straightforward, then.
Fixed by #112, thanks @fzipi.
Your setup
Formula commit hash / release tag
1.0.1
Versions reports (master & minion)
Pillar / config used
test/salt/pillar/default.sls
Bug details
Describe the bug
Suse resets salt configuration if file
/var/adm/postfix.configured
in not present.Before starting the service, systemd startup script will:
And
/etc/postfix/system/config_postfix
will execute all defaults for OpenSuse, effectively rewriting salt written config.Steps to reproduce the bug
Problem started when including OpenSuse as test platform.
Expected behaviour
Config properly written, and tests verify configuration.
Attempts to fix the bug
Additional context
This is happening while adding inspec tests in PR #108 .