RHCE8 练习题:下载角色

使用Ansible Galaxy和 要求文件 /home/student/ansible/roles/requirements.yml 从以下URL下载角色并安装到 /home/student/ansible/roles:


Answer

vim /home/student/ansible/roles/requirements.yml
---
- src: http://materials.example.com/cd/exam_rhce8/haproxy.tar
  name: balancer
- src: http://materials.example.com/cd/exam_rhce8/phpinfo.tar
  name: phpinfo
cd /home/student/ansible
ansible-galaxy install -r roles/requirements.yml

验证

ll roles/
ansible-galaxy list

file