updated modules used
diff --git a/tasks/with_no_proxy.yml b/tasks/with_no_proxy.yml
index 180922d..02c316a 100644
--- a/tasks/with_no_proxy.yml
+++ b/tasks/with_no_proxy.yml
@@ -4,10 +4,20 @@
yum:
name: "{{ item }}"
state: present
+ allow_downgrade: yes
with_items: "{{ openldap }}"
when: opdk_version | version_compare('4.17.01', '<')
- block:
+ - name: Downgrade openldap packages if needed
+ become: yes
+ yum:
+ name: "{{ item }}"
+ state: present
+ allow_downgrade: yes
+ with_items: "{{ openldap_2_4_40 }}"
+# shell: "yum downgrade -y {{ openldap_2_4_40 | join(' ') }}"
+
# - name: Update LDAP dependent libraries
# file:
# force: yes
@@ -16,12 +26,16 @@
# path: "{{ item.path }}"
# with_items: "{{ ldap_dependent_library_links }}"
- - name: Downgrade openldap packages if needed
- become: yes
- shell: "yum downgrade -y {{ openldap_2_4_40 | join(' ') }}"
-
rescue:
- block:
+ - name: Install because downgrade failure means the openldap packages are needed
+ become: yes
+ yum:
+ name: "{{ item }}"
+ state: present
+ allow_downgrade: yes
+ with_items: "{{ openldap_2_4_40 }}"
+
# - name: Update LDAP dependent libraries links
# file:
# force: yes
@@ -30,15 +44,10 @@
# path: "{{ item.path }}"
# with_items: "{{ ldap_dependent_library_links }}"
- - name: Install because downgrade failure means the openldap packages are needed
- become: yes
- yum:
- name: "{{ item }}"
- state: present
- downgrade: yes
- with_items: "{{ openldap_2_4_40 }}"
-
rescue:
+ - name: Download openldap manually, may need to change the link
+ shell: "yum downgrade -y {{ openldap_manual_download | join(' ') }}"
+
# - name: Update LDAP dependent libraries
# file:
# force: yes
@@ -47,7 +56,4 @@
# path: "{{ item.path }}"
# with_items: "{{ ldap_dependent_library_links }}"
- - name: Download openldap manually, may need to change the link
- shell: "yum downgrade -y {{ openldap_manual_download | join(' ') }}"
-
when: opdk_version | version_compare('4.17.01', '>=') and opdk_version | version_compare('4.17.05', '<=')