diff options
-rw-r--r-- | group_vars/server | 1 | ||||
-rw-r--r-- | host_vars/gcloud-an | 1 | ||||
-rw-r--r-- | roles/common/tasks/main.yml | 9 |
3 files changed, 11 insertions, 0 deletions
diff --git a/group_vars/server b/group_vars/server index 83f9955..f0e54f1 100644 --- a/group_vars/server +++ b/group_vars/server @@ -1,2 +1,3 @@ ansible_user: root ansible_become: false +mail_nullmailer: true diff --git a/host_vars/gcloud-an b/host_vars/gcloud-an index 80ad979..afc85f1 100644 --- a/host_vars/gcloud-an +++ b/host_vars/gcloud-an @@ -1,2 +1,3 @@ ansible_become_pass: "{{ mypass }}" ansible_user: ansible +mail_nullmailer: false diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 627190f..20d7ddf 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -9,4 +9,13 @@ - bind9-dnsutils - ldnsutils - htop + - unattended-upgrades state: present +- name: Install mailer + package: + name: + - nullmailer + state: present + when: + - mail_nullmailer is defined + - mail_nullmailer |