Create vm_usage_information.txt in not exists.

This commit is contained in:
Raphael Dannecker 2024-03-12 09:21:07 +01:00
parent 7667f12399
commit b271d4978e

View file

@ -254,6 +254,18 @@
- /etc/sudoers.d/90-lmn-link-images - /etc/sudoers.d/90-lmn-link-images
- /etc/rsync.secret - /etc/rsync.secret
- name: check if vm_usage_information.txt exists
stat: path=/lmn/vm/vm_usage_information.txt
register: vm_usage_information
- name: pre-fill vm_usage_information.txt
shell:
cmd: |
ls -tr *.qcow2 > vm_usage_information.txt || touchvm_usage_information.txt
chown lmnsynci:lmnsynci vm_usage_information.txt
chdir: /lmn/vm/
when: not vm_usage_information.stat.exists
## bookworm fixes/hacks: ## bookworm fixes/hacks:
- name: Work around sddm hang on shutdown - name: Work around sddm hang on shutdown
ansible.builtin.lineinfile: ansible.builtin.lineinfile: