2022-04-11 15:20:12 +03:00
|
|
|
---
|
|
|
|
- name: Install Debian packages
|
|
|
|
apt:
|
2023-09-16 08:41:35 +03:00
|
|
|
name: ['mc', 'htop', 'vim', 'neovim', 'screen', 'tmux', 'curl', 'wget', 'bash-completion', 'tree', 'figlet', 'ufw']
|
2022-04-11 15:20:12 +03:00
|
|
|
state: present
|
|
|
|
update_cache: yes
|
2023-09-16 08:41:35 +03:00
|
|
|
lock_timeout: 300
|
2022-04-11 15:20:12 +03:00
|
|
|
when: ansible_facts['os_family'] == "Debian"
|
|
|
|
|
2022-10-19 22:30:26 +03:00
|
|
|
|
2022-10-19 19:11:27 +03:00
|
|
|
- name: Remove Ubuntu packages
|
|
|
|
apt:
|
2022-12-11 15:21:45 +03:00
|
|
|
name: ['cloud-init', 'modemmanager', 'snapd', 'needrestart']
|
2022-10-19 19:11:27 +03:00
|
|
|
state: absent
|
2023-09-16 08:41:35 +03:00
|
|
|
lock_timeout: 300
|
2024-04-04 09:55:51 +03:00
|
|
|
when: ansible_facts['os_family'] == "Debian" and ansible_facts['virtualization_role'] == "guest"
|
2022-10-19 19:11:27 +03:00
|
|
|
|
2022-10-19 22:30:26 +03:00
|
|
|
- name: Remove orphans
|
|
|
|
apt:
|
|
|
|
autoremove: yes
|
|
|
|
purge: yes
|
2023-09-16 08:41:35 +03:00
|
|
|
lock_timeout: 300
|
2022-10-19 22:30:26 +03:00
|
|
|
when: ansible_facts['os_family'] == "Debian"
|
|
|
|
|
2022-10-19 19:20:46 +03:00
|
|
|
- name: Less modules in initramfs
|
|
|
|
ansible.builtin.replace:
|
|
|
|
path: /etc/initramfs-tools/initramfs.conf
|
|
|
|
regexp: '^MODULES=most$'
|
|
|
|
replace: 'MODULES=dep'
|
|
|
|
notify:
|
|
|
|
- Make initramfs
|
2024-04-04 09:55:51 +03:00
|
|
|
when: ansible_facts['os_family'] == "Debian" and ansible_facts['virtualization_role'] == "guest"
|
2022-12-11 16:37:51 +03:00
|
|
|
ignore_errors: true # TODO
|
2022-10-19 19:20:46 +03:00
|
|
|
|
2022-04-11 15:20:12 +03:00
|
|
|
- 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"
|