post_install/local.yml

32 lines
832 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: '0700'
- name: "Create File"
ansible.builtin.file:
path: "{{ log_path }}"
state: touch
mode: '0700'
roles:
- name: fedora
when:
- ansible_distribution == 'Fedora'
- ansible_pkg_mgr == 'dnf5'
- name: gnome
when: ansible_env.DESKTOP_SESSION == 'gnome'
- name: dotfiles