ansible 使用
批量添加ssh免密ansible mhc -m authorized_key -a "user=root key='{{ lookup('file','/root/.ssh/id_dsa.pub') }}'" -k // -k是询问密码
启动停止系统服务
ansible all-m systemd -a "name=docker state=started"
ansible all-m systemd -a "name=docker state=stopped"
页:
[1]