ansible 学习记录(一) -- 环境准备

ansible 学习记录(一) – ansible 安装

ansible 学习机器准备

hostname system ip cpu mem data username passwd role ansible
master CentOS 7 192.168.157.130 2核 4GB 30GB root 123456 ansible master 2.4.2
node1 CentOS 7 192.168.157.131 2核 4GB 30GB root 123456 ansible node1
node2 CentOS 7 192.168.157.132 2核 4GB 30GB root 123456 ansible node2
  • host 映射配置 – 所有节点
[root@master ~]# echo " " >> /etc/hosts
[root@master ~]# echo "192.168.157.130    master" >> /etc/hosts
[root@master ~]# echo "192.168.157.131    node1" >> /etc/hosts
[root@master ~]# echo "192.168.157.132    node2" >> /etc/hosts

ansible 安装准备

[root@master ~]# yum install ansible

在这里插入图片描述
在这里插入图片描述

  • 安装验证
[root@master ~]# ansible --version

在这里插入图片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章