adds motd task

This commit is contained in:
2025-02-02 21:58:54 +01:00
parent c08b8481f7
commit 77fbef0447
5 changed files with 10 additions and 3 deletions
+2 -2
View File
@@ -1,3 +1,3 @@
[submodule "files/motd"]
path = files/motd
[submodule "motd"]
path = tasks/motd
url = gitea@git.hoekveen.net:mark/motd.git
Submodule files/motd deleted from 9614418079
+1
View File
@@ -32,6 +32,7 @@
- (inventory_hostname in groups['home'] and (item in groups['home'] or item in groups['cloud'])) or
(inventory_hostname not in groups['home'] and item in groups['cloud'])
with_items: "{{ groups.all }}"
- import_tasks: tasks/motd.yml
- name: Update Debian hosts
hosts: debian
become: true
Submodule
+1
Submodule tasks/motd added at 3e07a8e03f
+6
View File
@@ -0,0 +1,6 @@
- name: Copy motd
copy:
content: "{{ lookup('file', 'motd/titles/' + inventory_hostname, errors='ignore') | default('') }}"
dest: /etc/motd
mode: "0644"
ignore_errors: true