0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Docker desktopが導入された環境でAnsibleを最短で試す2 (ansible-community/toolset)

Posted at

以前、Ansibleを含むDocker Imageに関して、以下を書きました。

ansible-community/toolset

その他、以下を含むDocker image の ansible-community/toolset というものもありました。

  • ansible
  • ansible-lint
  • molecule and most of its plugins
  • pytest and several of its plugins
  • yamllint which is used by ansible-lint itself.

実行してみたところ、ansible [core 2.11.1] でした。

$ docker run -it quay.io/ansible/toolset
Unable to find image 'quay.io/ansible/toolset:latest' locally
latest: Pulling from ansible/toolset
69692152171a: Pull complete 
66a3c154490a: Pull complete 
3e35bdfb65b2: Pull complete 
f2c4c4355073: Pull complete 
65d67526c337: Pull complete 
aaa871bca267: Pull complete 
45eac7aceccd: Pull complete 
Digest: sha256:04fa83f0a165d80f1d26b881920c95641bc596493ab0ac0c9e8475f00776a5b6
Status: Downloaded newer image for quay.io/ansible/toolset:latest
root@b66287a341e7:/# 
root@b66287a341e7:/# ansible --version
ansible [core 2.11.1] 
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/toolset/lib/python3.8/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/toolset/bin/ansible
  python version = 3.8.10 (default, May 12 2021, 15:56:47) [GCC 8.3.0]
  jinja version = 3.0.1
  libyaml = True
root@b66287a341e7:/# 
root@b66287a341e7:/# molecule --version
molecule 3.3.4 using python 3.8 
    ansible:2.11.1
    azure:0.5.0 from molecule_azure
    containers:0.2.1 from molecule_containers
    delegated:3.3.4 from molecule
    docker:0.2.4 from molecule_docker
    ec2:0.3 from molecule_ec2
    gce:0.2 from molecule_gce
    hetznercloud:1.2.1 from molecule_hetznercloud
    libvirt:0.0.4 from molecule_libvirt
    lxd:0.2 from molecule_lxd
    openstack:0.3 from molecule_openstack
    podman:0.3.0 from molecule_podman
    vagrant:0.6.3 from molecule_vagrant
root@b66287a341e7:/# 
root@b66287a341e7:/# ansible-lint --version
ansible-lint 5.0.12 using ansible 2.11.1
root@b66287a341e7:/# 
root@b66287a341e7:/# pip list | grep molecule
molecule              3.3.4
molecule-azure        0.5.0
molecule-containers   0.2.1
molecule-digitalocean 0.1
molecule-docker       0.2.4
molecule-ec2          0.3
molecule-gce          0.2
molecule-goss         1.1
molecule-hetznercloud 1.2.1
molecule-inspec       1.1
molecule-libvirt      0.0.4
molecule-lxd          0.2
molecule-openstack    0.3
molecule-podman       0.3.0
molecule-vagrant      0.6.3
WARNING: You are using pip version 21.1.1; however, version 21.1.2 is available.
You should consider upgrading via the '/opt/toolset/bin/python -m pip install --upgrade pip' command.
root@b66287a341e7:/# 
root@b66287a341e7:/# exit 
$ docker images
REPOSITORY                                   TAG       IMAGE ID       CREATED         SIZE
quay.io/ansible/toolset                      latest    f6d98c2f57f5   6 days ago      1.04GB

moleculeのドライバーは、dockerコンテナ内からの使用と考えるとどの程度使えるか微妙だが、結構入っている。クラウド系は影響は少なそう。

#参考
https://molecule.readthedocs.io/en/latest/examples.html#running-inside-a-container
Molecule is built into a Docker image by the Toolset project.

https://github.com/ansible-community/toolset

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?