aboutsummaryrefslogtreecommitdiffstats
path: root/roles/common
diff options
context:
space:
mode:
Diffstat (limited to 'roles/common')
-rw-r--r--roles/common/tasks/main.yml15
-rw-r--r--roles/common/templates/motd.j213
2 files changed, 21 insertions, 7 deletions
diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml
index 6e816c7..5dca08d 100644
--- a/roles/common/tasks/main.yml
+++ b/roles/common/tasks/main.yml
@@ -27,13 +27,14 @@
group: "{{ group_root }}"
mode: 0644
+- name: copy motd configuration file
+ template:
+ src: motd.j2
+ dest: /etc/motd
+ owner: root
+ group: "{{ group_root }}"
+ mode: 0644
+
- name: synchronize host hostname with config hostname
hostname: name="{{ inventory_hostname }}"
-- name: retrieve all users
- shell: awk -F ":" '{ if($3 == 0 || $3 > 999 && $3 < 16000) { print $1 }}' /etc/passwd
- register: valid_users_shell
-
-- name: change shell to zsh for all valid users
- user: name="{{ item }}" shell="{{ path_zsh }}"
- loop: "{{ valid_users_shell.stdout_lines }}"
diff --git a/roles/common/templates/motd.j2 b/roles/common/templates/motd.j2
new file mode 100644
index 0000000..8090ab0
--- /dev/null
+++ b/roles/common/templates/motd.j2
@@ -0,0 +1,13 @@
+{% set sep = "▍" %}
+
+ {{ sep }} rgoncalves.se network
+ {{ sep }}
+ {{ sep }} support : support@rgoncalves.se
+ {{ sep }} look for changes : git.rgoncalves.se
+
+ {{ sep }} system
+ {{ sep }}
+ {{ sep }} hostname : {{ ansible_hostname }}
+ {{ sep }} distribution : {{ ansible_distribution }} {{ ansible_distribution_version }}
+ {{ sep }} kernel revision : {{ ansible_kernel }} {{ ansible_kernel_version }}
+
remember that computers suck.