From d607fd2bbd87b5c485a2da961bd03a0d1ae2edcd Mon Sep 17 00:00:00 2001 From: binary Date: Wed, 2 Dec 2020 18:45:55 +0100 Subject: Make tasks more dependant with ansible_facts --- roles/common/tasks/main.yml | 2 +- roles/common/templates/motd.j2 | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 2f2074a..69b1f56 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -18,7 +18,7 @@ group: "{{ group_root }}" state: directory mode: 0755 - when: os_type == "linux" + when: ansible_system == "Linux" - name: copy zsh configuration file copy: diff --git a/roles/common/templates/motd.j2 b/roles/common/templates/motd.j2 index 8090ab0..5d5155b 100644 --- a/roles/common/templates/motd.j2 +++ b/roles/common/templates/motd.j2 @@ -2,12 +2,12 @@ {{ sep }} rgoncalves.se network {{ sep }} - {{ sep }} support : support@rgoncalves.se - {{ sep }} look for changes : git.rgoncalves.se + {{ 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 }} + {{ sep }} hostname : {{ ansible_hostname }} + {{ sep }} distribution : {{ ansible_distribution }} {{ ansible_distribution_version }} + {{ sep }} kernel revision : {{ ansible_kernel }} {{ ansible_kernel_version }} -- cgit v1.2.3