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:
parent
f44fc92c76
commit
17be4811b6
2 changed files with 21 additions and 0 deletions
20
roles/mailserver_preperation/tasks/main.yml
Normal file
20
roles/mailserver_preperation/tasks/main.yml
Normal 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 }}"
|
1
site.yml
1
site.yml
|
@ -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]}
|
||||
|
|
Loading…
Reference in a new issue