lenf 发表于 2018-1-3 10:18:43

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]
查看完整版本: ansible 使用