Skip to content

iomarian/ansible-freebsd-mailserver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

freebsd_mailserver

Build Status

Ansible role. FreeBSD. Install and configure Postfix and Dovecot2.

Requirements

No requiremenst.

Variables

TBD. Review the defaults and examples in vars.

Workflow

  1. Change shell to /bin/sh.
# ansible mailserver -e 'ansible_shell_type=csh ansible_shell_executable=/bin/csh' -a 'sudo pw usermod freebsd -s /bin/sh'
  1. Install role.
# ansible-galaxy install vbotka.freebsd_mailserver
  1. Fit variables.
# editor vbotka.freebsd_mailserver/vars/main.yml
  1. Create playbook and inventory.
# cat freebsd-mailserver.yml

- hosts: mailserver
  roles:
    - vbotka.freebsd-mailserver
# cat hosts
[mailserver]
<mailserver-ip-or-fqdn>
[mailserver:vars]
ansible_connection=ssh
ansible_user=freebsd
ansible_become=yes
ansible_become_method=sudo
ansible_python_interpreter=/usr/local/bin/python3.6
ansible_perl_interpreter=/usr/local/bin/perl
  1. Install and configure the mailserver.
# ansible-playbook freebsd-mailserver.yml
  1. Consider to test the mailserver with http://mxtoolbox.com/

Check mode

Create default configuration files of Dovecot to avoid error missing files

# ansible-playbook freebsd-mailserver.yml -t dovecot_example_conf

Then run the check-mode

# ansible-playbook freebsd-mailserver.yml --check

License

license

Author Information

Vladimir Botka

References

About

Ansible role. Install and configure postfix and dovecot2 with FreeBSD.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors