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模块
时间: 2024-11-05 12:04:08