Logfile creation

This commit is contained in:
Raphael Werner 2025-04-28 22:37:20 +02:00
parent 1049a49804
commit a4d0edfa95

View file

@ -5,14 +5,14 @@
force_handlers: true force_handlers: true
vars: vars:
log_path: "/var/log/ansible/{{ ansible_date_time.iso8601_basic_short }}.log" log_path: "{{ ansible_user_dir }}/.local/state/post_install/{{ ansible_date_time.iso8601_basic_short }}.log"
pre_tasks: pre_tasks:
- name: "Create Logfile" - name: "Create Logfile"
block: block:
- name: "Create Folder" - name: "Create Folder"
ansible.builtin.file: ansible.builtin.file:
path: "/var/log/ansible/" path: "{{ ansible_user_dir }}/.local/state/post_install"
state: directory state: directory
mode: '0644' mode: '0644'