ansible-bootstrap-rocky9/roles/rocky9/tasks/install_packages.yml
2026-06-30 10:09:12 +03:00

105 lines
2 KiB
YAML

---
# - name: Add Nginx Repo
# template:
# src: nginx.repo.j2
# dest: /etc/yum.repos.d/nginx.repo
# owner: root
# group: root
# - name: Configure dnf to use fastest mirror
# ansible.builtin.lineinfile:
# path: /etc/dnf/dnf.conf
# regexp: '^fastestmirror='
# line: 'fastestmirror=True'
# - name: Enable fastestmirror in DNF
# community.general.ini_file:
# path: /etc/dnf/dnf.conf
# section: main
# option: fastestmirror
# value: "True"
# state: present
- name: Enable parallel downloads in DNF
community.general.ini_file:
path: /etc/dnf/dnf.conf
section: main
option: max_parallel_downloads
value: "10"
state: present
backup: true
- name: Ensure the crb repository is enabled
community.general.dnf_config_manager:
name: crb
state: enabled
when: crb_repo is true
- name: Install EPEL repo
ansible.builtin.include_tasks: install-epel-repo.yml
when: epel_repo is defined
# - name: Upgrade all packages
# ansible.builtin.dnf:
# name: "*"
# state: latest
- name: Install soft
ansible.builtin.dnf:
name:
- net-tools
- mc
- cronie
- logrotate
- sudo
- traceroute
- tcpdump
- whois
- telnet
- sed
- tar
- unzip
- gzip
- rsync
- sysstat
- dos2unix
- iperf3
- wget
- ntsysv
- dmidecode
- nfs-utils
- git
- sos
- mtr
- lshw
- irqbalance
- iotop
- strace
- numactl
- lsof
- nano
- bind-utils
- psmisc
- python-pip
- open-vm-tools
- qemu-guest-agent
- cloud-utils-growpart
- iptraf-ng
# - speedtest-cli
# - deltarpm
# - screen
# - unrar
# - htop
# - btop
state: present
- name: Обновить всё
become: true
ansible.builtin.dnf:
name: "*"
state: latest
- name: Удалить старые ядра и ненужные зависимости
become: true
ansible.builtin.dnf:
autoremove: true