1. 程式人生 > >ansible-playbook01-批量修復雲服務器漏洞

ansible-playbook01-批量修復雲服務器漏洞

update log ... cnblogs date open all package nss

vim packages.yml

---
- hosts: all
  tasks:
    - name: "update git"
      yum: name=git state=latest
    - name: "update perl-git"
      yum: name=perl-Git state=latest
    - name: "expat"
      yum: name=expat state=latest
    - name: "update openssl"
      yum: name=openssl state=latest   
    ...

  

執行方法: ansible-playbook packages.yml

註意要點:使用ansible的yum模塊

ansible-playbook01-批量修復雲服務器漏洞