批量添加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"