From 8101f4d761ab50c91e931acca0e4d834a8615274 Mon Sep 17 00:00:00 2001 From: L3D Date: Thu, 18 Feb 2021 17:16:14 +0100 Subject: [PATCH] improve exim vars --- .github/galaxy.svg | 445 ++++-------------- .github/workflows/ansible-alpine-latest.yml | 18 - .../workflows/ansible-archlinux-latest.yml | 18 - .github/workflows/ansible-ubuntu-trusty.yml | 18 - README.md | 10 +- defaults/main.yml | 9 +- tasks/installation.yml | 7 + vars/Debian.yml | 1 + vars/RedHat.yml | 1 + vars/default.yml | 1 + vars/main.yml | 2 +- 11 files changed, 104 insertions(+), 426 deletions(-) delete mode 100644 .github/workflows/ansible-alpine-latest.yml delete mode 100644 .github/workflows/ansible-archlinux-latest.yml delete mode 100644 .github/workflows/ansible-ubuntu-trusty.yml diff --git a/.github/galaxy.svg b/.github/galaxy.svg index 90acf04..23c4fca 100644 --- a/.github/galaxy.svg +++ b/.github/galaxy.svg @@ -1,366 +1,81 @@ - - - - - - - image/svg+xml - - - - - - 3D <l3d@c3woc.de> - - - - - MIT License - - - - - - - - - - - - - - - - - - - - - - - - MIT - MIT - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - do1jlr.role_name - do1jlr.role_name - + + + + + + + image/svg+xml + + + + + + 3D <l3d@c3woc.de> + + + + + MIT License + + + + + + + + + + + + + + + + + + + + + + MIT + MIT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + do1jlr.exim4 + do1jlr.exim4 + diff --git a/.github/workflows/ansible-alpine-latest.yml b/.github/workflows/ansible-alpine-latest.yml deleted file mode 100644 index 07bfff0..0000000 --- a/.github/workflows/ansible-alpine-latest.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Ansible check alpine:latest - -# yamllint disable-line rule:truthy -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: ansible check with alpine:latest - uses: roles-ansible/check-ansible-alpine-latest-action@master - with: - targets: "./" diff --git a/.github/workflows/ansible-archlinux-latest.yml b/.github/workflows/ansible-archlinux-latest.yml deleted file mode 100644 index e823f0c..0000000 --- a/.github/workflows/ansible-archlinux-latest.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Ansible check archlinux:latest - -# yamllint disable-line rule:truthy -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: ansible check with archlinux:latest - uses: roles-ansible/check-ansible-archlinux-latest-action@master - with: - targets: "./" diff --git a/.github/workflows/ansible-ubuntu-trusty.yml b/.github/workflows/ansible-ubuntu-trusty.yml deleted file mode 100644 index 6cde8b8..0000000 --- a/.github/workflows/ansible-ubuntu-trusty.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Ansible check ubuntu:trusty - -# yamllint disable-line rule:truthy -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: ansible check with ubuntu:trusty - uses: roles-ansible/check-ansible-ubuntu-trusty-action@master - with: - targets: "./" diff --git a/README.md b/README.md index 7f8d54d..9b336d4 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,13 @@ To do this you have at leaset set the smarthost FQDN in the variable: ``exim4__d exim4__dc_smarthost: mx01.example.com ``` + Test if it is working +--------------------- +To test if your exim4 configuration is working, maybe this will help: +``` +mail': echo "This is a test" | mailx -s "Test Message" -v you@example.com +``` + Testing ---------- This role is tested with [these github-action](https://github.com/search?q=topic%3Acheck-ansible+topic%3Agithub-actions+org%3Aroles-ansible&type=Repositories) tests for different versions of differen linux systems. Linting is tested via travis-ci and the [ansible-lint action](https://github.com/marketplace/actions/ansible-lint). @@ -32,11 +39,8 @@ If you want to find out more about our tests, please have a look at the github m | [![Ansible check debian:buster](https://github.com/do1jlr/ansible_role_exim4/workflows/Ansible%20check%20debian:buster/badge.svg)](https://github.com/do1jlr/ansible_role_exim4/actions?query=workflow%3A%22Ansible+check+debian%3Abuster%22) | [ansible test with debian buster](https://github.com/marketplace/actions/check-ansible-debian-buster) | | [![Ansible check debian:stretch](https://github.com/do1jlr/ansible_role_exim4/workflows/Ansible%20check%20debian:stretch/badge.svg)](https://github.com/do1jlr/ansible_role_exim4/actions?query=workflow%3A%22Ansible+check+debian%3Astretch%22) | [ansible test with debian stretch](https://github.com/marketplace/actions/check-ansible-debian-stretch) | | | | -| [![Ansible check archlinux:latest](https://github.com/do1jlr/ansible_role_exim4/workflows/Ansible%20check%20archlinux:latest/badge.svg)](https://github.com/do1jlr/ansible_role_exim4/actions?query=workflow%3A%22Ansible+check+archlinux%3Alatest%22) | [ansible test with archlinux latest](https://github.com/marketplace/actions/check-ansible-archlinux-latest) | -| | | | [![Ansible check ubuntu:latest](https://github.com/do1jlr/ansible_role_exim4/workflows/Ansible%20check%20ubuntu:latest/badge.svg)](https://github.com/do1jlr/ansible_role_exim4/actions?query=workflow%3A%22Ansible+check+ubuntu%3Alatest%22) | [ansible test with ubuntu latest](https://github.com/marketplace/actions/check-ansible-ubuntu-latest) | | [![Ansible check ubuntu:bionic](https://github.com/do1jlr/ansible_role_exim4/workflows/Ansible%20check%20ubuntu:bionic/badge.svg)](https://github.com/do1jlr/ansible_role_exim4/actions?query=workflow%3A%22Ansible+check+ubuntu%3Abionic%22) | [ansible test with ubuntu bionic](https://github.com/marketplace/actions/check-ansible-ubuntu-bionic) | -| [![Ansible check ubuntu:trusty](https://github.com/do1jlr/ansible_role_exim4/workflows/Ansible%20check%20ubuntu:trusty/badge.svg)](https://github.com/do1jlr/ansible_role_exim4/actions?query=workflow%3A%22Ansible+check+ubuntu%3Atrusty%22) | [ansible test with ubuntu trusty](https://github.com/marketplace/actions/check-ansible-ubuntu-trusty) | | | | | [![Ansible check centos:latest](https://github.com/do1jlr/ansible_role_exim4/workflows/Ansible%20check%20centos:latest/badge.svg)](https://github.com/do1jlr/ansible_role_exim4/actions?query=workflow%3A%22Ansible+check+centos%3Alatest%22) | [ansible test with centos latest](https://github.com/marketplace/actions/check-ansible-centos-latest) | | [![Ansible check centos:centos8](https://github.com/do1jlr/ansible_role_exim4/workflows/Ansible%20check%20centos:centos8/badge.svg)](https://github.com/do1jlr/ansible_role_exim4/actions?query=workflow%3A%22Ansible+check+centos%3Acentos8%22) | [ansible test with centos centos8](https://github.com/marketplace/actions/check-ansible-centos-centos8) | diff --git a/defaults/main.yml b/defaults/main.yml index 84eb67e..fac1bb3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,13 +2,16 @@ exim4__state: present # please set the smarthost you wnt to use to send mails -exim4__dc_smarthost: "{{sansible_fqdn }}" +exim4__dc_smarthost: "{{ ansible_fqdn }}" + +# do we really want mailx ti be installed? +exim4__install_mailx: true # you can adjust the other exim4 settings, if you want exim4__dc_eximconfig_configtype: 'satellite' -exim4__dc_other_hostnames: "{{ hostname }}" +exim4__dc_other_hostnames: "{{ ansible_hostname }}" exim4__dc_local_interfaces: '127.0.0.1 ; ::1' -exim4__dc_readhost: "{{ hostname }}" +exim4__dc_readhost: "{{ ansible_hostname }}" exim4__dc_relay_domains: '' exim4__dc_minimaldns: false exim4__dc_relay_nets: '' diff --git a/tasks/installation.yml b/tasks/installation.yml index 2d17bcd..90cc6b2 100644 --- a/tasks/installation.yml +++ b/tasks/installation.yml @@ -12,3 +12,10 @@ ansible.builtin.package: name: "{{ exim4__package }}" state: "{{ exim4__state }}" + +- name: install mailx + become: true + ansible.builtin.package: + name: "{{ exim4__mailx_package }}" + state: "{{ exim4__state }}" + when: exim4__install_mailx | bool diff --git a/vars/Debian.yml b/vars/Debian.yml index 52807fa..4904de1 100644 --- a/vars/Debian.yml +++ b/vars/Debian.yml @@ -2,3 +2,4 @@ exim4__package: exim4 exim4__daemon: exim4 exim4__configuration_file: /etc/exim4/update-exim4.conf.conf +exim4__mailx_package: mailx-bsd diff --git a/vars/RedHat.yml b/vars/RedHat.yml index cf0420e..672e5fd 100644 --- a/vars/RedHat.yml +++ b/vars/RedHat.yml @@ -2,3 +2,4 @@ exim4__package: exim exim4__daemon: exim exim4__configuration_file: /etc/exim/exim.conf +exim4__mailx_package: mailx diff --git a/vars/default.yml b/vars/default.yml index 52807fa..ff2f469 100644 --- a/vars/default.yml +++ b/vars/default.yml @@ -2,3 +2,4 @@ exim4__package: exim4 exim4__daemon: exim4 exim4__configuration_file: /etc/exim4/update-exim4.conf.conf +exim4__mailx_package: mailutils diff --git a/vars/main.yml b/vars/main.yml index ca598bc..f109669 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,4 +1,4 @@ --- # versionscheck -playbook_version_number: 02 # should be a integer +playbook_version_number: 4 # should be a integer playbook_version_path: 'do1jlr.exim4_smarthost.version'