diff options
author | binary <me@rgoncalves.se> | 2020-11-19 14:13:28 +0100 |
---|---|---|
committer | binary <me@rgoncalves.se> | 2020-11-19 14:13:28 +0100 |
commit | 75b32e60aad2bc2d8d1746be1dbc6d6bf422592e (patch) | |
tree | a15f397fbbbf2de579786ed30214411c62dbab35 /roles/common | |
parent | 97f201deb22f11acc22dda5368c365701b5caa5f (diff) | |
download | infrastructure-75b32e60aad2bc2d8d1746be1dbc6d6bf422592e.tar.gz |
Move roles functionnality in sub-roles
Diffstat (limited to 'roles/common')
-rw-r--r-- | roles/common/tasks/main.yml | 15 | ||||
-rw-r--r-- | roles/common/templates/motd.j2 | 13 |
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 }} + |