post_install/local.yml
2025-04-28 22:37:20 +02:00

30 lines
786 B
YAML

---
- name: "Playbook for my various machines"
hosts: localhost
connection: local
force_handlers: true
vars:
log_path: "{{ ansible_user_dir }}/.local/state/post_install/{{ ansible_date_time.iso8601_basic_short }}.log"
pre_tasks:
- name: "Create Logfile"
block:
- name: "Create Folder"
ansible.builtin.file:
path: "{{ ansible_user_dir }}/.local/state/post_install"
state: directory
mode: '0644'
- name: "Create File"
ansible.builtin.file:
path: "{{ log_path }}"
state: touch
mode: '0644'
roles:
- name: fedora
when: ansible_distribution == 'Fedora'
- name: gnome
when: ansible_env.DESKTOP_SESSION == 'gnome'
- name: dotfiles