RHCE之路–05使用 Ansible Galaxy 安装角色
1. 考题
使用 Ansible Galaxy 和要求文件 /home/student/ansible/roles/requirements.yml 。从以下
URL 下载角色并安装到 /home/student/ansible/roles :
-
http://materials.example.com/cd/exam_rhce8/haproxy.tar 此角色的名称应当为
balancer http://materials.example.com/cd/exam_rhce8/haproxy.tar -
http://materials.example.com/cd/exam_rhce8/phpinfo.tar 此角色的名称应当为
phpinfo http://materials.example.com/cd/exam_rhce8/phpinfo.tar
2. 解题
2.1 编辑/home/student/ansible/roles/requirements.yml
vi /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
2.2 安装requirements.yml
ansible-galaxy install -r /home/student/ansible/roles/requirements.yml -p roles
3. 确认本题是否成功
确认roles是否生成
ansible-galaxy list