Files
dotfiles/config/ansible/tasks/global/global.yml
Menno van Leeuwen 6dbe114d83
Some checks failed
Ansible Lint Check / check-ansible (push) Failing after 26s
Nix Format Check / check-format (push) Failing after 1m25s
Python Lint Check / check-python (push) Failing after 20s
feat: add pwfeedback to sudoers for improved password user experience
2025-07-15 23:17:27 +00:00

78 lines
2.0 KiB
YAML

---
- name: Include global symlinks tasks
ansible.builtin.import_tasks: tasks/global/symlinks.yml
- name: Gather package facts
ansible.builtin.package_facts:
manager: auto
become: true
- name: Include Tailscale tasks
ansible.builtin.import_tasks: tasks/global/tailscale.yml
become: true
when: "'microsoft-standard-WSL2' not in ansible_kernel"
- name: Include Docker tasks
ansible.builtin.import_tasks: tasks/global/docker.yml
become: true
when: "'microsoft-standard-WSL2' not in ansible_kernel"
- name: Include Ollama tasks
ansible.builtin.import_tasks: tasks/global/ollama.yml
become: true
when: "'microsoft-standard-WSL2' not in ansible_kernel"
- name: Include OpenSSH Server tasks
ansible.builtin.import_tasks: tasks/global/openssh-server.yml
become: true
when: "'microsoft-standard-WSL2' not in ansible_kernel"
- name: Ensure common packages are installed
ansible.builtin.package:
name:
- git
- vim
- curl
- wget
- httpie
# Python is used for the dotfiles CLI tools
- python3
- python3-pip
- python3-venv
- pylint
- black
- pipx
# Package manager wrapper
- nala
# Go
- golang
state: present
become: true
- name: Include Utils tasks
ansible.builtin.import_tasks: tasks/global/utils.yml
become: true
tags: utils
- name: Ensure ~/.hushlogin exists
ansible.builtin.stat:
path: ~/.hushlogin
register: hushlogin_stat
- name: Create ~/.hushlogin if it does not exist
ansible.builtin.file:
path: ~/.hushlogin
state: touch
mode: "0644"
when: not hushlogin_stat.stat.exists
# Ensure pwfeedback is enabled in sudoers for better password UX
- name: Ensure pwfeedback is present in Defaults env_reset line in /etc/sudoers
ansible.builtin.replace:
path: /etc/sudoers
regexp: '^Defaults\s+env_reset(?!.*pwfeedback)'
replace: 'Defaults env_reset,pwfeedback'
validate: 'visudo -cf %s'
become: true
tags: sudoers