summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruvok cheetah2024-04-02 17:10:41 +0200
committeruvok cheetah2024-04-02 17:10:41 +0200
commitaaaa51c97edcb16481361be702fc08e895172008 (patch)
treefba32dc24e7dc68cb8325d84647a1ca40a141c9c
parentfa6b28ee53941d99e5a567ef057a87c6f5973f48 (diff)
Install nullmailer and unattended-upgrades
-rw-r--r--group_vars/server1
-rw-r--r--host_vars/gcloud-an1
-rw-r--r--roles/common/tasks/main.yml9
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