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