[root@ceshi-128 ~]# ssh-keygen -t rsa Generating public/private rsa key pair. Enter file inwhich to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: SHA256:pAqXlThsC0a5ir8tBu+7+5PnZbK/5Pdzfg root@ceshi-128.host.com The key's randomart image is: +---[RSA 2048]----+ | .. | | ... . . | | .o.=oo . | | .+o+= o | |...=+ . S | |+ o+.o . + | | =. .= . o o | |oo*=+.o . | |o*BOO= E | +----[SHA256]-----+
配置ansible机器清单
1 2 3 4 5 6 7 8 9 10 11 12 13
[root@ceshi-128 ~]# vi /etc/ansible/hosts [ceshi] 10.1.74.20 10.1.74.21 10.1.74.22 10.1.74.23 10.1.74.24
PLAY [ceshi] ***************************************************************************************************************************************************************