From 57e090034daaf0cb807036487d1638e4d12532e4 Mon Sep 17 00:00:00 2001 From: "Andreas B. Mundt" Date: Wed, 17 Jan 2024 13:05:22 +0100 Subject: [PATCH] Move ansible stamps to root directory to fix installation. During installation, ansible-pull is run as root, '/home/ansible/.ansible/' does not exist. --- lmn-client.yml | 2 +- roles/lmn_fvs/files/reporter | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lmn-client.yml b/lmn-client.yml index 0167843..100a088 100644 --- a/lmn-client.yml +++ b/lmn-client.yml @@ -86,7 +86,7 @@ tasks: - name: Timestamp successfull ansible run - ansible.builtin.shell: date --iso-8601=seconds >> /home/ansible/.ansible/stamps + ansible.builtin.shell: date --iso-8601=seconds >> /root/.ansible/stamps changed_when: False ## Temporary fixes and quirks: diff --git a/roles/lmn_fvs/files/reporter b/roles/lmn_fvs/files/reporter index 18f0eca..f665a6f 100755 --- a/roles/lmn_fvs/files/reporter +++ b/roles/lmn_fvs/files/reporter @@ -11,11 +11,11 @@ n=0 cmds=( 'uname -a' - 'tail -1 /home/ansible/.ansible/stamps' + 'tail -1 /root/.ansible/stamps' 'ip route list default' 'ip link show | \ sed -nE -e "s/^[2-9]: (\S+): .+/\1/p" -e "s/.+ether ([0-9a-f:]+) .+/\1/p" | \ - paste -d " " - -' + paste - -' ) # 'w' # 'uptime'