aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/common
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/common')
-rw-r--r--ansible/roles/common/tasks/config.yml9
1 files changed, 9 insertions, 0 deletions
diff --git a/ansible/roles/common/tasks/config.yml b/ansible/roles/common/tasks/config.yml
index 8592801ab..bb9f115eb 100644
--- a/ansible/roles/common/tasks/config.yml
+++ b/ansible/roles/common/tasks/config.yml
@@ -1,4 +1,13 @@
---
+- name: Looking up storage hostname
+ command: getent hosts {{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}
+ changed_when: False
+ register: storage_hostname
+
+- name: Setting storage hostname
+ set_fact:
+ storage_hostname: "{{ storage_hostname.stdout.split()[1] }}"
+
- name: Ensuring config directories exist
file:
path: "{{ node_config_directory }}/{{ item }}"