From 013fec6f163e17a53059dbc7a5ecf364271738f3 Mon Sep 17 00:00:00 2001 From: Julian Schacher Date: Wed, 7 Feb 2024 18:59:10 +0100 Subject: [PATCH] Add play to everything playb. for deploying Docker Compose applications Also introduce a new group for hosts, for which this play should be run, called Docker_Compose_Hosts. Finally add cit-ansible-test and cit-docker-host to this group with an empty project list initially. --- inventories/hetzner/host_vars/cit-ansible-test.yaml | 1 + inventories/hetzner/host_vars/cit-docker-host.yaml | 1 + inventories/hetzner/hosts.yaml | 4 ++++ playbooks/everything.yaml | 5 +++++ 4 files changed, 11 insertions(+) create mode 100644 inventories/hetzner/host_vars/cit-ansible-test.yaml create mode 100644 inventories/hetzner/host_vars/cit-docker-host.yaml diff --git a/inventories/hetzner/host_vars/cit-ansible-test.yaml b/inventories/hetzner/host_vars/cit-ansible-test.yaml new file mode 100644 index 0000000..0725752 --- /dev/null +++ b/inventories/hetzner/host_vars/cit-ansible-test.yaml @@ -0,0 +1 @@ +docker_compose__projects: [ ] diff --git a/inventories/hetzner/host_vars/cit-docker-host.yaml b/inventories/hetzner/host_vars/cit-docker-host.yaml new file mode 100644 index 0000000..0725752 --- /dev/null +++ b/inventories/hetzner/host_vars/cit-docker-host.yaml @@ -0,0 +1 @@ +docker_compose__projects: [ ] diff --git a/inventories/hetzner/hosts.yaml b/inventories/hetzner/hosts.yaml index 8c29d51..894434e 100644 --- a/inventories/hetzner/hosts.yaml +++ b/inventories/hetzner/hosts.yaml @@ -19,3 +19,7 @@ all: hosts: cit-ansible-test: cit-docker-host: + Docker_Compose_Hosts: + hosts: + cit-ansible-test: + cit-docker-host: diff --git a/playbooks/everything.yaml b/playbooks/everything.yaml index bcdfe1a..99f4ef1 100644 --- a/playbooks/everything.yaml +++ b/playbooks/everything.yaml @@ -5,3 +5,8 @@ hosts: Docker_Hosts roles: - docker + +- name: Ensure deployment of Docker Compose applications + hosts: Docker_Compose_Hosts + roles: + - docker_compose