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 1 year has passed since last update.

Ansible使ってdocker環境を用意する

Posted at

概要

docker環境を構築する方法を毎回忘れたりしてたのでAnsible化した。
jenkinsとかでdocker使うために入れるときに利用している。

環境

  • Rocky Linux 8

準備

# dnf install epel-release -y
Last metadata expiration check: 0:18:21 ago on Fri 16 Sep 2022 05:30:38 PM UTC.
Dependencies resolved.
==============================================================================================================================================================================================================================================
 Package                                                      Architecture                                           Version                                                     Repository                                              Size
==============================================================================================================================================================================================================================================
Installing:
 epel-release                                                 noarch                                                 8-17.el8                                                    extras                                                  24 k

Transaction Summary
==============================================================================================================================================================================================================================================
Install  1 Package

Total download size: 24 k
Installed size: 34 k
Downloading Packages:
epel-release-8-17.el8.noarch.rpm                                                                                                                                                                              129 kB/s |  24 kB     00:00
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                          68 kB/s |  24 kB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                      1/1
  Installing       : epel-release-8-17.el8.noarch                                                                                                                                                                                         1/1
  Running scriptlet: epel-release-8-17.el8.noarch                                                                                                                                                                                         1/1
Many EPEL packages require the CodeReady Builder (CRB) repository.
It is recommended that you run /usr/bin/crb enable to enable the CRB repository.

  Verifying        : epel-release-8-17.el8.noarch                                                                                                                                                                                         1/1

Installed:
  epel-release-8-17.el8.noarch

Complete!

# dnf update -y
Last metadata expiration check: 0:30:41 ago on Fri 16 Sep 2022 05:49:12 PM UTC.
Dependencies resolved.
Nothing to do.
Complete!

# dnf install ansible -y
Last metadata expiration check: 0:31:48 ago on Fri 16 Sep 2022 05:49:12 PM UTC.
Dependencies resolved.
==============================================================================================================================================================================================================================================
 Package                                                        Architecture                                Version                                                                      Repository                                      Size
==============================================================================================================================================================================================================================================
Installing:
 ansible                                                        noarch                                      5.4.0-3.el8                                                                  epel                                            40 M
Installing dependencies:
 ansible-core                                                   x86_64                                      2.12.2-4.el8_6.rocky.0.1                                                     appstream                                      2.4 M
 emacs-filesystem                                               noarch                                      1:26.1-7.el8                                                                 baseos                                          69 k
 git                                                            x86_64                                      2.31.1-2.el8                                                                 appstream                                      160 k
 git-core                                                       x86_64                                      2.31.1-2.el8                                                                 appstream                                      4.7 M
 git-core-doc                                                   noarch                                      2.31.1-2.el8                                                                 appstream                                      2.6 M
 perl-Carp                                                      noarch                                      1.42-396.el8                                                                 baseos                                          29 k
 perl-Data-Dumper                                               x86_64                                      2.167-399.el8                                                                baseos                                          57 k
 perl-Digest                                                    noarch                                      1.17-395.el8                                                                 appstream                                       26 k
 perl-Digest-MD5                                                x86_64                                      2.55-396.el8                                                                 appstream                                       36 k
 perl-Encode                                                    x86_64                                      4:2.97-3.el8                                                                 baseos                                         1.5 M
 perl-Errno                                                     x86_64                                      1.28-421.el8                                                                 baseos                                          75 k
 perl-Error                                                     noarch                                      1:0.17025-2.el8                                                              appstream                                       45 k
 perl-Exporter                                                  noarch                                      5.72-396.el8                                                                 baseos                                          33 k
 perl-File-Path                                                 noarch                                      2.15-2.el8                                                                   baseos                                          37 k
 perl-File-Temp                                                 noarch                                      0.230.600-1.el8                                                              baseos                                          62 k
 perl-Getopt-Long                                               noarch                                      1:2.50-4.el8                                                                 baseos                                          62 k
 perl-Git                                                       noarch                                      2.31.1-2.el8                                                                 appstream                                       77 k
 perl-HTTP-Tiny                                                 noarch                                      0.074-1.el8                                                                  baseos                                          57 k
 perl-IO                                                        x86_64                                      1.38-421.el8                                                                 baseos                                         141 k
 perl-MIME-Base64                                               x86_64                                      3.15-396.el8                                                                 baseos                                          30 k
 perl-Net-SSLeay                                                x86_64                                      1.88-2.module+el8.6.0+957+15d660ad                                           appstream                                      378 k
 perl-PathTools                                                 x86_64                                      3.74-1.el8                                                                   baseos                                          89 k
 perl-Pod-Escapes                                               noarch                                      1:1.07-395.el8                                                               baseos                                          19 k
 perl-Pod-Perldoc                                               noarch                                      3.28-396.el8                                                                 baseos                                          85 k
 perl-Pod-Simple                                                noarch                                      1:3.35-395.el8                                                               baseos                                         212 k
 perl-Pod-Usage                                                 noarch                                      4:1.69-395.el8                                                               baseos                                          33 k
 perl-Scalar-List-Utils                                         x86_64                                      3:1.49-2.el8                                                                 baseos                                          67 k
 perl-Socket                                                    x86_64                                      4:2.027-3.el8                                                                baseos                                          58 k
 perl-Storable                                                  x86_64                                      1:3.11-3.el8                                                                 baseos                                          97 k
 perl-Term-ANSIColor                                            noarch                                      4.06-396.el8                                                                 baseos                                          45 k
 perl-Term-Cap                                                  noarch                                      1.17-395.el8                                                                 baseos                                          22 k
 perl-TermReadKey                                               x86_64                                      2.37-7.el8                                                                   appstream                                       39 k
 perl-Text-ParseWords                                           noarch                                      3.30-395.el8                                                                 baseos                                          17 k
 perl-Text-Tabs+Wrap                                            noarch                                      2013.0523-395.el8                                                            baseos                                          23 k
 perl-Time-Local                                                noarch                                      1:1.280-1.el8                                                                baseos                                          32 k
 perl-URI                                                       noarch                                      1.73-3.el8                                                                   appstream                                      115 k
 perl-Unicode-Normalize                                         x86_64                                      1.25-396.el8                                                                 baseos                                          81 k
 perl-constant                                                  noarch                                      1.33-396.el8                                                                 baseos                                          24 k
 perl-interpreter                                               x86_64                                      4:5.26.3-421.el8                                                             baseos                                         6.3 M
 perl-libnet                                                    noarch                                      3.11-3.el8                                                                   appstream                                      120 k
 perl-libs                                                      x86_64                                      4:5.26.3-421.el8                                                             baseos                                         1.6 M
 perl-macros                                                    x86_64                                      4:5.26.3-421.el8                                                             baseos                                          71 k
 perl-parent                                                    noarch                                      1:0.237-1.el8                                                                baseos                                          19 k
 perl-podlators                                                 noarch                                      4.11-1.el8                                                                   baseos                                         117 k
 perl-threads                                                   x86_64                                      1:2.21-2.el8                                                                 baseos                                          60 k
 perl-threads-shared                                            x86_64                                      1.58-2.el8                                                                   baseos                                          47 k
 python38                                                       x86_64                                      3.8.12-1.module+el8.6.0+794+eba84017                                         appstream                                       78 k
 python38-asn1crypto                                            noarch                                      1.2.0-3.module+el8.4.0+570+c2eaf144                                          appstream                                      183 k
 python38-babel                                                 noarch                                      2.7.0-11.module+el8.5.0+672+ab6eb015                                         appstream                                      5.9 M
 python38-cffi                                                  x86_64                                      1.13.2-3.module+el8.4.0+570+c2eaf144                                         appstream                                      247 k
 python38-cryptography                                          x86_64                                      2.8-3.module+el8.5.0+672+ab6eb015                                            appstream                                      552 k
 python38-idna                                                  noarch                                      2.8-6.module+el8.4.0+570+c2eaf144                                            appstream                                       86 k
 python38-jinja2                                                noarch                                      2.10.3-5.module+el8.5.0+672+ab6eb015                                         appstream                                      262 k
 python38-libs                                                  x86_64                                      3.8.12-1.module+el8.6.0+794+eba84017                                         appstream                                      8.3 M
 python38-markupsafe                                            x86_64                                      1.1.1-6.module+el8.4.0+570+c2eaf144                                          appstream                                       35 k
 python38-pip-wheel                                             noarch                                      19.3.1-5.module+el8.6.0+794+eba84017                                         appstream                                      1.0 M
 python38-ply                                                   noarch                                      3.11-10.module+el8.4.0+570+c2eaf144                                          appstream                                      111 k
 python38-pycparser                                             noarch                                      2.19-3.module+el8.4.0+570+c2eaf144                                           appstream                                      127 k
 python38-pytz                                                  noarch                                      2019.3-3.module+el8.4.0+570+c2eaf144                                         appstream                                       54 k
 python38-pyyaml                                                x86_64                                      5.4.1-1.module+el8.5.0+672+ab6eb015                                          appstream                                      211 k
 python38-resolvelib                                            noarch                                      0.5.4-5.el8                                                                  appstream                                       29 k
 python38-setuptools                                            noarch                                      41.6.0-5.module+el8.5.0+672+ab6eb015                                         appstream                                      667 k
 python38-setuptools-wheel                                      noarch                                      41.6.0-5.module+el8.5.0+672+ab6eb015                                         appstream                                      303 k
 python38-six                                                   noarch                                      1.12.0-10.module+el8.4.0+570+c2eaf144                                        appstream                                       38 k
 sshpass                                                        x86_64                                      1.09-4.el8                                                                   appstream                                       29 k
Installing weak dependencies:
 perl-IO-Socket-IP                                              noarch                                      0.39-5.el8                                                                   appstream                                       46 k
 perl-IO-Socket-SSL                                             noarch                                      2.066-4.module+el8.6.0+957+15d660ad                                          appstream                                      297 k
 perl-Mozilla-CA                                                noarch                                      20160104-7.module+el8.6.0+965+850557f9                                       appstream                                       14 k
 python3-jmespath                                               noarch                                      0.9.0-11.el8                                                                 appstream                                       44 k
 python38-pip                                                   noarch                                      19.3.1-5.module+el8.6.0+794+eba84017                                         appstream                                      1.8 M
Enabling module streams:
 perl                                                                                                       5.26
 perl-IO-Socket-SSL                                                                                         2.066
 perl-libwww-perl                                                                                           6.34
 python38                                                                                                   3.8

Transaction Summary
==============================================================================================================================================================================================================================================
Install  71 Packages

Total download size: 82 M
Installed size: 462 M
Downloading Packages:
(1/71): git-2.31.1-2.el8.x86_64.rpm                                                                                                                                                                           156 kB/s | 160 kB     00:01
(2/71): git-core-doc-2.31.1-2.el8.noarch.rpm                                                                                                                                                                  1.5 MB/s | 2.6 MB     00:01
(3/71): perl-Digest-1.17-395.el8.noarch.rpm                                                                                                                                                                   104 kB/s |  26 kB     00:00
(4/71): git-core-2.31.1-2.el8.x86_64.rpm                                                                                                                                                                      1.5 MB/s | 4.7 MB     00:03
(5/71): perl-Digest-MD5-2.55-396.el8.x86_64.rpm                                                                                                                                                               143 kB/s |  36 kB     00:00
(6/71): ansible-core-2.12.2-4.el8_6.rocky.0.1.x86_64.rpm                                                                                                                                                      767 kB/s | 2.4 MB     00:03
(7/71): perl-Error-0.17025-2.el8.noarch.rpm                                                                                                                                                                   179 kB/s |  45 kB     00:00
(8/71): perl-IO-Socket-IP-0.39-5.el8.noarch.rpm                                                                                                                                                               190 kB/s |  46 kB     00:00
(9/71): perl-Git-2.31.1-2.el8.noarch.rpm                                                                                                                                                                      305 kB/s |  77 kB     00:00
(10/71): perl-Mozilla-CA-20160104-7.module+el8.6.0+965+850557f9.noarch.rpm                                                                                                                                     58 kB/s |  14 kB     00:00
(11/71): perl-IO-Socket-SSL-2.066-4.module+el8.6.0+957+15d660ad.noarch.rpm                                                                                                                                    1.1 MB/s | 297 kB     00:00
(12/71): perl-Net-SSLeay-1.88-2.module+el8.6.0+957+15d660ad.x86_64.rpm                                                                                                                                        1.2 MB/s | 378 kB     00:00
(13/71): perl-TermReadKey-2.37-7.el8.x86_64.rpm                                                                                                                                                               168 kB/s |  39 kB     00:00
(14/71): perl-URI-1.73-3.el8.noarch.rpm                                                                                                                                                                       498 kB/s | 115 kB     00:00
(15/71): perl-libnet-3.11-3.el8.noarch.rpm                                                                                                                                                                    634 kB/s | 120 kB     00:00
(16/71): python3-jmespath-0.9.0-11.el8.noarch.rpm                                                                                                                                                             175 kB/s |  44 kB     00:00
(17/71): python38-3.8.12-1.module+el8.6.0+794+eba84017.x86_64.rpm                                                                                                                                             318 kB/s |  78 kB     00:00
(18/71): python38-asn1crypto-1.2.0-3.module+el8.4.0+570+c2eaf144.noarch.rpm                                                                                                                                   729 kB/s | 183 kB     00:00
(19/71): python38-cffi-1.13.2-3.module+el8.4.0+570+c2eaf144.x86_64.rpm                                                                                                                                        993 kB/s | 247 kB     00:00
(20/71): python38-cryptography-2.8-3.module+el8.5.0+672+ab6eb015.x86_64.rpm                                                                                                                                   1.1 MB/s | 552 kB     00:00
(21/71): python38-idna-2.8-6.module+el8.4.0+570+c2eaf144.noarch.rpm                                                                                                                                           338 kB/s |  86 kB     00:00
(22/71): python38-jinja2-2.10.3-5.module+el8.5.0+672+ab6eb015.noarch.rpm                                                                                                                                      1.0 MB/s | 262 kB     00:00
(23/71): python38-markupsafe-1.1.1-6.module+el8.4.0+570+c2eaf144.x86_64.rpm                                                                                                                                   144 kB/s |  35 kB     00:00
(24/71): python38-pip-19.3.1-5.module+el8.6.0+794+eba84017.noarch.rpm                                                                                                                                         2.3 MB/s | 1.8 MB     00:00
(25/71): python38-pip-wheel-19.3.1-5.module+el8.6.0+794+eba84017.noarch.rpm                                                                                                                                   4.1 MB/s | 1.0 MB     00:00
(26/71): python38-ply-3.11-10.module+el8.4.0+570+c2eaf144.noarch.rpm                                                                                                                                          445 kB/s | 111 kB     00:00
(27/71): python38-libs-3.8.12-1.module+el8.6.0+794+eba84017.x86_64.rpm                                                                                                                                        4.2 MB/s | 8.3 MB     00:01
(28/71): python38-babel-2.7.0-11.module+el8.5.0+672+ab6eb015.noarch.rpm                                                                                                                                       2.2 MB/s | 5.9 MB     00:02
(29/71): python38-pytz-2019.3-3.module+el8.4.0+570+c2eaf144.noarch.rpm                                                                                                                                        213 kB/s |  54 kB     00:00
(30/71): python38-pycparser-2.19-3.module+el8.4.0+570+c2eaf144.noarch.rpm                                                                                                                                     254 kB/s | 127 kB     00:00
(31/71): python38-resolvelib-0.5.4-5.el8.noarch.rpm                                                                                                                                                           117 kB/s |  29 kB     00:00
(32/71): python38-pyyaml-5.4.1-1.module+el8.5.0+672+ab6eb015.x86_64.rpm                                                                                                                                       807 kB/s | 211 kB     00:00
(33/71): python38-setuptools-41.6.0-5.module+el8.5.0+672+ab6eb015.noarch.rpm                                                                                                                                  2.5 MB/s | 667 kB     00:00
(34/71): sshpass-1.09-4.el8.x86_64.rpm                                                                                                                                                                        124 kB/s |  29 kB     00:00
(35/71): python38-six-1.12.0-10.module+el8.4.0+570+c2eaf144.noarch.rpm                                                                                                                                        144 kB/s |  38 kB     00:00
(36/71): python38-setuptools-wheel-41.6.0-5.module+el8.5.0+672+ab6eb015.noarch.rpm                                                                                                                            613 kB/s | 303 kB     00:00
(37/71): perl-Carp-1.42-396.el8.noarch.rpm                                                                                                                                                                     39 kB/s |  29 kB     00:00
(38/71): emacs-filesystem-26.1-7.el8.noarch.rpm                                                                                                                                                                70 kB/s |  69 kB     00:00
(39/71): perl-Data-Dumper-2.167-399.el8.x86_64.rpm                                                                                                                                                             57 kB/s |  57 kB     00:01
(40/71): perl-Errno-1.28-421.el8.x86_64.rpm                                                                                                                                                                   150 kB/s |  75 kB     00:00
(41/71): perl-Exporter-5.72-396.el8.noarch.rpm                                                                                                                                                                131 kB/s |  33 kB     00:00
(42/71): perl-File-Path-2.15-2.el8.noarch.rpm                                                                                                                                                                 149 kB/s |  37 kB     00:00
(43/71): perl-File-Temp-0.230.600-1.el8.noarch.rpm                                                                                                                                                            248 kB/s |  62 kB     00:00
(44/71): perl-HTTP-Tiny-0.074-1.el8.noarch.rpm                                                                                                                                                                231 kB/s |  57 kB     00:00
(45/71): perl-Getopt-Long-2.50-4.el8.noarch.rpm                                                                                                                                                               244 kB/s |  62 kB     00:00
(46/71): perl-MIME-Base64-3.15-396.el8.x86_64.rpm                                                                                                                                                             120 kB/s |  30 kB     00:00
(47/71): perl-IO-1.38-421.el8.x86_64.rpm                                                                                                                                                                      406 kB/s | 141 kB     00:00
(48/71): perl-PathTools-3.74-1.el8.x86_64.rpm                                                                                                                                                                 355 kB/s |  89 kB     00:00
(49/71): perl-Pod-Escapes-1.07-395.el8.noarch.rpm                                                                                                                                                             125 kB/s |  19 kB     00:00
(50/71): perl-Encode-2.97-3.el8.x86_64.rpm                                                                                                                                                                    831 kB/s | 1.5 MB     00:01
(51/71): perl-Pod-Perldoc-3.28-396.el8.noarch.rpm                                                                                                                                                             343 kB/s |  85 kB     00:00
(52/71): perl-Pod-Usage-1.69-395.el8.noarch.rpm                                                                                                                                                               225 kB/s |  33 kB     00:00
(53/71): perl-Pod-Simple-3.35-395.el8.noarch.rpm                                                                                                                                                              838 kB/s | 212 kB     00:00
(54/71): perl-Socket-2.027-3.el8.x86_64.rpm                                                                                                                                                                   759 kB/s |  58 kB     00:00
(55/71): perl-Scalar-List-Utils-1.49-2.el8.x86_64.rpm                                                                                                                                                         623 kB/s |  67 kB     00:00
(56/71): perl-Storable-3.11-3.el8.x86_64.rpm                                                                                                                                                                  933 kB/s |  97 kB     00:00
(57/71): perl-Term-ANSIColor-4.06-396.el8.noarch.rpm                                                                                                                                                          595 kB/s |  45 kB     00:00
(58/71): perl-Text-ParseWords-3.30-395.el8.noarch.rpm                                                                                                                                                         221 kB/s |  17 kB     00:00
(59/71): perl-Term-Cap-1.17-395.el8.noarch.rpm                                                                                                                                                                151 kB/s |  22 kB     00:00
(60/71): perl-Text-Tabs+Wrap-2013.0523-395.el8.noarch.rpm                                                                                                                                                     232 kB/s |  23 kB     00:00
(61/71): perl-Time-Local-1.280-1.el8.noarch.rpm                                                                                                                                                               128 kB/s |  32 kB     00:00
(62/71): perl-constant-1.33-396.el8.noarch.rpm                                                                                                                                                                 98 kB/s |  24 kB     00:00
(63/71): perl-Unicode-Normalize-1.25-396.el8.x86_64.rpm                                                                                                                                                       320 kB/s |  81 kB     00:00
(64/71): perl-macros-5.26.3-421.el8.x86_64.rpm                                                                                                                                                                280 kB/s |  71 kB     00:00
(65/71): perl-parent-0.237-1.el8.noarch.rpm                                                                                                                                                                    79 kB/s |  19 kB     00:00
(66/71): perl-libs-5.26.3-421.el8.x86_64.rpm                                                                                                                                                                  3.1 MB/s | 1.6 MB     00:00
(67/71): perl-threads-2.21-2.el8.x86_64.rpm                                                                                                                                                                   706 kB/s |  60 kB     00:00
(68/71): perl-podlators-4.11-1.el8.noarch.rpm                                                                                                                                                                 1.1 MB/s | 117 kB     00:00
(69/71): perl-threads-shared-1.58-2.el8.x86_64.rpm                                                                                                                                                            292 kB/s |  47 kB     00:00
(70/71): perl-interpreter-5.26.3-421.el8.x86_64.rpm                                                                                                                                                           2.8 MB/s | 6.3 MB     00:02
(71/71): ansible-5.4.0-3.el8.noarch.rpm                                                                                                                                                                       3.9 MB/s |  40 MB     00:10
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                         3.3 MB/s |  82 MB     00:25
Extra Packages for Enterprise Linux 8 - x86_64                                                                                                                                                                7.2 kB/s | 1.6 kB     00:00
Importing GPG key 0x2F86D6A1:
 Userid     : "Fedora EPEL (8) <epel@fedoraproject.org>"
 Fingerprint: 94E2 79EB 8D8F 25B2 1810 ADF1 21EA 45AB 2F86 D6A1
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
warning: waiting for transaction lock on /var/lib/rpm/.rpm.lock
Key imported successfully
Running transaction check
Waiting for process with pid 4922 to finish.
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                      1/1
  Installing       : git-core-2.31.1-2.el8.x86_64                                                                                                                                                                                        1/71
  Installing       : git-core-doc-2.31.1-2.el8.noarch                                                                                                                                                                                    2/71
  Installing       : perl-Digest-1.17-395.el8.noarch                                                                                                                                                                                     3/71
  Installing       : perl-Digest-MD5-2.55-396.el8.x86_64                                                                                                                                                                                 4/71
  Installing       : perl-Data-Dumper-2.167-399.el8.x86_64                                                                                                                                                                               5/71
  Installing       : perl-libnet-3.11-3.el8.noarch                                                                                                                                                                                       6/71
  Installing       : perl-Net-SSLeay-1.88-2.module+el8.6.0+957+15d660ad.x86_64                                                                                                                                                           7/71
  Installing       : perl-URI-1.73-3.el8.noarch                                                                                                                                                                                          8/71
  Installing       : perl-Pod-Escapes-1:1.07-395.el8.noarch                                                                                                                                                                              9/71
  Installing       : perl-Mozilla-CA-20160104-7.module+el8.6.0+965+850557f9.noarch                                                                                                                                                      10/71
  Installing       : perl-IO-Socket-IP-0.39-5.el8.noarch                                                                                                                                                                                11/71
  Installing       : perl-Time-Local-1:1.280-1.el8.noarch                                                                                                                                                                               12/71
  Installing       : perl-IO-Socket-SSL-2.066-4.module+el8.6.0+957+15d660ad.noarch                                                                                                                                                      13/71
  Installing       : perl-Term-ANSIColor-4.06-396.el8.noarch                                                                                                                                                                            14/71
  Installing       : perl-Term-Cap-1.17-395.el8.noarch                                                                                                                                                                                  15/71
  Installing       : perl-File-Temp-0.230.600-1.el8.noarch                                                                                                                                                                              16/71
  Installing       : perl-Pod-Simple-1:3.35-395.el8.noarch                                                                                                                                                                              17/71
  Installing       : perl-HTTP-Tiny-0.074-1.el8.noarch                                                                                                                                                                                  18/71
  Installing       : perl-podlators-4.11-1.el8.noarch                                                                                                                                                                                   19/71
  Installing       : perl-Pod-Perldoc-3.28-396.el8.noarch                                                                                                                                                                               20/71
  Installing       : perl-Text-ParseWords-3.30-395.el8.noarch                                                                                                                                                                           21/71
  Installing       : perl-Pod-Usage-4:1.69-395.el8.noarch                                                                                                                                                                               22/71
  Installing       : perl-MIME-Base64-3.15-396.el8.x86_64                                                                                                                                                                               23/71
  Installing       : perl-Storable-1:3.11-3.el8.x86_64                                                                                                                                                                                  24/71
  Installing       : perl-Getopt-Long-1:2.50-4.el8.noarch                                                                                                                                                                               25/71
  Installing       : perl-Errno-1.28-421.el8.x86_64                                                                                                                                                                                     26/71
  Installing       : perl-Socket-4:2.027-3.el8.x86_64                                                                                                                                                                                   27/71
  Installing       : perl-Encode-4:2.97-3.el8.x86_64                                                                                                                                                                                    28/71
  Installing       : perl-Carp-1.42-396.el8.noarch                                                                                                                                                                                      29/71
  Installing       : perl-Exporter-5.72-396.el8.noarch                                                                                                                                                                                  30/71
  Installing       : perl-libs-4:5.26.3-421.el8.x86_64                                                                                                                                                                                  31/71
  Installing       : perl-Scalar-List-Utils-3:1.49-2.el8.x86_64                                                                                                                                                                         32/71
  Installing       : perl-parent-1:0.237-1.el8.noarch                                                                                                                                                                                   33/71
  Installing       : perl-macros-4:5.26.3-421.el8.x86_64                                                                                                                                                                                34/71
  Installing       : perl-Text-Tabs+Wrap-2013.0523-395.el8.noarch                                                                                                                                                                       35/71
  Installing       : perl-Unicode-Normalize-1.25-396.el8.x86_64                                                                                                                                                                         36/71
  Installing       : perl-File-Path-2.15-2.el8.noarch                                                                                                                                                                                   37/71
  Installing       : perl-IO-1.38-421.el8.x86_64                                                                                                                                                                                        38/71
  Installing       : perl-PathTools-3.74-1.el8.x86_64                                                                                                                                                                                   39/71
  Installing       : perl-constant-1.33-396.el8.noarch                                                                                                                                                                                  40/71
  Installing       : perl-threads-1:2.21-2.el8.x86_64                                                                                                                                                                                   41/71
  Installing       : perl-threads-shared-1.58-2.el8.x86_64                                                                                                                                                                              42/71
  Installing       : perl-interpreter-4:5.26.3-421.el8.x86_64                                                                                                                                                                           43/71
  Installing       : perl-Error-1:0.17025-2.el8.noarch                                                                                                                                                                                  44/71
  Installing       : perl-TermReadKey-2.37-7.el8.x86_64                                                                                                                                                                                 45/71
  Installing       : emacs-filesystem-1:26.1-7.el8.noarch                                                                                                                                                                               46/71
  Installing       : perl-Git-2.31.1-2.el8.noarch                                                                                                                                                                                       47/71
  Installing       : git-2.31.1-2.el8.x86_64                                                                                                                                                                                            48/71
  Installing       : sshpass-1.09-4.el8.x86_64                                                                                                                                                                                          49/71
  Installing       : python38-setuptools-wheel-41.6.0-5.module+el8.5.0+672+ab6eb015.noarch                                                                                                                                              50/71
  Installing       : python38-pip-wheel-19.3.1-5.module+el8.6.0+794+eba84017.noarch                                                                                                                                                     51/71
  Installing       : python38-libs-3.8.12-1.module+el8.6.0+794+eba84017.x86_64                                                                                                                                                          52/71
  Installing       : python38-3.8.12-1.module+el8.6.0+794+eba84017.x86_64                                                                                                                                                               53/71
  Running scriptlet: python38-3.8.12-1.module+el8.6.0+794+eba84017.x86_64                                                                                                                                                               53/71
  Installing       : python38-setuptools-41.6.0-5.module+el8.5.0+672+ab6eb015.noarch                                                                                                                                                    54/71
  Running scriptlet: python38-setuptools-41.6.0-5.module+el8.5.0+672+ab6eb015.noarch                                                                                                                                                    54/71
  Installing       : python38-pip-19.3.1-5.module+el8.6.0+794+eba84017.noarch                                                                                                                                                           55/71
  Running scriptlet: python38-pip-19.3.1-5.module+el8.6.0+794+eba84017.noarch                                                                                                                                                           55/71
  Installing       : python38-six-1.12.0-10.module+el8.4.0+570+c2eaf144.noarch                                                                                                                                                          56/71
  Installing       : python38-asn1crypto-1.2.0-3.module+el8.4.0+570+c2eaf144.noarch                                                                                                                                                     57/71
  Installing       : python38-idna-2.8-6.module+el8.4.0+570+c2eaf144.noarch                                                                                                                                                             58/71
  Installing       : python38-markupsafe-1.1.1-6.module+el8.4.0+570+c2eaf144.x86_64                                                                                                                                                     59/71
  Installing       : python38-ply-3.11-10.module+el8.4.0+570+c2eaf144.noarch                                                                                                                                                            60/71
  Installing       : python38-pycparser-2.19-3.module+el8.4.0+570+c2eaf144.noarch                                                                                                                                                       61/71
  Installing       : python38-cffi-1.13.2-3.module+el8.4.0+570+c2eaf144.x86_64                                                                                                                                                          62/71
  Installing       : python38-cryptography-2.8-3.module+el8.5.0+672+ab6eb015.x86_64                                                                                                                                                     63/71
  Installing       : python38-pytz-2019.3-3.module+el8.4.0+570+c2eaf144.noarch                                                                                                                                                          64/71
  Installing       : python38-babel-2.7.0-11.module+el8.5.0+672+ab6eb015.noarch                                                                                                                                                         65/71
  Installing       : python38-jinja2-2.10.3-5.module+el8.5.0+672+ab6eb015.noarch                                                                                                                                                        66/71
  Installing       : python38-pyyaml-5.4.1-1.module+el8.5.0+672+ab6eb015.x86_64                                                                                                                                                         67/71
  Installing       : python38-resolvelib-0.5.4-5.el8.noarch                                                                                                                                                                             68/71
  Installing       : ansible-core-2.12.2-4.el8_6.rocky.0.1.x86_64                                                                                                                                                                       69/71
  Installing       : python3-jmespath-0.9.0-11.el8.noarch                                                                                                                                                                               70/71
  Installing       : ansible-5.4.0-3.el8.noarch                                                                                                                                                                                         71/71
  Running scriptlet: ansible-5.4.0-3.el8.noarch                                                                                                                                                                                         71/71
  Verifying        : ansible-core-2.12.2-4.el8_6.rocky.0.1.x86_64                                                                                                                                                                        1/71
  Verifying        : git-2.31.1-2.el8.x86_64                                                                                                                                                                                             2/71
  Verifying        : git-core-2.31.1-2.el8.x86_64                                                                                                                                                                                        3/71
  Verifying        : git-core-doc-2.31.1-2.el8.noarch                                                                                                                                                                                    4/71
  Verifying        : perl-Digest-1.17-395.el8.noarch                                                                                                                                                                                     5/71
  Verifying        : perl-Digest-MD5-2.55-396.el8.x86_64                                                                                                                                                                                 6/71
  Verifying        : perl-Error-1:0.17025-2.el8.noarch                                                                                                                                                                                   7/71
  Verifying        : perl-Git-2.31.1-2.el8.noarch                                                                                                                                                                                        8/71
  Verifying        : perl-IO-Socket-IP-0.39-5.el8.noarch                                                                                                                                                                                 9/71
  Verifying        : perl-IO-Socket-SSL-2.066-4.module+el8.6.0+957+15d660ad.noarch                                                                                                                                                      10/71
  Verifying        : perl-Mozilla-CA-20160104-7.module+el8.6.0+965+850557f9.noarch                                                                                                                                                      11/71
  Verifying        : perl-Net-SSLeay-1.88-2.module+el8.6.0+957+15d660ad.x86_64                                                                                                                                                          12/71
  Verifying        : perl-TermReadKey-2.37-7.el8.x86_64                                                                                                                                                                                 13/71
  Verifying        : perl-URI-1.73-3.el8.noarch                                                                                                                                                                                         14/71
  Verifying        : perl-libnet-3.11-3.el8.noarch                                                                                                                                                                                      15/71
  Verifying        : python3-jmespath-0.9.0-11.el8.noarch                                                                                                                                                                               16/71
  Verifying        : python38-3.8.12-1.module+el8.6.0+794+eba84017.x86_64                                                                                                                                                               17/71
  Verifying        : python38-asn1crypto-1.2.0-3.module+el8.4.0+570+c2eaf144.noarch                                                                                                                                                     18/71
  Verifying        : python38-babel-2.7.0-11.module+el8.5.0+672+ab6eb015.noarch                                                                                                                                                         19/71
  Verifying        : python38-cffi-1.13.2-3.module+el8.4.0+570+c2eaf144.x86_64                                                                                                                                                          20/71
  Verifying        : python38-cryptography-2.8-3.module+el8.5.0+672+ab6eb015.x86_64                                                                                                                                                     21/71
  Verifying        : python38-idna-2.8-6.module+el8.4.0+570+c2eaf144.noarch                                                                                                                                                             22/71
  Verifying        : python38-jinja2-2.10.3-5.module+el8.5.0+672+ab6eb015.noarch                                                                                                                                                        23/71
  Verifying        : python38-libs-3.8.12-1.module+el8.6.0+794+eba84017.x86_64                                                                                                                                                          24/71
  Verifying        : python38-markupsafe-1.1.1-6.module+el8.4.0+570+c2eaf144.x86_64                                                                                                                                                     25/71
  Verifying        : python38-pip-19.3.1-5.module+el8.6.0+794+eba84017.noarch                                                                                                                                                           26/71
  Verifying        : python38-pip-wheel-19.3.1-5.module+el8.6.0+794+eba84017.noarch                                                                                                                                                     27/71
  Verifying        : python38-ply-3.11-10.module+el8.4.0+570+c2eaf144.noarch                                                                                                                                                            28/71
  Verifying        : python38-pycparser-2.19-3.module+el8.4.0+570+c2eaf144.noarch                                                                                                                                                       29/71
  Verifying        : python38-pytz-2019.3-3.module+el8.4.0+570+c2eaf144.noarch                                                                                                                                                          30/71
  Verifying        : python38-pyyaml-5.4.1-1.module+el8.5.0+672+ab6eb015.x86_64                                                                                                                                                         31/71
  Verifying        : python38-resolvelib-0.5.4-5.el8.noarch                                                                                                                                                                             32/71
  Verifying        : python38-setuptools-41.6.0-5.module+el8.5.0+672+ab6eb015.noarch                                                                                                                                                    33/71
  Verifying        : python38-setuptools-wheel-41.6.0-5.module+el8.5.0+672+ab6eb015.noarch                                                                                                                                              34/71
  Verifying        : python38-six-1.12.0-10.module+el8.4.0+570+c2eaf144.noarch                                                                                                                                                          35/71
  Verifying        : sshpass-1.09-4.el8.x86_64                                                                                                                                                                                          36/71
  Verifying        : emacs-filesystem-1:26.1-7.el8.noarch                                                                                                                                                                               37/71
  Verifying        : perl-Carp-1.42-396.el8.noarch                                                                                                                                                                                      38/71
  Verifying        : perl-Data-Dumper-2.167-399.el8.x86_64                                                                                                                                                                              39/71
  Verifying        : perl-Encode-4:2.97-3.el8.x86_64                                                                                                                                                                                    40/71
  Verifying        : perl-Errno-1.28-421.el8.x86_64                                                                                                                                                                                     41/71
  Verifying        : perl-Exporter-5.72-396.el8.noarch                                                                                                                                                                                  42/71
  Verifying        : perl-File-Path-2.15-2.el8.noarch                                                                                                                                                                                   43/71
  Verifying        : perl-File-Temp-0.230.600-1.el8.noarch                                                                                                                                                                              44/71
  Verifying        : perl-Getopt-Long-1:2.50-4.el8.noarch                                                                                                                                                                               45/71
  Verifying        : perl-HTTP-Tiny-0.074-1.el8.noarch                                                                                                                                                                                  46/71
  Verifying        : perl-IO-1.38-421.el8.x86_64                                                                                                                                                                                        47/71
  Verifying        : perl-MIME-Base64-3.15-396.el8.x86_64                                                                                                                                                                               48/71
  Verifying        : perl-PathTools-3.74-1.el8.x86_64                                                                                                                                                                                   49/71
  Verifying        : perl-Pod-Escapes-1:1.07-395.el8.noarch                                                                                                                                                                             50/71
  Verifying        : perl-Pod-Perldoc-3.28-396.el8.noarch                                                                                                                                                                               51/71
  Verifying        : perl-Pod-Simple-1:3.35-395.el8.noarch                                                                                                                                                                              52/71
  Verifying        : perl-Pod-Usage-4:1.69-395.el8.noarch                                                                                                                                                                               53/71
  Verifying        : perl-Scalar-List-Utils-3:1.49-2.el8.x86_64                                                                                                                                                                         54/71
  Verifying        : perl-Socket-4:2.027-3.el8.x86_64                                                                                                                                                                                   55/71
  Verifying        : perl-Storable-1:3.11-3.el8.x86_64                                                                                                                                                                                  56/71
  Verifying        : perl-Term-ANSIColor-4.06-396.el8.noarch                                                                                                                                                                            57/71
  Verifying        : perl-Term-Cap-1.17-395.el8.noarch                                                                                                                                                                                  58/71
  Verifying        : perl-Text-ParseWords-3.30-395.el8.noarch                                                                                                                                                                           59/71
  Verifying        : perl-Text-Tabs+Wrap-2013.0523-395.el8.noarch                                                                                                                                                                       60/71
  Verifying        : perl-Time-Local-1:1.280-1.el8.noarch                                                                                                                                                                               61/71
  Verifying        : perl-Unicode-Normalize-1.25-396.el8.x86_64                                                                                                                                                                         62/71
  Verifying        : perl-constant-1.33-396.el8.noarch                                                                                                                                                                                  63/71
  Verifying        : perl-interpreter-4:5.26.3-421.el8.x86_64                                                                                                                                                                           64/71
  Verifying        : perl-libs-4:5.26.3-421.el8.x86_64                                                                                                                                                                                  65/71
  Verifying        : perl-macros-4:5.26.3-421.el8.x86_64                                                                                                                                                                                66/71
  Verifying        : perl-parent-1:0.237-1.el8.noarch                                                                                                                                                                                   67/71
  Verifying        : perl-podlators-4.11-1.el8.noarch                                                                                                                                                                                   68/71
  Verifying        : perl-threads-1:2.21-2.el8.x86_64                                                                                                                                                                                   69/71
  Verifying        : perl-threads-shared-1.58-2.el8.x86_64                                                                                                                                                                              70/71
  Verifying        : ansible-5.4.0-3.el8.noarch                                                                                                                                                                                         71/71

Installed:
  ansible-5.4.0-3.el8.noarch                                                 ansible-core-2.12.2-4.el8_6.rocky.0.1.x86_64                                 emacs-filesystem-1:26.1-7.el8.noarch
  git-2.31.1-2.el8.x86_64                                                    git-core-2.31.1-2.el8.x86_64                                                 git-core-doc-2.31.1-2.el8.noarch
  perl-Carp-1.42-396.el8.noarch                                              perl-Data-Dumper-2.167-399.el8.x86_64                                        perl-Digest-1.17-395.el8.noarch
  perl-Digest-MD5-2.55-396.el8.x86_64                                        perl-Encode-4:2.97-3.el8.x86_64                                              perl-Errno-1.28-421.el8.x86_64
  perl-Error-1:0.17025-2.el8.noarch                                          perl-Exporter-5.72-396.el8.noarch                                            perl-File-Path-2.15-2.el8.noarch
  perl-File-Temp-0.230.600-1.el8.noarch                                      perl-Getopt-Long-1:2.50-4.el8.noarch                                         perl-Git-2.31.1-2.el8.noarch
  perl-HTTP-Tiny-0.074-1.el8.noarch                                          perl-IO-1.38-421.el8.x86_64                                                  perl-IO-Socket-IP-0.39-5.el8.noarch
  perl-IO-Socket-SSL-2.066-4.module+el8.6.0+957+15d660ad.noarch              perl-MIME-Base64-3.15-396.el8.x86_64                                         perl-Mozilla-CA-20160104-7.module+el8.6.0+965+850557f9.noarch
  perl-Net-SSLeay-1.88-2.module+el8.6.0+957+15d660ad.x86_64                  perl-PathTools-3.74-1.el8.x86_64                                             perl-Pod-Escapes-1:1.07-395.el8.noarch
  perl-Pod-Perldoc-3.28-396.el8.noarch                                       perl-Pod-Simple-1:3.35-395.el8.noarch                                        perl-Pod-Usage-4:1.69-395.el8.noarch
  perl-Scalar-List-Utils-3:1.49-2.el8.x86_64                                 perl-Socket-4:2.027-3.el8.x86_64                                             perl-Storable-1:3.11-3.el8.x86_64
  perl-Term-ANSIColor-4.06-396.el8.noarch                                    perl-Term-Cap-1.17-395.el8.noarch                                            perl-TermReadKey-2.37-7.el8.x86_64
  perl-Text-ParseWords-3.30-395.el8.noarch                                   perl-Text-Tabs+Wrap-2013.0523-395.el8.noarch                                 perl-Time-Local-1:1.280-1.el8.noarch
  perl-URI-1.73-3.el8.noarch                                                 perl-Unicode-Normalize-1.25-396.el8.x86_64                                   perl-constant-1.33-396.el8.noarch
  perl-interpreter-4:5.26.3-421.el8.x86_64                                   perl-libnet-3.11-3.el8.noarch                                                perl-libs-4:5.26.3-421.el8.x86_64
  perl-macros-4:5.26.3-421.el8.x86_64                                        perl-parent-1:0.237-1.el8.noarch                                             perl-podlators-4.11-1.el8.noarch
  perl-threads-1:2.21-2.el8.x86_64                                           perl-threads-shared-1.58-2.el8.x86_64                                        python3-jmespath-0.9.0-11.el8.noarch
  python38-3.8.12-1.module+el8.6.0+794+eba84017.x86_64                       python38-asn1crypto-1.2.0-3.module+el8.4.0+570+c2eaf144.noarch               python38-babel-2.7.0-11.module+el8.5.0+672+ab6eb015.noarch
  python38-cffi-1.13.2-3.module+el8.4.0+570+c2eaf144.x86_64                  python38-cryptography-2.8-3.module+el8.5.0+672+ab6eb015.x86_64               python38-idna-2.8-6.module+el8.4.0+570+c2eaf144.noarch
  python38-jinja2-2.10.3-5.module+el8.5.0+672+ab6eb015.noarch                python38-libs-3.8.12-1.module+el8.6.0+794+eba84017.x86_64                    python38-markupsafe-1.1.1-6.module+el8.4.0+570+c2eaf144.x86_64
  python38-pip-19.3.1-5.module+el8.6.0+794+eba84017.noarch                   python38-pip-wheel-19.3.1-5.module+el8.6.0+794+eba84017.noarch               python38-ply-3.11-10.module+el8.4.0+570+c2eaf144.noarch
  python38-pycparser-2.19-3.module+el8.4.0+570+c2eaf144.noarch               python38-pytz-2019.3-3.module+el8.4.0+570+c2eaf144.noarch                    python38-pyyaml-5.4.1-1.module+el8.5.0+672+ab6eb015.x86_64
  python38-resolvelib-0.5.4-5.el8.noarch                                     python38-setuptools-41.6.0-5.module+el8.5.0+672+ab6eb015.noarch              python38-setuptools-wheel-41.6.0-5.module+el8.5.0+672+ab6eb015.noarch
  python38-six-1.12.0-10.module+el8.4.0+570+c2eaf144.noarch                  sshpass-1.09-4.el8.x86_64

Complete!

# dnf install git -y
Last metadata expiration check: 0:10:11 ago on Fri 16 Sep 2022 06:28:28 PM UTC.
Package git-2.31.1-2.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

インストール

$ git clone https://github.com/Miutaku/docker-ansible.git
Cloning into 'docker-ansible'...
remote: Enumerating objects: 252, done.
remote: Counting objects: 100% (35/35), done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 252 (delta 8), reused 17 (delta 2), pack-reused 217
Receiving objects: 100% (252/252), 31.68 KiB | 3.52 MiB/s, done.
Resolving deltas: 100% (67/67), done.
$ cd docker-ansible/
$ ansible-playbook -i hosts/docker-server docker-server.yml
TASK [Gathering Facts] ***********************************************************************************************
ok: [xxxxx]

TASK [pre-installed-software : apt updated] **************************************************************************
skipping: [xxxxx]

TASK [pre-installed-software : pre installed software] ***************************************************************
skipping: [xxxxx]

TASK [security : installed selinux modules] **************************************************************************
skipping: [xxxxx]

TASK [security : disabled selinux] ***********************************************************************************
skipping: [xxxxx]

TASK [security : reboot to disable SELinux] **************************************************************************
changed: [xxxxx]

TASK [docker : added gpg key] ****************************************************************************************
skipping: [xxxxx]

TASK [docker : added apt repository] *********************************************************************************
skipping: [xxxxx]

TASK [docker : apt updated] ******************************************************************************************
skipping: [xxxxx]

TASK [installed docker packages] *************************************************************************************
skipping: [xxxxx]

TASK [installed docker repo] *****************************************************************************************
ok: [xxxxx]

TASK [installed docker packages] *************************************************************************************
ok: [xxxxx]

TASK [created docker group] ******************************************************************************************
ok: [xxxxx]

TASK [added "docker-user" to docker group] ***************************************************************************
ok: [xxxxx]

TASK [started docker] ************************************************************************************************
ok: [xxxxx]

PLAY RECAP ***********************************************************************************************************
xxxxx             : ok=7    changed=1    unreachable=0    failed=0    skipped=8    rescued=0    ignored=0

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?