コンニチーハ、千葉です。 今日はDockerコンテナとEC2が混在している環境をインベントリで管理してみます。 といってもそんなに難しくありません。 まずは、ansible.cnfでssh_configを設定するを参考にEC2環境ホストのセットアップをします。 EC2向けの設定 ssh_config Host ec2-1 User ec2-user HostName xxx.xxx.xxx.xxx IdentityFile xxx.pem Host ec2-2 User ec2-user HostName xxx.xxx.xxx.xxx IdentityFile xxx.pem Host ec2-3 User ec2-user HostName xxx.xxx.xxx.xxx IdentityFile xxx.pem ansible.cfg [ssh_connection] ssh_arg
![[Ansible]DockerコンテナとEC2混在環境をインベントリで管理する | DevelopersIO](https://cdn-ak-scissors.b.st-hatena.com/image/square/fdeea77d7391e5f365375c2d96653dc98a232359/height=288;version=1;width=512/https%3A%2F%2Fdevio2023-media.developers.io%2Fwp-content%2Fuploads%2F2014%2F09%2Fansible.png)