Skip to content
Snippets Groups Projects
Verified Commit 414af051 authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

fix bugs from removing settings.yml

parent 626d98ba
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment