Move ansible last run stamping to better location

Before, only root could read the file containing the stamps.
This commit is contained in:
Andreas B. Mundt 2024-07-24 08:21:41 +02:00
parent 962dc07a2a
commit 5192b27d9e
2 changed files with 2 additions and 2 deletions

View file

@ -319,7 +319,7 @@
- name: Timestamp successfull run and send up-to-date report - name: Timestamp successfull run and send up-to-date report
ansible.builtin.shell: 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 changed_when: False
tags: upgrade tags: upgrade

View file

@ -11,7 +11,7 @@ n=0
cmds=( cmds=(
'uname -a' 'uname -a'
'tail -1 /root/.ansible/stamps' 'tail -1 /var/local/ansible-stamps'
'ip route list default' 'ip route list default'
'ip link show | \ 'ip link show | \
sed -nE -e "s/^[2-9]: (\S+): .+/\1/p" -e "s/.+ether ([0-9a-f:]+) .+/\1/p" | \ sed -nE -e "s/^[2-9]: (\S+): .+/\1/p" -e "s/.+ether ([0-9a-f:]+) .+/\1/p" | \