tecris.ansible-maven
Maven Ansible 角色
与新 https://galaxy.ansible.com 相关的更改(2023年11月)
由于 v3.9.6
角色的导入,角色名称已更改(从 tecris.maven
变为 tecris.ansible-maven
),如同 https://galaxy.ansible.com 重新上线一样。
安装
$ ansible-galaxy install tecris.ansible-maven # 最新版本
$ ansible-galaxy install tecris.ansible-maven,17.10.28 # 指定版本
示例剧本
- hosts: all
roles:
- { role: tecris.ansible-maven, maven_major: 3, maven_version: 3.9.6, maven_home_parent_directory: /opt }
角色变量
变量 | 默认值 | 描述 |
---|---|---|
maven_major | 3 | 主版本号(MAJOR)版本 |
maven_version | 3.9.6 | 版本号 |
maven_home_parent_directory | /opt | MAVEN_HOME 的父目录 |
maven_download_url | http://www.apache.org/dist/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz | 如果使用镜像/代理(见 ansible.builtin.get_url) |
maven_download_username | 见 url_username 参数 | |
maven_download_password | 见 url_password 参数 |
测试
- 参见 molecule
- 操作方法
- 初步任务
- 构建 molecule docker 镜像
# git clone https://github.com/tecris/dockerfiles # cd dockerfiles/molecule/6 # ./build_image.sh
- 构建测试镜像(以
debian 10
为例)- 第一步
# git clone https://github.com/tecris/dockerfiles # cd dockerfiles/systemd # ./build_image.sh debian 10
- 第二步(向测试镜像添加 jdk)
# git clone https://github.com/tecris/ansible-maven # cd ansible-maven/dockerfiles # ./build_image.sh debian 10
- 第一步
- 构建 molecule docker 镜像
- 运行 molecule 测试
# git clone https://github.com/tecris/ansible-maven # cd ansible-maven # ./run_molecule.sh # TAG=23.08.04 molecule test -s debian_10
- 初步任务
日常维护
ansible-galaxy role import --token=the_token tecris ansible-maven
https://ansible.readthedocs.io/projects/galaxy-ng/en/latest/community/userguide/#importing-roles
安装
ansible-galaxy install tecris.ansible-maven
许可证
other
下载
23.9k
拥有者