2019-02-25 10:04:26 +00:00
|
|
|
# ansible-galaxy
|
|
|
|
|
2019-10-18 04:30:29 +01:00
|
|
|
> 创建和管理 Ansible 角色.
|
2019-10-18 03:33:27 +01:00
|
|
|
> 主页:<https://docs.ansible.com/ansible/latest/cli/ansible-galaxy.html>.
|
2019-02-25 10:04:26 +00:00
|
|
|
|
2019-10-18 03:33:27 +01:00
|
|
|
- 安装一个角色:
|
2019-02-25 10:04:26 +00:00
|
|
|
|
2019-10-18 04:30:29 +01:00
|
|
|
`ansible-galaxy install {{用户名.角色名}}`
|
2019-02-25 10:04:26 +00:00
|
|
|
|
2019-10-18 03:33:27 +01:00
|
|
|
- 移除一个角色:
|
2019-02-25 10:04:26 +00:00
|
|
|
|
2019-10-18 04:30:29 +01:00
|
|
|
`ansible-galaxy remove {{用户名.角色名}}`
|
2019-02-25 10:04:26 +00:00
|
|
|
|
2019-10-18 03:33:27 +01:00
|
|
|
- 列出已安装的角色:
|
2019-02-25 10:04:26 +00:00
|
|
|
|
|
|
|
`ansible-galaxy list`
|
|
|
|
|
2019-10-18 03:33:27 +01:00
|
|
|
- 搜索一个指定的角色:
|
2019-02-25 10:04:26 +00:00
|
|
|
|
2019-02-25 14:44:25 +00:00
|
|
|
`ansible-galaxy search {{角色名}}`
|
2019-02-25 10:04:26 +00:00
|
|
|
|
2019-10-18 03:33:27 +01:00
|
|
|
- 创建一个新的角色:
|
2019-02-25 10:04:26 +00:00
|
|
|
|
2019-02-25 14:44:25 +00:00
|
|
|
`ansible-galaxy init {{角色名}}`
|