ansible/roles/base/tasks/main.yml
ilia c5ae3af9ac Add tasks to manage repository files and ensure directory permissions
- Clean up duplicate Brave repository files in applications role.
- Ensure Ansible remote_tmp directory exists with correct permissions in base role.
- Remove existing NodeSource repository files and create keyrings directory in development role.

These changes improve package management and maintain a clean repository setup across roles.
2025-09-09 22:46:31 -04:00

55 lines
1.1 KiB
YAML

---
- name: Ensure Ansible remote_tmp directory exists with correct permissions
ansible.builtin.file:
path: /root/.ansible/tmp
state: directory
mode: '0755'
owner: root
group: root
become: true
- name: Install base system packages
ansible.builtin.apt:
name:
# Base utilities
- curl
- wget
- unzip
- xclip
- tree
# Network and admin tools
- net-tools
- ufw
- mailutils
# Modern CLI tools
- jq
- ripgrep
- fd-find
state: present
- name: Install modern tools via snap
community.general.snap:
name:
- yq
state: present
- name: Create fd symlink (Ubuntu uses fd-find)
ansible.builtin.file:
src: /usr/bin/fdfind
dest: /usr/local/bin/fd
state: link
when: ansible_distribution == "Ubuntu"
# fail2ban configuration moved to monitoring role
# UFW enablement moved to ssh role to avoid lockout
- name: Set timezone
community.general.timezone:
name: "{{ timezone | default('UTC') }}"
- name: Configure locale
community.general.locale_gen:
name: "{{ locale | default('en_US.UTF-8') }}"
state: present