ansible galaxy

http://www.ansible.com.cn/docs/galaxy.html

galaxy

https://galaxy.ansible.com/ui/search/

1
2
3
4
5
6
ansible-galaxy search                   在galaxy上搜索角色
ansible-galaxy install 从galaxu上下载角色
-r 从文件中安装多个角色
-p 指定安装路径
ansible-galaxy init 创建自定义角色
ansible-galaxy list 查看角色

#从文件中下载角色到指定路径

ansible-galaxy install -r galaxyroles.yml -p /home/greg/ansible/roles/

cat galaxyroles.yml

- src: http://materials/ phpinfo.tar
name: phpinfo

1
2
3
4
5
6
7
8
9
10
❯ ansible-galaxy role install adfinis-sygroup.redis
Starting galaxy role install process
- downloading role 'redis', owned by adfinis-sygroup
- downloading role from https://github.com/adfinis-sygroup/ansible-role-redis/archive/master.tar.gz
- extracting adfinis-sygroup.redis to /opt/ansible/roles/adfinis-sygroup.redis
- adfinis-sygroup.redis (master) was installed successfully

❯ ansible-galaxy list
# /opt/ansible/roles
- adfinis-sygroup.redis, master
点击打赏
文章目录
  1. 1. galaxy
载入天数...载入时分秒... ,