Ansible自动化运维简单实战运用

Ansible自动化运维

其中有两款软件是基于python语言开发,saltstack,ansible都是基于python编写

Ansible介绍

Ansible特点

 

Ansible实践部署

 

yum install epel-release –y

yum install ansible libselinux-python –y

rpm –ql ansible | grep –E “^/etc|^/usr/bin”

 yum install epel-release libselinux-python -y

 cp /etc/ansible/hosts{,.ori}

tail -3 /etc/ansible/hosts

 

 Ansible chaoge –m command –a ‘hostname’ –k –u root

vim /etc/absible/hosts

 

ansible chaoge -a command -a "ifconfig ens33"

 

ssh-keygen -f ~/.ssh/id_rsa -P "" > /dev/null 2>&1

cd ~/.ssh/

ls

 

 

Ansible模板与命令

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值