ansible-maven-repo使用从Maven存储库下载工件。先决条件使用现有的Ansible模块安装ansible-galaxy install geerlingguy.java ansible-galaxy install https://github.com/silpion/ansible-maven.git - hosts : localhost roles : - { role: ansible-maven } - { role: geerlingguy.java } vars : java_packages : - java-1.7.0-openjdk例子从,可选择从不同的存储库下载任意数量的Maven工件- hosts : localhost vars : mvn_artifact