暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

ansible 生产实战案例 -- 系统初始化playbook

1.安装ansible和配置

[root@ansible-server ~]# dnf -y install ansible

[root@ansible-server ~]# ansible --version
ansible 2.9.27
config file = etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = usr/lib/python3.6/site-packages/ansible
executable location = usr/bin/ansible
python version = 3.6.8 (default, Nov  9 2021, 14:44:26) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]

[root@ansible-server ~]# mkdir data/ansible
[root@ansible-server ~]# cd data/ansible

[root@ansible-server ansible]# vim ansible.cfg
[defaults]
inventory      = ./inventory
forks          = 10
roles_path    = ./roles
remote_user = root

[root@ansible-server ansible]# vim inventory
[rockyserver]
172.31.0.101 hname=rocky8-client

[centosserver]
172.31.0.102 hname=centos8-stream-client
172.31.0.103 hname=centos7-client


[ubuntuserver]
172.31.0.104 hname=ubuntu1804-client
172.31.0.105 hname=ubuntu2004-client

[all:vars]
domain=example.local
复制

2.设置客户端网卡名和ip

#rocky8和centos系统设置
[root@172 ~]# bash reset.sh

************************************************************
*                     初始化脚本菜单                     *
* 1.禁用SELinux               12.修改IP地址和网关地址     *
* 2.关闭防火墙                13.设置主机名               *
* 3.优化SSH                   14.设置PS1和系统环境变量     *
* 4.设置系统别名              15.禁用SWAP                 *
* 5.1-4全设置                 16.优化内核参数             *
* 6.设置vimrc配置文件         17.优化资源限制参数         *
* 7.设置软件包仓库            18.Ubuntu设置root用户登录   *
* 8.Minimal安装建议安装软件   19.Ubuntu卸载无用软件包     *
* 9.安装邮件服务并配置邮件    20.重启系统                 *
* 10.更改SSH端口号            21.退出                     *
* 11.修改网卡名                                           *
************************************************************

请选择相应的编号(1-21): 11
Rocky 8.5 网卡名已修改成功,请重新启动系统后才能生效!

************************************************************
*                     初始化脚本菜单                     *
* 1.禁用SELinux               12.修改IP地址和网关地址     *
* 2.关闭防火墙                13.设置主机名               *
* 3.优化SSH                   14.设置PS1和系统环境变量     *
* 4.设置系统别名              15.禁用SWAP                 *
* 5.1-4全设置                 16.优化内核参数             *
* 6.设置vimrc配置文件         17.优化资源限制参数         *
* 7.设置软件包仓库            18.Ubuntu设置root用户登录   *
* 8.Minimal安装建议安装软件   19.Ubuntu卸载无用软件包     *
* 9.安装邮件服务并配置邮件    20.重启系统                 *
* 10.更改SSH端口号            21.退出                     *
* 11.修改网卡名                                           *
************************************************************

请选择相应的编号(1-21): 12
请输入IP地址:172.31.0.101
IP 172.31.0.101 available!
请输入子网掩码位数:21
请输入网关地址:172.31.0.2
IP 172.31.0.2 available!
Rocky 8.5 IP地址和网关地址已修改成功,请重新启动系统后生效!

************************************************************
*                     初始化脚本菜单                     *
* 1.禁用SELinux               12.修改IP地址和网关地址     *
* 2.关闭防火墙                13.设置主机名               *
* 3.优化SSH                   14.设置PS1和系统环境变量     *
* 4.设置系统别名              15.禁用SWAP                 *
* 5.1-4全设置                 16.优化内核参数             *
* 6.设置vimrc配置文件         17.优化资源限制参数         *
* 7.设置软件包仓库            18.Ubuntu设置root用户登录   *
* 8.Minimal安装建议安装软件   19.Ubuntu卸载无用软件包     *
* 9.安装邮件服务并配置邮件    20.重启系统                 *
* 10.更改SSH端口号            21.退出                     *
* 11.修改网卡名                                           *
************************************************************

请选择相应的编号(1-21): 21

#ubuntu系统设置
[C:\~]$ ssh raymond@172.31.7.3


Connecting to 172.31.7.3:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.

Welcome to Ubuntu 18.04.6 LTS (GNU/Linux 4.15.0-156-generic x86_64)

* Documentation: https://help.ubuntu.com
* Management:     https://landscape.canonical.com
* Support:       https://ubuntu.com/advantage

System information as of Mon Dec 27 13:56:42 CST 2021

System load:  0.17             Processes:            193
Usage of :   2.1% of 91.17GB   Users logged in:      1
Memory usage: 10%               IP address for ens33: 172.31.7.3
Swap usage:   0%

* Super-optimized for small spaces - read how we shrank the memory
  footprint of MicroK8s to make it the smallest full K8s around.

  https://ubuntu.com/blog/microk8s-memory-optimisation

19 updates can be applied immediately.
18 of these updates are standard security updates.
To see these additional updates run: apt list --upgradable

New release '20.04.3 LTS' available.
Run 'do-release-upgrade' to upgrade to it.


Last login: Mon Dec 27 13:56:31 2021
/usr/bin/xauth: file home/raymond/.Xauthority does not exist
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

raymond@ubuntu1804:~$ bash reset.sh

************************************************************
*                     初始化脚本菜单                     *
* 1.禁用SELinux               12.修改IP地址和网关地址     *
* 2.关闭防火墙                13.设置主机名               *
* 3.优化SSH                   14.设置PS1和系统环境变量     *
* 4.设置系统别名              15.禁用SWAP                 *
* 5.1-4全设置                 16.优化内核参数             *
* 6.设置vimrc配置文件         17.优化资源限制参数         *
* 7.设置软件包仓库            18.Ubuntu设置root用户登录   *
* 8.Minimal安装建议安装软件   19.Ubuntu卸载无用软件包     *
* 9.安装邮件服务并配置邮件    20.重启系统                 *
* 10.更改SSH端口号            21.退出                     *
* 11.修改网卡名                                           *
************************************************************

请选择相应的编号(1-21): 18
请输入密码: 123456
[sudo] password for raymond: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
Ubuntu 18.04 root用户登录已设置完成,请重新登录后生效!

************************************************************
*                     初始化脚本菜单                     *
* 1.禁用SELinux               12.修改IP地址和网关地址     *
* 2.关闭防火墙                13.设置主机名               *
* 3.优化SSH                   14.设置PS1和系统环境变量     *
* 4.设置系统别名              15.禁用SWAP                 *
* 5.1-4全设置                 16.优化内核参数             *
* 6.设置vimrc配置文件         17.优化资源限制参数         *
* 7.设置软件包仓库            18.Ubuntu设置root用户登录   *
* 8.Minimal安装建议安装软件   19.Ubuntu卸载无用软件包     *
* 9.安装邮件服务并配置邮件    20.重启系统                 *
* 10.更改SSH端口号            21.退出                     *
* 11.修改网卡名                                           *
************************************************************

请选择相应的编号(1-21): 21
raymond@ubuntu1804:~$ exit
logout

Connection closed.

Disconnected from remote host(172.31.7.3:22) at 13:57:16.

Type `help' to learn how to use Xshell prompt.

[C:\~]$ ssh root@172.31.7.3


Connecting to 172.31.7.3:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.

Welcome to Ubuntu 18.04.6 LTS (GNU/Linux 4.15.0-156-generic x86_64)

* Documentation: https://help.ubuntu.com
* Management:     https://landscape.canonical.com
* Support:       https://ubuntu.com/advantage

System information as of Mon Dec 27 13:57:47 CST 2021

System load:  0.06             Processes:            199
Usage of :   2.1% of 91.17GB   Users logged in:      1
Memory usage: 11%               IP address for ens33: 172.31.7.3
Swap usage:   0%

* Super-optimized for small spaces - read how we shrank the memory
  footprint of MicroK8s to make it the smallest full K8s around.

  https://ubuntu.com/blog/microk8s-memory-optimisation

19 updates can be applied immediately.
18 of these updates are standard security updates.
To see these additional updates run: apt list --upgradable

New release '20.04.3 LTS' available.
Run 'do-release-upgrade' to upgrade to it.



The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

/usr/bin/xauth: file root/.Xauthority does not exist
root@ubuntu1804:~# mv home/raymond/reset.sh .
root@ubuntu1804:~# bash reset.sh

************************************************************
*                     初始化脚本菜单                     *
* 1.禁用SELinux               12.修改IP地址和网关地址     *
* 2.关闭防火墙                13.设置主机名               *
* 3.优化SSH                   14.设置PS1和系统环境变量     *
* 4.设置系统别名              15.禁用SWAP                 *
* 5.1-4全设置                 16.优化内核参数             *
* 6.设置vimrc配置文件         17.优化资源限制参数         *
* 7.设置软件包仓库            18.Ubuntu设置root用户登录   *
* 8.Minimal安装建议安装软件   19.Ubuntu卸载无用软件包     *
* 9.安装邮件服务并配置邮件    20.重启系统                 *
* 10.更改SSH端口号            21.退出                     *
* 11.修改网卡名                                           *
************************************************************

请选择相应的编号(1-21): 11
Ubuntu 18.04 网卡名已修改成功,请重新启动系统后才能生效!

************************************************************
*                     初始化脚本菜单                     *
* 1.禁用SELinux               12.修改IP地址和网关地址     *
* 2.关闭防火墙                13.设置主机名               *
* 3.优化SSH                   14.设置PS1和系统环境变量     *
* 4.设置系统别名              15.禁用SWAP                 *
* 5.1-4全设置                 16.优化内核参数             *
* 6.设置vimrc配置文件         17.优化资源限制参数         *
* 7.设置软件包仓库            18.Ubuntu设置root用户登录   *
* 8.Minimal安装建议安装软件   19.Ubuntu卸载无用软件包     *
* 9.安装邮件服务并配置邮件    20.重启系统                 *
* 10.更改SSH端口号            21.退出                     *
* 11.修改网卡名                                           *
************************************************************

请选择相应的编号(1-21): 12
请输入IP地址:172.31.0.103
IP 172.31.0.103 available!
请输入子网掩码位数:21
请输入网关地址:172.31.0.2
IP 172.31.0.2 available!
Ubuntu 18.04 IP地址和网关地址已修改成功,请重新启动系统后生效!

************************************************************
*                     初始化脚本菜单                     *
* 1.禁用SELinux               12.修改IP地址和网关地址     *
* 2.关闭防火墙                13.设置主机名               *
* 3.优化SSH                   14.设置PS1和系统环境变量     *
* 4.设置系统别名              15.禁用SWAP                 *
* 5.1-4全设置                 16.优化内核参数             *
* 6.设置vimrc配置文件         17.优化资源限制参数         *
* 7.设置软件包仓库            18.Ubuntu设置root用户登录   *
* 8.Minimal安装建议安装软件   19.Ubuntu卸载无用软件包     *
* 9.安装邮件服务并配置邮件    20.重启系统                 *
* 10.更改SSH端口号            21.退出                     *
* 11.修改网卡名                                           *
************************************************************

请选择相应的编号(1-21): 21
复制

3.实现基于key验证的脚本

[root@ansible-server ansible]# cat ssh_key_push.sh 
#!/bin/bash
#
#**********************************************************************************************
#Author:       Raymond
#QQ:           88563128
#Date:         2021-11-19
#FileName:     ssh_key_push.sh
#URL:           raymond.blog.csdn.net
#Description:   ssh_key_push for CentOS 7/8 & Ubuntu 18.04/24.04 & Rocky 8
#Copyright (C): 2021 All rights reserved
#*********************************************************************************************
COLOR="echo -e \\033[01;31m"
END='\033[0m'

export SSHPASS=123456
HOSTS="
172.31.0.101
172.31.0.102
172.31.0.103
172.31.0.104
172.31.0.105"

os(){
   OS_ID=`sed -rn '/^NAME=/s@.*="([[:alpha:]]+).*"$@\1@p' etc/os-release`
}

ssh_key_push(){
   rm -f ~/.ssh/id_rsa*
  ssh-keygen -f root/.ssh/id_rsa -P '' &> dev/null
   if [ ${OS_ID} == "CentOS" -o ${OS_ID} == "Rocky" ] &> dev/null;then
      rpm -q sshpass &> dev/null || { ${COLOR}"安装sshpass软件包"${END};yum -y install sshpass &> dev/null; }
   else
      dpkg -S sshpass &> dev/null || { ${COLOR}"安装sshpass软件包"${END};apt -y install sshpass &> dev/null; }
   fi
   for i in $HOSTS;do
      {
          sshpass -e ssh-copy-id -o StrictHostKeyChecking=no -i root/.ssh/id_rsa.pub $i &> dev/null
          [ $? -eq 0 ] && echo $i is finished || echo $i is false
      }&
   done
  wait
}

main(){
  os
  ssh_key_push
}

main

[root@ansible-server ansible]# bash ssh_key_push.sh
172.31.0.104 is finished
172.31.0.102 is finished
172.31.0.101 is finished
172.31.0.105 is finished
172.31.0.103 is finished
复制

4.系统初始化

4.1 系统初始化playbook

[root@ansible-server ansible]# mkdir playbook/reset
[root@ansible-server ansible]# cd playbook/reset

[root@ansible-server reset]# vim vars.yml
ROCKY_URL: mirrors.ustc.edu.cn
URL: mirrors.cloud.tencent.com

[root@ansible-server reset]# mkdir templates

[root@ansible-server reset]# vim templates/yum8.repo.j2
[BaseOS]
name=BaseOS
{% if ansible_distribution =="Rocky" %}
baseurl=https://{{ ROCKY_URL }}/rocky/$releasever/BaseOS/$basearch/os/
{% elif ansible_distribution=="CentOS" %}
baseurl=https://{{ URL }}/centos/$releasever-stream/BaseOS/$basearch/os/
{% endif %}
gpgcheck=1
{% if ansible_distribution =="Rocky" %}
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
{% elif ansible_distribution=="CentOS" %}
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
{% endif %}

[AppStream]
name=AppStream
{% if ansible_distribution =="Rocky" %}
baseurl=https://{{ ROCKY_URL }}/rocky/$releasever/AppStream/$basearch/os/
{% elif ansible_distribution=="CentOS" %}
baseurl=https://{{ URL }}/centos/$releasever-stream/AppStream/$basearch/os/
{% endif %}
gpgcheck=1
{% if ansible_distribution =="Rocky" %}
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
{% elif ansible_distribution=="CentOS" %}
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
{% endif %}

[extras]
name=extras
{% if ansible_distribution =="Rocky" %}
baseurl=https://{{ ROCKY_URL }}/rocky/$releasever/extras/$basearch/os/
{% elif ansible_distribution=="CentOS" %}
baseurl=https://{{ URL }}/centos/$releasever-stream/extras/$basearch/os/
{% endif %}
gpgcheck=1
{% if ansible_distribution =="Rocky" %}
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
{% elif ansible_distribution=="CentOS" %}
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
{% endif %}

{% if ansible_distribution =="Rocky" %}
[plus]
{% elif ansible_distribution=="CentOS" %}
[centosplus]
{% endif %}
{% if ansible_distribution =="Rocky" %}
name=plus
{% elif ansible_distribution=="CentOS" %}
name=centosplus
{% endif %}
{% if ansible_distribution =="Rocky" %}
baseurl=https://{{ ROCKY_URL }}/rocky/$releasever/plus/$basearch/os/
{% elif ansible_distribution=="CentOS" %}
baseurl=https://{{ URL }}/centos/$releasever-stream/centosplus/$basearch/os/
{% endif %}
gpgcheck=1
{% if ansible_distribution =="Rocky" %}
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
{% elif ansible_distribution=="CentOS" %}
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
{% endif %}

[PowerTools]
name=PowerTools
{% if ansible_distribution =="Rocky" %}
baseurl=https://{{ ROCKY_URL }}/rocky/$releasever/PowerTools/$basearch/os/
{% elif ansible_distribution=="CentOS" %}
baseurl=https://{{ URL }}/centos/$releasever-stream/PowerTools/$basearch/os/
{% endif %}
gpgcheck=1
{% if ansible_distribution =="Rocky" %}
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
{% elif ansible_distribution=="CentOS" %}
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
{% endif %}

[epel]
name=epel
{% if ansible_distribution =="Rocky" %}
baseurl=https://{{ ROCKY_URL }}/fedora/epel/$releasever/Everything/$basearch/
{% elif ansible_distribution=="CentOS" %}
baseurl=https://{{ URL }}/epel/$releasever/Everything/$basearch/
{% endif %}
gpgcheck=1
{% if ansible_distribution =="Rocky" %}
gpgkey=https://{{ ROCKY_URL }}/fedora/epel/RPM-GPG-KEY-EPEL-$releasever
{% elif ansible_distribution=="CentOS" %}
gpgkey=https://{{ URL }}/epel/RPM-GPG-KEY-EPEL-$releasever
{% endif %}

[root@ansible-server reset]# vim templates/yum7.repo.j2
[base]
name=base
baseurl=https://{{ URL }}/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-$releasever

[extras]
name=extras
baseurl=https://{{ URL }}/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-$releasever

[updates]
name=updates
baseurl=https://{{ URL }}/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-$releasever

[centosplus]
name=centosplus
baseurl=https://{{ URL }}/centos/$releasever/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-$releasever

[epel]
name=epel
baseurl=https://{{ URL }}/epel/$releasever/$basearch/
gpgcheck=1
gpgkey=https://{{ URL }}/epel/RPM-GPG-KEY-EPEL-$releasever

[root@ansible-server reset]# vim templates/apt.list.j2
deb http://{{ URL }}/ubuntu/ {{ ansible_distribution_release }} main restricted universe multiverse
deb-src http://{{ URL }}/ubuntu/ {{ ansible_distribution_release }} main restricted universe multiverse

deb http://{{ URL }}/ubuntu/ {{ ansible_distribution_release }}-security main restricted universe multiverse
deb-src http://{{ URL }}/ubuntu/ {{ ansible_distribution_release }}-security main restricted universe multiverse

deb http://{{ URL }}/ubuntu/ {{ ansible_distribution_release }}-updates main restricted universe multiverse
deb-src http://{{ URL }}/ubuntu/ {{ ansible_distribution_release }}-updates main restricted universe multiverse

deb http://{{ URL }}/ubuntu/ {{ ansible_distribution_release }}-proposed main restricted universe multiverse
deb-src http://{{ URL }}/ubuntu/ {{ ansible_distribution_release }}-proposed main restricted universe multiverse

deb http://{{ URL }}/ubuntu/ {{ ansible_distribution_release }}-backports main restricted universe multiverse
deb-src http://{{ URL }}/ubuntu/ {{ ansible_distribution_release }}-backports main restricted universe multiverse

[root@ansible-server reset]# vim reset.yml  
---
- hosts: all
vars_files:
  vars.yml

tasks:
   - name: set hostname
    hostname:
      name: "{{ hname }}.{{ domain }}"
   - name: disable selinux
    replace:
      path: etc/sysconfig/selinux
      regexp: '^(SELINUX=).*'
      replace: '\1disabled'
    when:
       - (ansible_distribution=="CentOS" or ansible_distribution=="Rocky")
   - name: disable firewall
    systemd:
      name: firewalld
      state: stopped
      enabled: no
    when:
       - (ansible_distribution=="CentOS" or ansible_distribution=="Rocky")
   - name: disable ufw
    systemd:
      name: ufw
      state: stopped
      enabled: no
    when:
       - ansible_distribution=="Ubuntu"
   - name: optimization sshd disable UseDNS
    replace:
      path: etc/ssh/sshd_config
      regexp: '^#(UseDNS).*'
      replace: '\1 no'
   - name: optimization sshd diaable CentOS or Rocky GSSAPIAuthentication
    replace:
      path: etc/ssh/sshd_config
      regexp: '^(GSSAPIAuthentication).*'
      replace: '\1 no'
    when:
       - (ansible_distribution=="CentOS" or ansible_distribution=="Rocky")
   - name: optimization sshd diaable Ubuntu GSSAPIAuthentication
    replace:
      path: etc/ssh/sshd_config
      regexp: '^#(GSSAPIAuthentication).*'
      replace: '\1 no'
    when:
       - ansible_distribution=="Ubuntu"
   - name: set CentOS or Rocky alias
    lineinfile:
      path: ~/.bashrc
      line: "{{ item }}"
    loop:
       - "alias cdnet=\"cd etc/sysconfig/network-scripts\""
       - "alias vie0=\"vim etc/sysconfig/network-scripts/ifcfg-eth0\""
       - "alias vie1=\"vim etc/sysconfig/network-scripts/ifcfg-eth1\""
       - "alias scandisk=\"echo '- - -' > sys/class/scsi_host/host0/scan;echo '- - -' > sys/class/scsi_host/host1/scan;echo '- - -' > sys/class/scsi_host/host2/scan\""
    when:
       - (ansible_distribution=="CentOS" or ansible_distribution=="Rocky")
   - name: set Ubuntu alias
    lineinfile:
      path: ~/.bashrc
      line: "{{ item }}"
    loop:
       - "alias cdnet=\"cd etc/netplan\""
       - "alias scandisk=\"echo '- - -' > sys/class/scsi_host/host0/scan;echo '- - -' > sys/class/scsi_host/host1/scan;echo '- - -' > sys/class/scsi_host/host2/scan\""
    when:
       - ansible_distribution=="Ubuntu"
   - name: find CentOS or Rocky repo files
     find:
      paths: etc/yum.repos.d/
      patterns: "*.repo"
    register: FILENAME
    when:
       - (ansible_distribution=="CentOS" or ansible_distribution=="Rocky")
   - name: delete CentOS or Rocky repo files
    file:
      path: "{{ item.path }}"
      state: absent
    with_items: "{{ FILENAME.files }}"
    when:
       - (ansible_distribution=="CentOS" or ansible_distribution=="Rocky")
   - name: set CentOS8 or Rocky8 Mirror warehouse
    template:
      src: yum8.repo.j2
      dest: etc/yum.repos.d/base.repo
    when:
       - (ansible_distribution=="CentOS" or ansible_distribution=="Rocky")
       - ansible_distribution_major_version=="8"
   - name: set CentOS7 Mirror warehouse
    template:
      src: yum7.repo.j2
      dest: etc/yum.repos.d/base.repo
    when:
       - ansible_distribution=="CentOS"
       - ansible_distribution_major_version=="7"
   - name: set Ubuntu Mirror warehouse
    template:
      src: apt.list.j2
      dest: etc/apt/sources.list
    when:
       - ansible_distribution=="Ubuntu"
   - name: delete lock files
    file:
      path: "{{ item }}"
      state: absent
    loop:
       - var/lib/dpkg/lock
       - var/lib/apt/lists/lock
       - var/cache/apt/archives/lock
    when:
       - ansible_distribution=="Ubuntu"
   - name: apt update
    apt:
      update_cache: yes
      force: yes
    when:
       - ansible_distribution=="Ubuntu"
   - name: install Centos or Rocky package
    yum:
      name: vim,tree,lrzsz
    when:
       - (ansible_distribution=="CentOS" or ansible_distribution=="Rocky")
   - name: install Ubuntu package
    apt:
      name: tree,lrzsz
      force: yes
    when:
       - ansible_distribution=="Ubuntu"
   - name: reboot system
    reboot:

[root@ansible-server playbook]# cd ..
[root@ansible-server ansible]# ansible-playbook playbook/reset/reset.yml

PLAY [all] ************************************************************************************************************************************

TASK [Gathering Facts] ************************************************************************************************************************
ok: [172.31.0.103]
ok: [172.31.0.101]
ok: [172.31.0.104]
ok: [172.31.0.102]
ok: [172.31.0.105]

TASK [set hostname] ***************************************************************************************************************************
changed: [172.31.0.105]
changed: [172.31.0.104]
changed: [172.31.0.103]
changed: [172.31.0.101]
changed: [172.31.0.102]

TASK [disable selinux] ************************************************************************************************************************
skipping: [172.31.0.104]
skipping: [172.31.0.105]
changed: [172.31.0.103]
changed: [172.31.0.101]
changed: [172.31.0.102]

TASK [disable firewall] ***********************************************************************************************************************
skipping: [172.31.0.104]
skipping: [172.31.0.105]
changed: [172.31.0.103]
changed: [172.31.0.101]
changed: [172.31.0.102]

TASK [disable ufw] ****************************************************************************************************************************
skipping: [172.31.0.101]
skipping: [172.31.0.102]
skipping: [172.31.0.103]
changed: [172.31.0.104]
changed: [172.31.0.105]

TASK [optimization sshd disable UseDNS] *******************************************************************************************************
changed: [172.31.0.103]
changed: [172.31.0.104]
changed: [172.31.0.102]
changed: [172.31.0.101]
changed: [172.31.0.105]

TASK [optimization sshd diaable CentOS or Rocky GSSAPIAuthentication] *************************************************************************
skipping: [172.31.0.104]
skipping: [172.31.0.105]
changed: [172.31.0.103]
changed: [172.31.0.102]
changed: [172.31.0.101]

TASK [optimization sshd diaable Ubuntu GSSAPIAuthentication] **********************************************************************************
skipping: [172.31.0.101]
skipping: [172.31.0.102]
skipping: [172.31.0.103]
changed: [172.31.0.104]
changed: [172.31.0.105]

TASK [set CentOS or Rocky alias] **************************************************************************************************************
skipping: [172.31.0.104] => (item=alias cdnet="cd etc/sysconfig/network-scripts")
skipping: [172.31.0.104] => (item=alias vie0="vim etc/sysconfig/network-scripts/ifcfg-eth0")
skipping: [172.31.0.104] => (item=alias vie1="vim etc/sysconfig/network-scripts/ifcfg-eth1")
skipping: [172.31.0.104] => (item=alias scandisk="echo '- - -' > sys/class/scsi_host/host0/scan;echo '- - -' > sys/class/scsi_host/host1/scan;echo '- - -' > sys/class/scsi_host/host2/scan")
skipping: [172.31.0.105] => (item=alias cdnet="cd etc/sysconfig/network-scripts")
skipping: [172.31.0.105] => (item=alias vie0="vim etc/sysconfig/network-scripts/ifcfg-eth0")
skipping: [172.31.0.105] => (item=alias vie1="vim etc/sysconfig/network-scripts/ifcfg-eth1")
skipping: [172.31.0.105] => (item=alias scandisk="echo '- - -' > sys/class/scsi_host/host0/scan;echo '- - -' > sys/class/scsi_host/host1/scan;echo '- - -' > sys/class/scsi_host/host2/scan")
changed: [172.31.0.103] => (item=alias cdnet="cd etc/sysconfig/network-scripts")
changed: [172.31.0.102] => (item=alias cdnet="cd etc/sysconfig/network-scripts")
changed: [172.31.0.101] => (item=alias cdnet="cd etc/sysconfig/network-scripts")
changed: [172.31.0.103] => (item=alias vie0="vim etc/sysconfig/network-scripts/ifcfg-eth0")
changed: [172.31.0.102] => (item=alias vie0="vim etc/sysconfig/network-scripts/ifcfg-eth0")
changed: [172.31.0.103] => (item=alias vie1="vim etc/sysconfig/network-scripts/ifcfg-eth1")
changed: [172.31.0.101] => (item=alias vie0="vim etc/sysconfig/network-scripts/ifcfg-eth0")
changed: [172.31.0.103] => (item=alias scandisk="echo '- - -' > sys/class/scsi_host/host0/scan;echo '- - -' > sys/class/scsi_host/host1/scan;echo '- - -' > sys/class/scsi_host/host2/scan")
changed: [172.31.0.102] => (item=alias vie1="vim etc/sysconfig/network-scripts/ifcfg-eth1")
changed: [172.31.0.101] => (item=alias vie1="vim etc/sysconfig/network-scripts/ifcfg-eth1")
changed: [172.31.0.102] => (item=alias scandisk="echo '- - -' > sys/class/scsi_host/host0/scan;echo '- - -' > sys/class/scsi_host/host1/scan;echo '- - -' > sys/class/scsi_host/host2/scan")
changed: [172.31.0.101] => (item=alias scandisk="echo '- - -' > sys/class/scsi_host/host0/scan;echo '- - -' > sys/class/scsi_host/host1/scan;echo '- - -' > sys/class/scsi_host/host2/scan")

TASK [set Ubuntu alias] ***********************************************************************************************************************
skipping: [172.31.0.101] => (item=alias cdnet="cd etc/netplan")
skipping: [172.31.0.101] => (item=alias scandisk="echo '- - -' > sys/class/scsi_host/host0/scan;echo '- - -' > sys/class/scsi_host/host1/scan;echo '- - -' > sys/class/scsi_host/host2/scan")
skipping: [172.31.0.102] => (item=alias cdnet="cd etc/netplan")
skipping: [172.31.0.102] => (item=alias scandisk="echo '- - -' > sys/class/scsi_host/host0/scan;echo '- - -' > sys/class/scsi_host/host1/scan;echo '- - -' > sys/class/scsi_host/host2/scan")
skipping: [172.31.0.103] => (item=alias cdnet="cd etc/netplan")
skipping: [172.31.0.103] => (item=alias scandisk="echo '- - -' > sys/class/scsi_host/host0/scan;echo '- - -' > sys/class/scsi_host/host1/scan;echo '- - -' > sys/class/scsi_host/host2/scan")
changed: [172.31.0.105] => (item=alias cdnet="cd etc/netplan")
changed: [172.31.0.104] => (item=alias cdnet="cd etc/netplan")
changed: [172.31.0.105] => (item=alias scandisk="echo '- - -' > sys/class/scsi_host/host0/scan;echo '- - -' > sys/class/scsi_host/host1/scan;echo '- - -' > sys/class/scsi_host/host2/scan")
changed: [172.31.0.104] => (item=alias scandisk="echo '- - -' > sys/class/scsi_host/host0/scan;echo '- - -' > sys/class/scsi_host/host1/scan;echo '- - -' > sys/class/scsi_host/host2/scan")

TASK [find CentOS or Rocky repo files] ********************************************************************************************************
skipping: [172.31.0.104]
skipping: [172.31.0.105]
ok: [172.31.0.103]
ok: [172.31.0.101]
ok: [172.31.0.102]

TASK [delete CentOS or Rocky repo files] ******************************************************************************************************
skipping: [172.31.0.104]
skipping: [172.31.0.105]
changed: [172.31.0.103] => (item={'uid': 0, 'woth': False, 'mtime': 1603464839.0, 'inode': 134321074, 'isgid': False, 'size': 1664, 'roth': True, 'isuid': False, 'isreg': True, 'pw_name': 'root', 'gid': 0, 'ischr': False, 'wusr': True, 'xoth': False, 'rusr': True, 'nlink': 1, 'issock': False, 'rgrp': True, 'gr_name': 'root', 'path': '/etc/yum.repos.d/CentOS-Base.repo', 'xusr': False, 'atime': 1603464839.0, 'isdir': False, 'ctime': 1608541503.913163, 'isblk': False, 'xgrp': False, 'dev': 2050, 'wgrp': False, 'isfifo': False, 'mode': '0644', 'islnk': False})
changed: [172.31.0.102] => (item={'path': '/etc/yum.repos.d/CentOS-Linux-AppStream.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 719, 'inode': 67385230, 'dev': 64768, 'nlink': 1, 'atime': 1631668297.0, 'mtime': 1631668297.0, 'ctime': 1641029333.4996922, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.101] => (item={'path': '/etc/yum.repos.d/Rocky-AppStream.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 700, 'inode': 201329274, 'dev': 66306, 'nlink': 1, 'atime': 1633735759.0, 'mtime': 1633735759.0, 'ctime': 1637138057.3176675, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.103] => (item={'uid': 0, 'woth': False, 'mtime': 1603464839.0, 'inode': 134321075, 'isgid': False, 'size': 1309, 'roth': True, 'isuid': False, 'isreg': True, 'pw_name': 'root', 'gid': 0, 'ischr': False, 'wusr': True, 'xoth': False, 'rusr': True, 'nlink': 1, 'issock': False, 'rgrp': True, 'gr_name': 'root', 'path': '/etc/yum.repos.d/CentOS-CR.repo', 'xusr': False, 'atime': 1603464839.0, 'isdir': False, 'ctime': 1608541503.913163, 'isblk': False, 'xgrp': False, 'dev': 2050, 'wgrp': False, 'isfifo': False, 'mode': '0644', 'islnk': False})
changed: [172.31.0.103] => (item={'uid': 0, 'woth': False, 'mtime': 1603464839.0, 'inode': 134321076, 'isgid': False, 'size': 649, 'roth': True, 'isuid': False, 'isreg': True, 'pw_name': 'root', 'gid': 0, 'ischr': False, 'wusr': True, 'xoth': False, 'rusr': True, 'nlink': 1, 'issock': False, 'rgrp': True, 'gr_name': 'root', 'path': '/etc/yum.repos.d/CentOS-Debuginfo.repo', 'xusr': False, 'atime': 1603464839.0, 'isdir': False, 'ctime': 1608541503.913163, 'isblk': False, 'xgrp': False, 'dev': 2050, 'wgrp': False, 'isfifo': False, 'mode': '0644', 'islnk': False})
changed: [172.31.0.101] => (item={'path': '/etc/yum.repos.d/Rocky-BaseOS.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 685, 'inode': 201329275, 'dev': 66306, 'nlink': 1, 'atime': 1633735759.0, 'mtime': 1633735759.0, 'ctime': 1637138057.3176675, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.102] => (item={'path': '/etc/yum.repos.d/CentOS-Linux-BaseOS.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 704, 'inode': 67385231, 'dev': 64768, 'nlink': 1, 'atime': 1631668297.0, 'mtime': 1631668297.0, 'ctime': 1641029333.4996922, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.103] => (item={'uid': 0, 'woth': False, 'mtime': 1603464839.0, 'inode': 134321077, 'isgid': False, 'size': 630, 'roth': True, 'isuid': False, 'isreg': True, 'pw_name': 'root', 'gid': 0, 'ischr': False, 'wusr': True, 'xoth': False, 'rusr': True, 'nlink': 1, 'issock': False, 'rgrp': True, 'gr_name': 'root', 'path': '/etc/yum.repos.d/CentOS-Media.repo', 'xusr': False, 'atime': 1603464839.0, 'isdir': False, 'ctime': 1608541503.913163, 'isblk': False, 'xgrp': False, 'dev': 2050, 'wgrp': False, 'isfifo': False, 'mode': '0644', 'islnk': False})
changed: [172.31.0.102] => (item={'path': '/etc/yum.repos.d/CentOS-Linux-ContinuousRelease.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 1130, 'inode': 67385232, 'dev': 64768, 'nlink': 1, 'atime': 1631668297.0, 'mtime': 1631668297.0, 'ctime': 1641029333.4996922, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.101] => (item={'path': '/etc/yum.repos.d/Rocky-Debuginfo.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 1753, 'inode': 201329276, 'dev': 66306, 'nlink': 1, 'atime': 1633735759.0, 'mtime': 1633735759.0, 'ctime': 1637138057.3176675, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.103] => (item={'uid': 0, 'woth': False, 'mtime': 1603464839.0, 'inode': 134321078, 'isgid': False, 'size': 1331, 'roth': True, 'isuid': False, 'isreg': True, 'pw_name': 'root', 'gid': 0, 'ischr': False, 'wusr': True, 'xoth': False, 'rusr': True, 'nlink': 1, 'issock': False, 'rgrp': True, 'gr_name': 'root', 'path': '/etc/yum.repos.d/CentOS-Sources.repo', 'xusr': False, 'atime': 1603464839.0, 'isdir': False, 'ctime': 1608541503.913163, 'isblk': False, 'xgrp': False, 'dev': 2050, 'wgrp': False, 'isfifo': False, 'mode': '0644', 'islnk': False})
changed: [172.31.0.103] => (item={'uid': 0, 'woth': False, 'mtime': 1603464839.0, 'inode': 134321079, 'isgid': False, 'size': 8515, 'roth': True, 'isuid': False, 'isreg': True, 'pw_name': 'root', 'gid': 0, 'ischr': False, 'wusr': True, 'xoth': False, 'rusr': True, 'nlink': 1, 'issock': False, 'rgrp': True, 'gr_name': 'root', 'path': '/etc/yum.repos.d/CentOS-Vault.repo', 'xusr': False, 'atime': 1603464839.0, 'isdir': False, 'ctime': 1608541503.913163, 'isblk': False, 'xgrp': False, 'dev': 2050, 'wgrp': False, 'isfifo': False, 'mode': '0644', 'islnk': False})
changed: [172.31.0.102] => (item={'path': '/etc/yum.repos.d/CentOS-Linux-Debuginfo.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 318, 'inode': 67385233, 'dev': 64768, 'nlink': 1, 'atime': 1631668297.0, 'mtime': 1631668297.0, 'ctime': 1641029333.4996922, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.101] => (item={'path': '/etc/yum.repos.d/Rocky-Devel.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 350, 'inode': 201329277, 'dev': 66306, 'nlink': 1, 'atime': 1633735759.0, 'mtime': 1633735759.0, 'ctime': 1637138057.3176675, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.103] => (item={'uid': 0, 'woth': False, 'mtime': 1603464839.0, 'inode': 134321080, 'isgid': False, 'size': 314, 'roth': True, 'isuid': False, 'isreg': True, 'pw_name': 'root', 'gid': 0, 'ischr': False, 'wusr': True, 'xoth': False, 'rusr': True, 'nlink': 1, 'issock': False, 'rgrp': True, 'gr_name': 'root', 'path': '/etc/yum.repos.d/CentOS-fasttrack.repo', 'xusr': False, 'atime': 1603464839.0, 'isdir': False, 'ctime': 1608541503.915163, 'isblk': False, 'xgrp': False, 'dev': 2050, 'wgrp': False, 'isfifo': False, 'mode': '0644', 'islnk': False})
changed: [172.31.0.102] => (item={'path': '/etc/yum.repos.d/CentOS-Linux-Devel.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 732, 'inode': 67385234, 'dev': 64768, 'nlink': 1, 'atime': 1631668297.0, 'mtime': 1631668297.0, 'ctime': 1641029333.4996922, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.103] => (item={'uid': 0, 'woth': False, 'mtime': 1603464839.0, 'inode': 134321081, 'isgid': False, 'size': 616, 'roth': True, 'isuid': False, 'isreg': True, 'pw_name': 'root', 'gid': 0, 'ischr': False, 'wusr': True, 'xoth': False, 'rusr': True, 'nlink': 1, 'issock': False, 'rgrp': True, 'gr_name': 'root', 'path': '/etc/yum.repos.d/CentOS-x86_64-kernel.repo', 'xusr': False, 'atime': 1603464839.0, 'isdir': False, 'ctime': 1608541503.915163, 'isblk': False, 'xgrp': False, 'dev': 2050, 'wgrp': False, 'isfifo': False, 'mode': '0644', 'islnk': False})
changed: [172.31.0.101] => (item={'path': '/etc/yum.repos.d/Rocky-Extras.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 685, 'inode': 201329278, 'dev': 66306, 'nlink': 1, 'atime': 1633735759.0, 'mtime': 1633735759.0, 'ctime': 1637138057.3176675, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.102] => (item={'path': '/etc/yum.repos.d/CentOS-Linux-Extras.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 704, 'inode': 67385235, 'dev': 64768, 'nlink': 1, 'atime': 1631668297.0, 'mtime': 1631668297.0, 'ctime': 1641029333.4996922, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.101] => (item={'path': '/etc/yum.repos.d/Rocky-HighAvailability.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 721, 'inode': 201329279, 'dev': 66306, 'nlink': 1, 'atime': 1633735759.0, 'mtime': 1633735759.0, 'ctime': 1637138057.3176675, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.102] => (item={'path': '/etc/yum.repos.d/CentOS-Linux-FastTrack.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 719, 'inode': 67385236, 'dev': 64768, 'nlink': 1, 'atime': 1631668297.0, 'mtime': 1631668297.0, 'ctime': 1641029333.4996922, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.101] => (item={'path': '/etc/yum.repos.d/Rocky-Media.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 680, 'inode': 201333312, 'dev': 66306, 'nlink': 1, 'atime': 1633735759.0, 'mtime': 1633735759.0, 'ctime': 1637138057.3176675, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.102] => (item={'path': '/etc/yum.repos.d/CentOS-Linux-HighAvailability.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 740, 'inode': 67385237, 'dev': 64768, 'nlink': 1, 'atime': 1631668297.0, 'mtime': 1631668297.0, 'ctime': 1641029333.4996922, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.101] => (item={'path': '/etc/yum.repos.d/Rocky-NFV.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 670, 'inode': 201333313, 'dev': 66306, 'nlink': 1, 'atime': 1633735759.0, 'mtime': 1633735759.0, 'ctime': 1637138057.3176675, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.102] => (item={'path': '/etc/yum.repos.d/CentOS-Linux-Media.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 693, 'inode': 67385238, 'dev': 64768, 'nlink': 1, 'atime': 1631668297.0, 'mtime': 1631668297.0, 'ctime': 1641029333.501692, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.101] => (item={'path': '/etc/yum.repos.d/Rocky-Plus.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 680, 'inode': 201333314, 'dev': 66306, 'nlink': 1, 'atime': 1633735759.0, 'mtime': 1633735759.0, 'ctime': 1637138057.3176675, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.102] => (item={'path': '/etc/yum.repos.d/CentOS-Linux-Plus.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 706, 'inode': 67385239, 'dev': 64768, 'nlink': 1, 'atime': 1631668297.0, 'mtime': 1631668297.0, 'ctime': 1641029333.501692, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.101] => (item={'path': '/etc/yum.repos.d/Rocky-PowerTools.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 705, 'inode': 201333315, 'dev': 66306, 'nlink': 1, 'atime': 1633735759.0, 'mtime': 1633735759.0, 'ctime': 1637138057.3176675, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.102] => (item={'path': '/etc/yum.repos.d/CentOS-Linux-PowerTools.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 724, 'inode': 67385240, 'dev': 64768, 'nlink': 1, 'atime': 1631668297.0, 'mtime': 1631668297.0, 'ctime': 1641029333.501692, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.101] => (item={'path': '/etc/yum.repos.d/Rocky-RT.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 671, 'inode': 201333316, 'dev': 66306, 'nlink': 1, 'atime': 1633735759.0, 'mtime': 1633735759.0, 'ctime': 1637138057.3176675, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.102] => (item={'path': '/etc/yum.repos.d/CentOS-Linux-Sources.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 1124, 'inode': 67385241, 'dev': 64768, 'nlink': 1, 'atime': 1631668297.0, 'mtime': 1631668297.0, 'ctime': 1641029333.501692, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.101] => (item={'path': '/etc/yum.repos.d/Rocky-ResilientStorage.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 736, 'inode': 201333317, 'dev': 66306, 'nlink': 1, 'atime': 1633735759.0, 'mtime': 1633735759.0, 'ctime': 1637138057.3176675, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})
changed: [172.31.0.101] => (item={'path': '/etc/yum.repos.d/Rocky-Sources.repo', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 2335, 'inode': 201333318, 'dev': 66306, 'nlink': 1, 'atime': 1633735759.0, 'mtime': 1633735759.0, 'ctime': 1637138057.319668, 'gr_name': 'root', 'pw_name': 'root', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False})

TASK [set CentOS8 or Rocky8 Mirror warehouse] *************************************************************************************************
skipping: [172.31.0.103]
skipping: [172.31.0.104]
skipping: [172.31.0.105]
changed: [172.31.0.102]
changed: [172.31.0.101]

TASK [set CentOS7 Mirror warehouse] ***********************************************************************************************************
skipping: [172.31.0.101]
skipping: [172.31.0.102]
skipping: [172.31.0.104]
skipping: [172.31.0.105]
changed: [172.31.0.103]

TASK [set Ubuntu Mirror warehouse] ************************************************************************************************************
skipping: [172.31.0.101]
skipping: [172.31.0.102]
skipping: [172.31.0.103]
changed: [172.31.0.105]
changed: [172.31.0.104]

TASK [delete lock files] **********************************************************************************************************************
skipping: [172.31.0.101] => (item=/var/lib/dpkg/lock)
skipping: [172.31.0.101] => (item=/var/lib/apt/lists/lock)
skipping: [172.31.0.101] => (item=/var/cache/apt/archives/lock)
skipping: [172.31.0.102] => (item=/var/lib/dpkg/lock)
skipping: [172.31.0.102] => (item=/var/lib/apt/lists/lock)
skipping: [172.31.0.102] => (item=/var/cache/apt/archives/lock)
skipping: [172.31.0.103] => (item=/var/lib/dpkg/lock)
skipping: [172.31.0.103] => (item=/var/lib/apt/lists/lock)
skipping: [172.31.0.103] => (item=/var/cache/apt/archives/lock)
changed: [172.31.0.105] => (item=/var/lib/dpkg/lock)
changed: [172.31.0.104] => (item=/var/lib/dpkg/lock)
changed: [172.31.0.105] => (item=/var/lib/apt/lists/lock)
changed: [172.31.0.104] => (item=/var/lib/apt/lists/lock)
changed: [172.31.0.105] => (item=/var/cache/apt/archives/lock)
changed: [172.31.0.104] => (item=/var/cache/apt/archives/lock)

TASK [apt update] *****************************************************************************************************************************
skipping: [172.31.0.101]
skipping: [172.31.0.102]
skipping: [172.31.0.103]
changed: [172.31.0.105]
changed: [172.31.0.104]

TASK [install Centos or Rocky package] ********************************************************************************************************
skipping: [172.31.0.104]
skipping: [172.31.0.105]
changed: [172.31.0.103]
changed: [172.31.0.101]
changed: [172.31.0.102]

TASK [install Ubuntu package] *****************************************************************************************************************
skipping: [172.31.0.101]
skipping: [172.31.0.102]
skipping: [172.31.0.103]
changed: [172.31.0.105]
changed: [172.31.0.104]

TASK [reboot system] **************************************************************************************************************************
changed: [172.31.0.103]
changed: [172.31.0.101]
changed: [172.31.0.105]
changed: [172.31.0.104]
changed: [172.31.0.102]

PLAY RECAP ************************************************************************************************************************************
172.31.0.101               : ok=12   changed=10   unreachable=0    failed=0    skipped=8    rescued=0    ignored=0  
172.31.0.102               : ok=12   changed=10   unreachable=0    failed=0    skipped=8    rescued=0    ignored=0  
172.31.0.103               : ok=12   changed=10   unreachable=0    failed=0    skipped=8    rescued=0    ignored=0  
172.31.0.104               : ok=11   changed=10   unreachable=0    failed=0    skipped=9    rescued=0    ignored=0  
172.31.0.105               : ok=11   changed=10   unreachable=0    failed=0    skipped=9    rescued=0    ignored=0

[root@rocky8-client ~]# hostname
rocky8-client.example.local
[root@centos8-client ~]# hostname
centos8-client.example.local
[root@centos7-client ~]# hostname
centos7-client.example.local
root@ubuntu1804-client:~# hostname
ubuntu1804-client.example.local
root@ubuntu2004-client:~# hostname
ubuntu2004-client.example.local

[root@rocky8-client ~]# getenforce
Disabled
[root@centos8-client ~]# getenforce
Disabled
[root@centos7-client ~]# getenforce
Disabled

[root@rocky8-client ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
  Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
  Active: inactive (dead)
    Docs: man:firewalld(1)
[root@centos8-client ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
  Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
  Active: inactive (dead)
    Docs: man:firewalld(1)
[root@centos7-client ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
  Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
  Active: inactive (dead)
    Docs: man:firewalld(1)

root@ubuntu1804-client:~# systemctl status ufw
● ufw.service - Uncomplicated firewall
  Loaded: loaded (/lib/systemd/system/ufw.service; disabled; vendor preset: enabled)
  Active: inactive (dead)
    Docs: man:ufw(8)
root@ubuntu2004-client:~# systemctl status ufw
● ufw.service - Uncomplicated firewall
    Loaded: loaded (/lib/systemd/system/ufw.service; disabled; vendor preset: enabled)
    Active: inactive (dead)
      Docs: man:ufw(8)
   
[root@rocky8-client ~]# grep "^UseDNS" etc/ssh/sshd_config
UseDNS no
[root@rocky8-client ~]# grep "^GSSAPIAuthentication" etc/ssh/sshd_config
GSSAPIAuthentication no
[root@centos8-client ~]# grep "^UseDNS" etc/ssh/sshd_config
UseDNS no
[root@centos8-client ~]# grep "^GSSAPIAuthentication" etc/ssh/sshd_config
GSSAPIAuthentication no
[root@centos7-client ~]# grep "^UseDNS" etc/ssh/sshd_config
UseDNS no
[root@centos7-client ~]# grep "^GSSAPIAuthentication" etc/ssh/sshd_config
GSSAPIAuthentication no
root@ubuntu1804-client:~# grep "^UseDNS" etc/ssh/sshd_config
UseDNS no
root@ubuntu1804-client:~# grep "GSSAPIAuthentication" etc/ssh/sshd_config
GSSAPIAuthentication no
root@ubuntu2004-client:~# grep "^UseDNS" etc/ssh/sshd_config
UseDNS no
root@ubuntu2004-client:~# grep "GSSAPIAuthentication" etc/ssh/sshd_config
GSSAPIAuthentication no

[root@rocky8-client ~]# ll etc/yum.repos.d/
total 4
-rw-r--r--. 1 root root 1078 Dec 24 23:24 base.repo
[root@rocky8-client ~]# cat etc/yum.repos.d/base.repo
[BaseOS]
name=BaseOS
baseurl=https://mirrors.ustc.edu.cn/rocky/$releasever/BaseOS/$basearch/os/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial

[AppStream]
name=AppStream
baseurl=https://mirrors.ustc.edu.cn/rocky/$releasever/AppStream/$basearch/os/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial

[extras]
name=extras
baseurl=https://mirrors.ustc.edu.cn/rocky/$releasever/extras/$basearch/os/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
enabled=1

[plus]
name=plus
baseurl=https://mirrors.ustc.edu.cn/rocky/$releasever/plus/$basearch/os/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial

[PowerTools]
name=PowerTools
baseurl=https://mirrors.ustc.edu.cn/rocky/$releasever/PowerTools/$basearch/os/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial

[epel]
name=epel
baseurl=https://mirrors.ustc.edu.cn/fedora/epel/$releasever/Everything/$basearch/
gpgcheck=1
gpgkey=https://mirrors.ustc.edu.cn/fedora/epel/RPM-GPG-KEY-EPEL-$releasever

[root@centos8-client ~]# ll etc/yum.repos.d/
total 4
-rw-r--r--. 1 root root 1082 Jan  1 18:53 base.repo
[root@centos8-client ~]# cat etc/yum.repos.d/base.repo
[BaseOS]
name=BaseOS
baseurl=https://mirrors.cloud.tencent.com/centos/$releasever/BaseOS/$basearch/os/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

[AppStream]
name=AppStream
baseurl=https://mirrors.cloud.tencent.com/centos/$releasever/AppStream/$basearch/os/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

[extras]
name=extras
baseurl=https://mirrors.cloud.tencent.com/centos/$releasever/extras/$basearch/os/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

[centosplus]
name=centosplus
baseurl=https://mirrors.cloud.tencent.com/centos/$releasever/centosplus/$basearch/os/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

[PowerTools]
name=PowerTools
baseurl=https://mirrors.cloud.tencent.com/centos/$releasever/PowerTools/$basearch/os/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

[epel]
name=epel
baseurl=https://mirrors.cloud.tencent.com/epel/$releasever/Everything/$basearch/
gpgcheck=1
gpgkey=https://mirrors.cloud.tencent.com/epel/RPM-GPG-KEY-EPEL-$releasever

[root@centos7-client ~]# ll etc/yum.repos.d/
total 4
-rw-r--r--. 1 root root 876 Dec 26 15:03 base.repo
[root@centos7-client ~]# cat etc/yum.repos.d/base.repo
[base]
name=base
baseurl=https://mirrors.cloud.tencent.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-$releasever

[extras]
name=extras
baseurl=https://mirrors.cloud.tencent.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-$releasever

[updates]
name=updates
baseurl=https://mirrors.cloud.tencent.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-$releasever

[centosplus]
name=centosplus
baseurl=https://mirrors.cloud.tencent.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-$releasever

[epel]
name=epel
baseurl=https://mirrors.cloud.tencent.com/epel/$releasever/$basearch/
gpgcheck=1
gpgkey=https://mirrors.cloud.tencent.com/epel/RPM-GPG-KEY-EPEL-$releasever

root@ubuntu1804-client:~# cat etc/apt/sources.list
deb http://mirrors.cloud.tencent.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ bionic main restricted universe multiverse

deb http://mirrors.cloud.tencent.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ bionic-security main restricted universe multiverse

deb http://mirrors.cloud.tencent.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ bionic-updates main restricted universe multiverse

deb http://mirrors.cloud.tencent.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ bionic-proposed main restricted universe multiverse

deb http://mirrors.cloud.tencent.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ bionic-backports main restricted universe multiverse

root@ubuntu2004-client:~# cat etc/apt/sources.list
deb http://mirrors.cloud.tencent.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ focal main restricted universe multiverse

deb http://mirrors.cloud.tencent.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ focal-security main restricted universe multiverse

deb http://mirrors.cloud.tencent.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ focal-updates main restricted universe multiverse

deb http://mirrors.cloud.tencent.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ focal-proposed main restricted universe multiverse

deb http://mirrors.cloud.tencent.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ focal-backports main restricted universe multiverse

[root@rocky8-client ~]# rpm -q tree
tree-1.7.0-15.el8.x86_64
[root@rocky8-client ~]# rpm -q lrzsz
lrzsz-0.12.20-43.el8.x86_64
[root@rocky8-client ~]# rpm -q vim-enhanced
vim-enhanced-8.0.1763-16.el8.x86_64
[root@centos8-client ~]# rpm -q tree
tree-1.7.0-15.el8.x86_64
[root@centos8-client ~]# rpm -q lrzsz
lrzsz-0.12.20-43.el8.x86_64
[root@centos8-client ~]# rpm -q vim-enhanced
vim-enhanced-8.0.1763-16.el8.x86_64
[root@centos7-client ~]# rpm -q tree
tree-1.6.0-10.el7.x86_64
[root@centos7-client ~]# rpm -q lrzsz
lrzsz-0.12.20-36.el7.x86_64
[root@centos7-client ~]# rpm -q vim-enhanced
vim-enhanced-7.4.629-8.el7_9.x86_64

root@ubuntu1804-client:~# dpkg -s tree
Package: tree
Status: install ok installed
Priority: optional
Section: utils
Installed-Size: 103
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Version: 1.7.0-5
Depends: libc6 (>= 2.14)
Description: displays an indented directory tree, in color
Tree is a recursive directory listing command that produces a depth indented
listing of files, which is colorized ala dircolors if the LS_COLORS environment
variable is set and output is to tty.
Original-Maintainer: Florian Ernst <florian@debian.org>
Homepage: http://mama.indstate.edu/users/ice/tree/
root@ubuntu1804-client:~# dpkg -s lrzsz
Package: lrzsz
Status: install ok installed
Priority: optional
Section: comm
Installed-Size: 519
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Version: 0.12.21-10~build0.18.04.1
Depends: libc6 (>= 2.15)
Suggests: minicom
Description: Tools for zmodem/xmodem/ymodem file transfer
Lrzsz is a cosmetically modified zmodem/ymodem/xmodem package built
from the public-domain version of Chuck Forsberg's rzsz package.
.
These programs use error correcting protocols ({z,x,y}modem) to send
(sz, sx, sb) and receive (rz, rx, rb) files over a dial-in serial port
from a variety of programs running under various operating systems.
Original-Maintainer: Martin A. Godisch <godisch@debian.org>
Homepage: https://ohse.de/uwe/software/lrzsz.html

root@ubuntu2004-client:~# dpkg -s tree
Package: tree
Status: install ok installed
Priority: optional
Section: utils
Installed-Size: 112
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Version: 1.8.0-1
Depends: libc6 (>= 2.4)
Description: displays an indented directory tree, in color
Tree is a recursive directory listing command that produces a depth indented
listing of files, which is colorized ala dircolors if the LS_COLORS environment
variable is set and output is to tty.
Original-Maintainer: Florian Ernst <florian@debian.org>
Homepage: http://mama.indstate.edu/users/ice/tree/
root@ubuntu2004-client:~# dpkg -s lrzsz
Package: lrzsz
Status: install ok installed
Priority: optional
Section: comm
Installed-Size: 519
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Version: 0.12.21-10
Depends: libc6 (>= 2.15)
Suggests: minicom
Description: Tools for zmodem/xmodem/ymodem file transfer
Lrzsz is a cosmetically modified zmodem/ymodem/xmodem package built
from the public-domain version of Chuck Forsberg's rzsz package.
.
These programs use error correcting protocols ({z,x,y}modem) to send
(sz, sx, sb) and receive (rz, rx, rb) files over a dial-in serial port
from a variety of programs running under various operating systems.
Original-Maintainer: Martin A. Godisch <godisch@debian.org>
Homepage: https://ohse.de/uwe/software/lrzsz.html
复制



文章转载自Raymond运维云原生技术交流,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论