diff --git a/hosts.txt b/hosts.txt deleted file mode 100644 index 6b7d4af..0000000 --- a/hosts.txt +++ /dev/null @@ -1,22 +0,0 @@ -[ansible_servers] -rdb1 ansible_host=192.168.33.120 -rdb2 ansible_host=192.168.33.121 -ldcore1 ansible_host=192.168.33.124 -ldcore2 ansible_host=192.168.33.125 -lcloud1 ansible_host=192.168.33.129 - -hub ansible_host=192.168.33.220 -rdb3 ansible_host=192.168.33.221 - -#Тут не настроен wg -#icap ansible_host=10.10.10.10 - -ldext1 ansible_host=82.202.138.229 ansible_port=22233 -ldext2 ansible_host=176.108.251.94 ansible_port=22233 -app ansible_host=95.174.93.179 ansible_port=22233 - - - -[ansible_servers:vars] -ansible_user=zmaster -ansible_ssh_private_key_file=/home/zmaster/.ssh/zmasterKeys diff --git a/prepeareLinux.yml b/prepeareLinux.yml deleted file mode 100644 index 864406b..0000000 --- a/prepeareLinux.yml +++ /dev/null @@ -1,47 +0,0 @@ -- 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" - diff --git a/roles/delsoft/tasks/main.yml b/roles/delsoft/tasks/main.yml deleted file mode 100644 index 6949231..0000000 --- a/roles/delsoft/tasks/main.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- name: Remove soft - dnf: name="{{ item }}" state=absent autoremove=yes - loop: [qemu*, cockpit*, postfix*, libvirt*, podman*] - diff --git a/roles/inssoft/tasks/main.yml b/roles/inssoft/tasks/main.yml deleted file mode 100644 index 8a67c24..0000000 --- a/roles/inssoft/tasks/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- 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] diff --git a/testrole.yml b/testrole.yml deleted file mode 100644 index fbfc4e5..0000000 --- a/testrole.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- name: Install Soft - hosts: all - become: yes - roles: - - delsoft - - inssoft diff --git a/updateLinux.yml b/updateLinux.yml deleted file mode 100644 index a55d8b6..0000000 --- a/updateLinux.yml +++ /dev/null @@ -1,20 +0,0 @@ -- name: Update all system packages - hosts: all - become: yes - - tasks: - - name: Update packages to the latest version - dnf: name="*" state=latest - - - name: Check if a reboot is required - command: - cmd: needs-restarting -r - register: reboot_check - changed_when: false - failed_when: reboot_check.rc not in [0, 1] - - - name: Reboot the server only if needed - reboot: - when: reboot_check.rc == 1 - -