可以使用quay.io/ansible/creator-ee作为包含Ansible Molecule的容器映像
备忘录:可以使用包含 Ansible Molecule 的容器映像
-
- quay.io/ansible/molecule
- quay.io/ansible/toolset
我以前使用了等等,但是它们已经没有了,所以我开始寻找替代品。
结论:quay.io/ansible/creator-ee 包含着 Ansible Molecule。
在查看了quay.io/ansible/下的内容后,发现其中包含了Ansible Molecule等插件的creator-ee(Ansible Creator Execution Environment)。
$ podman run -it --rm quay.io/ansible/creator-ee:v0.10.4
...
bash-5.2# grep PRETTY_NAME /etc/os-release
PRETTY_NAME="Fedora Linux 36 (Container Image)"
bash-5.2# molecule --version
molecule 4.0.3 using python 3.10
ansible:2.14.0rc2
delegated:4.0.3 from molecule
podman:2.0.3 from molecule_podman requiring collections: containers.podman>=1.7.0 ansible.posix>=1.3.0
bash-5.2# ansible-lint --version
ansible-lint 6.8.6 using ansible 2.14.0rc2
bash-5.2# ansible --version
ansible [core 2.14.0rc2]
config file = None
configured module search path = ['/home/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.10/site-packages/ansible
ansible collection location = /home/runner/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.10.7 (main, Sep 7 2022, 00:00:00) [GCC 12.2.1 20220819 (Red Hat 12.2.1-1)] (/usr/bin/python3)
jinja version = 3.1.2
libyaml = True
bash-5.2# rpm -q git
git-2.37.3-1.fc36.x86_64
bash-5.2# rpm -q openssh
openssh-8.8p1-1.fc36.1.x86_64
请参考
在GitHub上的自述文件
Ansible 创作者执行环境
…
包括:ansible-core
ansible-lint
molecule
…
当查看https://github.com/ansible/creator-ee/releases时,请注意该网页可能会有较多的更新内容。
在Molecule文档中,Jenkins使用creator-ee容器上的Molecule的示例。
以下的Jenkinsfile使用了Ansible Creator Execution Environment镜像。
管道 {
代理 {
docker {
镜像 ‘quay.io/ansible/creator-ee’
参数 ‘-v /var/run/docker.sock:/var/run/docker.sock’
}
}
…