From 5192b27d9ea23fd432f8fa3f22a9e5b17cde8e18 Mon Sep 17 00:00:00 2001 From: "Andreas B. Mundt" Date: Wed, 24 Jul 2024 08:21:41 +0200 Subject: [PATCH] Move ansible last run stamping to better location Before, only root could read the file containing the stamps. --- lmn-client.yml | 2 +- roles/lmn_fvs/files/reporter | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lmn-client.yml b/lmn-client.yml index e003cbe..b5c7bf5 100644 --- a/lmn-client.yml +++ b/lmn-client.yml @@ -319,7 +319,7 @@ - name: Timestamp successfull run and send up-to-date report ansible.builtin.shell: - cmd: date --iso-8601=seconds >> /root/.ansible/stamps && /usr/local/sbin/reporter + cmd: date --iso-8601=seconds >> /var/local/ansible-stamps && /usr/local/sbin/reporter changed_when: False tags: upgrade diff --git a/roles/lmn_fvs/files/reporter b/roles/lmn_fvs/files/reporter index f665a6f..2ee481f 100755 --- a/roles/lmn_fvs/files/reporter +++ b/roles/lmn_fvs/files/reporter @@ -11,7 +11,7 @@ n=0 cmds=( 'uname -a' - 'tail -1 /root/.ansible/stamps' + 'tail -1 /var/local/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" | \