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

vim packages.ymlgit

---
- 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.ymlvim

注意要點:使用ansible的yum模塊bash

相關文章
相關標籤/搜索