From c780cb96f28fc5d3a9cedb81d5e2c9de8513cf16 Mon Sep 17 00:00:00 2001 From: "Glenn K. Lockwood" Date: Sun, 26 Jul 2020 21:26:36 -0700 Subject: [PATCH] add motd; fix warning in ufw enablement --- roles/common/tasks/main.yml | 13 +++++++++++-- roles/common/templates/etc/motd | 7 +++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 roles/common/templates/etc/motd diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 512a755..23b4cd5 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -89,6 +89,15 @@ - include: darshan-dev.yml when: "'darshan_dev' in myconfig and myconfig.darshan_dev" +# Install motd +- name: install MOTD + template: + src: etc/motd + dest: /etc/motd + owner: root + group: root + mode: "0644" + # Configure firewall - name: allow SSH through UFW ufw: @@ -132,7 +141,7 @@ - name: enable UFW ufw: - state: enabled - logging: yes + state: "enabled" + logging: "on" tags: - ufw diff --git a/roles/common/templates/etc/motd b/roles/common/templates/etc/motd new file mode 100644 index 0000000..688c467 --- /dev/null +++ b/roles/common/templates/etc/motd @@ -0,0 +1,7 @@ + +{{ myconfig.hostname }} +{{ ansible_processor_count }} core{% if ansible_processor_count > 1 %}s +{% endif %} +{{ ansible_memtotal_mb }} MB RAM +{{ ansible_lsb.description }} +--------------------------------------------------------------------------------