From bc297acd182c35c0ea090c976c0324f6d533bfd4 Mon Sep 17 00:00:00 2001 From: baldo Date: Sat, 14 Nov 2015 18:38:29 +0100 Subject: [PATCH] =?UTF-8?q?Message=20of=20the=20day=20f=C3=BCr=20Server?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- group_vars/srv.yml | 4 ++++ roles/common/tasks/main.yml | 19 +++++++++++++++++++ roles/common/templates/etc/motd.j2 | 16 ++++++++++++++++ srv02.inventory | 3 +++ 4 files changed, 42 insertions(+) create mode 100644 group_vars/srv.yml create mode 100644 roles/common/templates/etc/motd.j2 diff --git a/group_vars/srv.yml b/group_vars/srv.yml new file mode 100644 index 0000000..1b6ad0b --- /dev/null +++ b/group_vars/srv.yml @@ -0,0 +1,4 @@ +--- + +system: + purpose: "various services" \ No newline at end of file diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index d2a1475..c2725b8 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -1,6 +1,10 @@ --- - name: run apt-get update apt: update_cache=yes + tags: + - common + - packages + - apt - name: install common packages apt: name={{ item }} state=latest @@ -16,3 +20,18 @@ - vim - wget - zsh + tags: + - common + - packages + - apt + +- name: set message of the day + template: > + src=etc/motd.j2 + dest=/etc/motd + mode=0444 + owner=root + group=root + tags: + - common + - motd diff --git a/roles/common/templates/etc/motd.j2 b/roles/common/templates/etc/motd.j2 new file mode 100644 index 0000000..5642f4e --- /dev/null +++ b/roles/common/templates/etc/motd.j2 @@ -0,0 +1,16 @@ +==== THIS IS A SYSTEM FOR {{ system.purpose | upper }} ===== + +FREIFUNK HAMBURG is a non commercial open initiative +to establish a free radio network (WLAN) in the city +of Hamburg. It is part of the international movement +for free and wireless radio networks. + +DO NOT install anything additional here +DO NOT reboot if not necessary +DO NOT work on here + +ENSURE reboot persistency of your configuration +ENSURE safety of your configuration +ENSURE stability of your configuration (no experiments) + +--> THANKS :) diff --git a/srv02.inventory b/srv02.inventory index e80b3d0..333b6e1 100644 --- a/srv02.inventory +++ b/srv02.inventory @@ -3,6 +3,9 @@ srv02 ansible_ssh_host=srv02.hamburg.freifunk.net [ffhh] srv02 +[srv] +srv02 + [ntp] srv02