This commit is contained in:
2026-06-18 23:18:11 +03:00
parent 22f030ff7b
commit 2868f76761
9 changed files with 181 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
- name: Prepeare OS Linux (Rocky + Ubuntu) after install
hosts: all
become: yes
tasks:
- block:
- name: Remove soft
dnf: name="{{ item }}" state=absent autoremove=yes
loop: [qemu*, cockpit*, postfix*, libvirt*, podman*]
- name: Install soft
dnf: name="{{ item }}" state=latest
loop: [unzip, mtr, yum-utils, epel-release, net-tools, wget, tar, lsof, sysstat, smartmontools, which, iperf3, vim, htop, iftop, nethogs, tree]
- name: Remove services from firewall
firewalld: service="{{ item }}" state=disabled permanent=true immediate=true
loop: [cockpit, dhcpv6-client]
- name: Create aliases
lineinfile: path=/etc/bashrc line="{{ item }}"
loop:
- alias lll='ls -alh --color=auto'
- alias sss='ss -tulpn'
- alias df='df -h'
when: ansible_facts['os_family'] == "RedHat"
- block:
- name: Remove soft
apt: name="{{ item }}" state=absent autoremove=yes
loop: [qemu*, cockpit*, postfix*, libvirt*, podman*]
- name: Install soft
apt: name="{{ item }}" state=latest
loop: [unzip, mtr, net-tools, wget, tar, lsof, sysstat, smartmontools, which, iperf3, vim, htop, iftop, nethogs, tree]
- name: Create aliases
lineinfile: path=/etc/bash.bashrc line="{{ item }}"
loop:
- alias lll='ls -alh --color=auto'
- alias sss='ss -tulpn'
- alias df='df -h'
when: ansible_facts['os_family'] == "Debian"
- name: Disable SELinux
selinux: state=disabled
when: ansible_facts['selinux']['status']!="disabled"
- name: Do not prompt for sudo password for zmaster
lineinfile: path="/etc/sudoers" line="{{ item }}"
loop:
- "zmaster ALL=(ALL) NOPASSWD: ALL"