summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node_facts
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@redhat.com>2017-07-27 13:41:32 -0400
committerAndrew Butcher <abutcher@redhat.com>2017-07-27 14:25:44 -0400
commit6bf9371c6cb52b2727dd52bc38f2b8b3a01d67d8 (patch)
tree138d628dd890b6f9deeeab64ed6afdf46241ee61 /roles/openshift_node_facts
parentcf80c7e13e898c11bd02b829fbc5183a13aff817 (diff)
downloadopenshift-6bf9371c6cb52b2727dd52bc38f2b8b3a01d67d8.tar.gz
openshift-6bf9371c6cb52b2727dd52bc38f2b8b3a01d67d8.tar.bz2
openshift-6bf9371c6cb52b2727dd52bc38f2b8b3a01d67d8.tar.xz
openshift-6bf9371c6cb52b2727dd52bc38f2b8b3a01d67d8.zip
Move node facts to new openshift_node_facts role.
Diffstat (limited to 'roles/openshift_node_facts')
-rw-r--r--roles/openshift_node_facts/meta/main.yml15
-rw-r--r--roles/openshift_node_facts/tasks/main.yml34
2 files changed, 49 insertions, 0 deletions
diff --git a/roles/openshift_node_facts/meta/main.yml b/roles/openshift_node_facts/meta/main.yml
new file mode 100644
index 000000000..59bf680ce
--- /dev/null
+++ b/roles/openshift_node_facts/meta/main.yml
@@ -0,0 +1,15 @@
+---
+galaxy_info:
+ author: Andrew Butcher
+ description: OpenShift Node Facts
+ company: Red Hat, Inc.
+ license: Apache License, Version 2.0
+ min_ansible_version: 1.9
+ platforms:
+ - name: EL
+ versions:
+ - 7
+ categories:
+ - cloud
+dependencies:
+- role: openshift_facts
diff --git a/roles/openshift_node_facts/tasks/main.yml b/roles/openshift_node_facts/tasks/main.yml
new file mode 100644
index 000000000..c268c945e
--- /dev/null
+++ b/roles/openshift_node_facts/tasks/main.yml
@@ -0,0 +1,34 @@
+---
+- set_fact:
+ openshift_node_debug_level: "{{ lookup('oo_option', 'openshift_node_debug_level') }}"
+ when:
+ - openshift_node_debug_level is not defined
+ - lookup('oo_option', 'openshift_node_debug_level') != ""
+
+- name: Set node facts
+ openshift_facts:
+ role: "{{ item.role }}"
+ local_facts: "{{ item.local_facts }}"
+ with_items:
+ # Reset node labels to an empty dictionary.
+ - role: node
+ local_facts:
+ labels: {}
+ - role: node
+ local_facts:
+ annotations: "{{ openshift_node_annotations | default(none) }}"
+ debug_level: "{{ openshift_node_debug_level | default(openshift.common.debug_level) }}"
+ iptables_sync_period: "{{ openshift_node_iptables_sync_period | default(None) }}"
+ kubelet_args: "{{ openshift_node_kubelet_args | default(None) }}"
+ labels: "{{ lookup('oo_option', 'openshift_node_labels') | default( openshift_node_labels | default(none), true) }}"
+ registry_url: "{{ oreg_url_node | default(oreg_url) | default(None) }}"
+ schedulable: "{{ openshift_schedulable | default(openshift_scheduleable) | default(None) }}"
+ sdn_mtu: "{{ openshift_node_sdn_mtu | default(None) }}"
+ storage_plugin_deps: "{{ osn_storage_plugin_deps | default(None) }}"
+ set_node_ip: "{{ openshift_set_node_ip | default(None) }}"
+ node_image: "{{ osn_image | default(None) }}"
+ ovs_image: "{{ osn_ovs_image | default(None) }}"
+ proxy_mode: "{{ openshift_node_proxy_mode | default('iptables') }}"
+ local_quota_per_fsgroup: "{{ openshift_node_local_quota_per_fsgroup | default(None) }}"
+ dns_ip: "{{ openshift_dns_ip | default(none) | get_dns_ip(hostvars[inventory_hostname])}}"
+ env_vars: "{{ openshift_node_env_vars | default(None) }}"