Add postfix conf
This commit is contained in:
parent
3e52539d69
commit
579d4b6a47
1 changed files with 28 additions and 2 deletions
|
@ -56,12 +56,38 @@ systemd.service(
|
|||
|
||||
apt.packages(
|
||||
name='Install packages',
|
||||
packages=['zfsutils-linux', 'manpages', 'man', 'snapd', 'vim', 'file',
|
||||
packages=['manpages', 'man', 'snapd', 'vim', 'file',
|
||||
'parted', 'htop', 'ncdu', 'byobu', 'tcpdump', 'lm-sensors', 'iotop',
|
||||
'strace', 'lsof', 'iftop', 'haveged'],
|
||||
'strace', 'lsof', 'iftop', 'haveged', 'postfix'],
|
||||
update=False,
|
||||
)
|
||||
|
||||
files.line(
|
||||
name='Enable postfix relays to mail.benpro.fr',
|
||||
path='/etc/postfix/main.cf',
|
||||
line=r'relayhost = .*',
|
||||
replace='relayhost = 10.0.0.2',
|
||||
)
|
||||
|
||||
files.line(
|
||||
name='Set root aliases',
|
||||
path='/etc/aliases',
|
||||
line='root: lxd10@benpro.fr',
|
||||
)
|
||||
|
||||
server.shell(
|
||||
name='Load aliases table',
|
||||
commands=['newaliases'],
|
||||
)
|
||||
|
||||
systemd.service(
|
||||
name='Restart and enable postfix service',
|
||||
service='postfix.service',
|
||||
running=True,
|
||||
restarted=True,
|
||||
enabled=True,
|
||||
)
|
||||
|
||||
if not host.fact.directory('/var/snap/lxd'):
|
||||
server.shell(
|
||||
name='Install lxd',
|
||||
|
|
Reference in a new issue