From 414af051c0bee332e24d285b0dd00b981ade8807 Mon Sep 17 00:00:00 2001
From: Maarten de Waard <maarten@greenhost.nl>
Date: Wed, 7 Jul 2021 14:50:06 +0200
Subject: [PATCH] fix bugs from removing settings.yml

---
 openappstack/ansible.py | 2 +-
 openappstack/cluster.py | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/openappstack/ansible.py b/openappstack/ansible.py
index 01702e509..f9f5c2d44 100644
--- a/openappstack/ansible.py
+++ b/openappstack/ansible.py
@@ -38,7 +38,7 @@ def run_ansible(clus, playbook, ansible_params=None):
         ['-e', 'cluster_dir=' + clus.cluster_dir]
 
     ansible_playbook_command += \
-        ['-i', clus.inventory_file, '-e', '@' + clus.settings_file, playbook]
+        ['-i', clus.inventory_file, playbook]
 
     log.info('Running "%s" in ansible directory "%s"',
              ansible_playbook_command,
diff --git a/openappstack/cluster.py b/openappstack/cluster.py
index a78bbaa5b..29edb9d29 100644
--- a/openappstack/cluster.py
+++ b/openappstack/cluster.py
@@ -76,11 +76,12 @@ class Cluster:
         if not self.data_loaded:
             with open(self.inventory_file, 'r') as stream:
                 inventory = yaml.safe_load(stream)
+                print(inventory)
                 # Work with the master node from the inventory
                 self.hostname = inventory['all']['children']['master']['hosts']
                 self.domain = self.hostname
                 self.ip_address = \
-                        inventory['hosts'][self.hostname]['ansible_host']
+                        inventory['all']['hosts'][self.hostname]['ansible_host']
             log.debug("""Read data from inventory:
                 ip address: %s
                 domain: %s
-- 
GitLab