From eec84fca8a87d89bfe857426363bc524eb8f5f42 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Fri, 21 Apr 2017 14:11:49 +0200 Subject: [PATCH] detect absence of acl in filesystem --- evolinux-base/tasks/root.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/evolinux-base/tasks/root.yml b/evolinux-base/tasks/root.yml index 9b321326..56aaa7cb 100644 --- a/evolinux-base/tasks/root.yml +++ b/evolinux-base/tasks/root.yml @@ -45,14 +45,17 @@ - name: Is .bash_history append-only shell: lsattr /root/.bash_history | grep -E "^.*a.* " check_mode: no - register: bash_history_append_only - failed_when: False + failed_when: "'Inappropriate ioctl' in bash_history_append_only.stderr" + ignore_errors: yes changed_when: False - name: Set .bash_history append-only command: chattr +a /root/.bash_history - when: evolinux_root_bash_history_appendonly and bash_history_append_only.rc != 0 + when: + - evolinux_root_bash_history_appendonly + - bash_history_append_only.rc != 0 + - "'Inappropriate ioctl' not in bash_history_append_only.stderr" - name: Setting vim as selected-editor lineinfile: