Skip to content

Commit

Permalink
more mail related settings
Browse files Browse the repository at this point in the history
  • Loading branch information
DO1JLR committed Jan 2, 2021
1 parent f44fc92 commit 17be481
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions roles/mailserver_preperation/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]}

0 comments on commit 17be481

Please sign in to comment.