Browse Source

Merge pull request #10067 from mgugino-upstream-stage/fix-fedora-packages

Fix broken package list on fedora
OpenShift Merge Robot 6 years ago
parent
commit
e71f308d8a
1 changed files with 5 additions and 2 deletions
  1. 5 2
      playbooks/init/base_packages.yml

+ 5 - 2
playbooks/init/base_packages.yml

@@ -35,13 +35,16 @@
         name: "{{ pkg_list | join(',') }}"
         state: present
       vars:
-        pkg_list:
+        pkg_list_temp:
         - iproute
         - "{{ 'python3-dbus' if ansible_distribution == 'Fedora' else 'dbus-python' }}"
         - "{{ 'python3-PyYAML' if ansible_distribution == 'Fedora' else 'PyYAML' }}"
-        - "{{ 'python-ipaddress' if ansible_distribution != 'Fedora' else '' }}"
         - libsemanage-python
         - yum-utils
         - "{{ 'python3-docker' if ansible_distribution == 'Fedora' else 'python-docker' }}"
+        pkg_list_non_fedora:
+        - 'python-ipaddress'
+        pkg_list_use_non_fedora: "{{ ansible_distribution != 'Fedora' | bool }}"
+        pkg_list: "{{ pkg_list_non_fedora | ternary(pkg_list_non_fedora, []) + pkg_list_temp }}"
       register: result
       until: result is succeeded