Code for the "Ansible - Linux Workstation Management" article.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.0 KiB

---
- name: "Manage workstation"
hosts: "localhost"
connection: "local"
tasks:
- name: "Install Virtualization"
ansible.builtin.package:
name:
- "libvirt-client"
- "qemu-kvm"
- "libvirt-daemon-driver-network"
- "libvirt-daemon-config-network"
state: "present"
become: true
- name: "Install Vagrant"
ansible-builtin.package:
name: "vagrant"
state: "present"
become: true
- name: "Start & Enable libvirtd Service"
ansible-builtin.service:
name: "libvirtd.service"
state: "started"
enabled: true
become: true
- name: "Start & Enable thermald Service"
ansible-builtin.service:
name: "thermald.service"
state: "started"
enabled: true
become: true
- name: "Start & Enable fstrim Timer"
ansible-builtin.service:
name: "fstrim.timer"
state: "started"
enabled: true
become: true
- name: "Manage flathub Repository"
community.general.flatpak_remote:
name: "flathub"
state: "present"
flatpakrepo_url: "https://dl.flathub.org/repo/flathub.flatpakrepo"
method: "system"
become: true
- name: "Install GIMP Flatpak"
community.general.flatpak:
name: "org.gimp.GIMP"
state: "present"
become: true
- name: "Install VSCodium Flatpak"
community.general.flatpak:
name: "com.vscodium.codium"
state: "present"
become: true
- name: "Create Ansible VENV"
ansible.buitlin.pip:
name: "ansible"
virtualenv: "/home/USER/.venv-ansible"
- name: "Enable the NightLight"
community.general.dconf:
key: "/org/gnome/settings-daemon/plugins/color/night-light-enabled"
value: "true"
state: "present"
- name: "Window Buttons"
community.general.dconf:
key: "/org/gnome/desktop/wm/preferences/button-layout"
value: "'appmenu:minimize,maximize,close'"
state: "present"