1
0
Fork 0
mirror of https://github.com/DO1JLR/ansible_playbook_servers.git synced 2024-09-14 19:53:56 +02:00

more mail related settings

This commit is contained in:
L3D 2021-01-02 02:26:33 +01:00
parent f44fc92c76
commit 17be4811b6
Signed by: l3d
GPG key ID: CD08445BFF4313D1
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,20 @@
---
- name: "set {{ inventory_hostname }} as hostname"
become: true
hostname:
name: "{{ inventory_hostname }}"
- name: Add hostname to /etc/hosts
become: true
lineinfile:
dest: /etc/hosts
regexp: "^127.0.1.1"
line: "127.0.1.1 {{ inventory_hostname }} {{ ansible_hostname }}"
state: present
- name: Set /etc/mailname
become: true
copy:
dest: "/etc/mailname"
content: "{{ inventory_hostname }}"

View file

@ -29,5 +29,6 @@
- name: deploy mail config
hosts: mail
roles:
- { role: mailserver_preperation, tags: [mail,mailserver_preperation,prep,mailserver]}
- { role: robertdebock.dovecot, tags: [mail,postfix]}
# - { role: dovecot, tags: [mail,dovecot]}