Browse Source

enough: list required hosts per service

Fixes: main/infrastructure#155
keep-around/7653ece294da44ccf595a418f3753dcd3cb3e175
Loïc Dachary 1 year ago
committed by Loic Dachary
parent
commit
b2055ab8c2
Signed by: dachary GPG Key ID: 992D23B392F9E4F2
  1. 1
      development-inventory/02-all.yml
  2. 1
      development-inventory/hosts.yml
  3. 9
      development-inventory/test-hosts.yml
  4. 27
      enough/common/service.py

1
development-inventory/02-all.yml

@ -0,0 +1 @@
../inventory/02-all.yml

1
development-inventory/hosts.yml

@ -0,0 +1 @@
../inventory/hosts.yml

9
development-inventory/test-hosts.yml

@ -0,0 +1,9 @@
---
all:
hosts:
# infrastructure
infrastructure1-host:
infrastructure2-host:
# bind
external-host:
bind-client-host:

27
enough/common/service.py

@ -21,7 +21,32 @@ class Service(ABC):
bind = ['bind-host', 'icinga-host', 'postfix-host', 'wazuh-host']
self.service2hosts['bind'] = bind
self.service2hosts['cloud'] = bind[:] + ['cloud-host']
cloud = bind[:] + ['cloud-host']
self.service2hosts['cloud'] = cloud
forum = bind[:] + ['forum-host']
self.service2hosts['forum'] = forum
weblate = bind[:] + ['weblate-host']
self.service2hosts['weblate'] = weblate
gitlab = bind[:] + ['gitlab-host', 'runner-host']
self.service2hosts['gitlab'] = gitlab
api = gitlab[:] + ['api-host']
self.service2hosts['api'] = api
chat = bind[:] + ['chat-host']
self.service2hosts['chat'] = chat
packages = bind[:] + ['packages-host']
self.service2hosts['packages'] = packages
website = bind[:] + ['website-host']
self.service2hosts['website'] = website
self.service2hosts['pad'] = website
@abstractmethod
def create_or_update(self):

Loading…
Cancel
Save