repoquery and friends #3360

Open
tbielawa opened this Issue Feb 14, 2017 · 1 comment

Projects

None yet

2 participants

@tbielawa
Member

Description

In #3355 we tried putting the repoquery_cmd into vars/main.yml but that broke CI tests.

Making a TODO issue at @detiber's request to re-evaluate this issue later.

commit f72b946c1455c0ac14ffc187603f25e6f0e0e385
Author: Tim Bielawa <tbielawa@redhat.com>
Date:   Tue Feb 14 09:08:48 2017 -0800

    Move some facts from openshift_facts into vars

diff --git a/roles/openshift_facts/tasks/main.yml b/roles/openshift_facts/tasks/main.yml
index 11bd682..5196fce 100644
--- a/roles/openshift_facts/tasks/main.yml
+++ b/roles/openshift_facts/tasks/main.yml
@@ -8,12 +8,9 @@
   # Locally setup containerized facts for now
   - set_fact:
       l_is_atomic: "{{ ostree_booted.stat.exists }}"
+
   - set_fact:
       l_is_containerized: "{{ (l_is_atomic | bool) or (containerized | default(false) | bool) }}"
-      l_is_openvswitch_system_container: "{{ (use_openvswitch_system_container | default(use_system_containers) | bool) }}"
-      l_is_node_system_container: "{{ (use_node_system_container | default(use_system_containers) | bool) }}"
-      l_is_master_system_container: "{{ (use_master_system_container | default(use_system_containers) | bool) }}"
-      l_is_etcd_system_container: "{{ (use_etcd_system_container | default(use_system_containers) | bool) }}"
 
   - name: Ensure various deps are installed
     package: name={{ item }} state=present
@@ -48,10 +45,6 @@
         sdn_network_plugin_name: "{{ os_sdn_network_plugin_name | default(None) }}"
         use_openshift_sdn: "{{ openshift_use_openshift_sdn | default(None) }}"
 
-  - name: Set repoquery command
-    set_fact:
-      repoquery_cmd: "{{ 'dnf repoquery --latest-limit 1 -d 0' if ansible_pkg_mgr == 'dnf' else 'repoquery --plugins' }}"
-
   # This `when` allows us to skip this expensive block of tasks on
   # subsequent calls to the `openshift_facts` role. You will notice
   # speed-ups in proportion to the size of your cluster as this will
diff --git a/roles/openshift_facts/vars/main.yml b/roles/openshift_facts/vars/main.yml
index 9c3110f..cab4f60 100644
--- a/roles/openshift_facts/vars/main.yml
+++ b/roles/openshift_facts/vars/main.yml
@@ -5,3 +5,8 @@ required_packages:
   - python-six
   - PyYAML
   - yum-utils
+repoquery_cmd: "{{ 'dnf repoquery --latest-limit 1 -d 0' if ansible_pkg_mgr == 'dnf' else 'repoquery --plugins' }}"
+l_is_openvswitch_system_container: "{{ (use_openvswitch_system_container | default(use_system_containers) | bool) }}"
+l_is_node_system_container: "{{ (use_node_system_container | default(use_system_containers) | bool) }}"
+l_is_master_system_container: "{{ (use_master_system_container | default(use_system_containers) | bool) }}"
+l_is_etcd_system_container: "{{ (use_etcd_system_container | default(use_system_containers) | bool) }}"
@detiber detiber was assigned by tbielawa Feb 14, 2017
@detiber
Member
detiber commented Feb 14, 2017

@sdodson Not an immediate blocker, but this is a bug waiting to happen. We probably need to figure out a way to search for other occurrences of things like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment