From e70ca762c7b523bf4f7f9cb9015731f9d6e1688e Mon Sep 17 00:00:00 2001 From: Russell Teague Date: Wed, 26 Jul 2017 14:26:47 -0400 Subject: Refactor openshift_facts BIOS vendor discovery In Ansible 2.4, `get_file_content` is moving from ansible.module_utils.facts to ansible.module_utils.facts.utils However, the method is no longer needed as the BIOS vendor fact can be retrieved from a standard Ansible fact, `ansible_system_vendor`. i.e.: "ansible_system_vendor": "Google", --- roles/openshift_facts/library/openshift_facts.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'roles/openshift_facts/library') diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index 49cc51b48..42c4945b4 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -2222,14 +2222,10 @@ class OpenShiftFacts(object): product_version = self.system_facts['ansible_product_version'] virt_type = self.system_facts['ansible_virtualization_type'] virt_role = self.system_facts['ansible_virtualization_role'] + bios_vendor = self.system_facts['ansible_system_vendor'] provider = None metadata = None - # TODO: this is not exposed through module_utils/facts.py in ansible, - # need to create PR for ansible to expose it - bios_vendor = get_file_content( # noqa: F405 - '/sys/devices/virtual/dmi/id/bios_vendor' - ) if bios_vendor == 'Google': provider = 'gce' metadata_url = ('http://metadata.google.internal/' -- cgit v1.2.3