base-system/roles/packages/tasks/main.yml
2023-09-16 08:41:35 +03:00

48 lines
1.2 KiB
YAML

---
- name: Install Debian packages
apt:
name: ['mc', 'htop', 'vim', 'neovim', 'screen', 'tmux', 'curl', 'wget', 'bash-completion', 'tree', 'figlet', 'ufw']
state: present
update_cache: yes
lock_timeout: 300
when: ansible_facts['os_family'] == "Debian"
- name: Remove Ubuntu packages
apt:
name: ['cloud-init', 'modemmanager', 'snapd', 'needrestart']
state: absent
lock_timeout: 300
when: ansible_facts['os_family'] == "Debian"
- name: Remove orphans
apt:
autoremove: yes
purge: yes
lock_timeout: 300
when: ansible_facts['os_family'] == "Debian"
- name: Less modules in initramfs
ansible.builtin.replace:
path: /etc/initramfs-tools/initramfs.conf
regexp: '^MODULES=most$'
replace: 'MODULES=dep'
notify:
- Make initramfs
when: ansible_facts['os_family'] == "Debian"
ignore_errors: true # TODO
- name: Install CentOS epel
yum:
name: 'epel-release'
update_cache: yes
state: present
when: ansible_facts['os_family'] == "RedHat"
- name: Install RedHat packages
yum:
name: ['epel-release', 'mc', 'htop', 'vim', 'screen', 'tmux', 'curl', 'wget', 'bash-completion']
update_cache: yes
state: present
when: ansible_facts['os_family'] == "RedHat"