post_install/local.yml

31 lines
786 B
YAML
Raw Normal View History

---
2025-04-28 20:24:23 +00:00
- name: "Playbook for my various machines"
hosts: localhost
connection: local
force_handlers: true
2025-04-28 20:24:23 +00:00
vars:
2025-04-28 20:37:20 +00:00
log_path: "{{ ansible_user_dir }}/.local/state/post_install/{{ ansible_date_time.iso8601_basic_short }}.log"
2025-04-28 20:24:23 +00:00
pre_tasks:
- name: "Create Logfile"
block:
2025-04-28 20:27:54 +00:00
- name: "Create Folder"
ansible.builtin.file:
2025-04-28 20:37:20 +00:00
path: "{{ ansible_user_dir }}/.local/state/post_install"
2025-04-28 20:27:54 +00:00
state: directory
mode: '0644'
2025-04-28 20:24:23 +00:00
- name: "Create File"
ansible.builtin.file:
path: "{{ log_path }}"
state: touch
mode: '0644'
roles:
- name: fedora
when: ansible_distribution == 'Fedora'
- name: gnome
2025-04-09 13:52:47 +00:00
when: ansible_env.DESKTOP_SESSION == 'gnome'
2025-04-28 20:24:23 +00:00
- name: dotfiles