Browse Source

Merge pull request #661 from DeepikaKrishnaiah/devel

Update nss package to install ipa server in CentOS 7.9
Sujit Jadhav 3 years ago
parent
commit
d217bb0276
2 changed files with 27 additions and 0 deletions
  1. 4 0
      roles/login_common/tasks/main.yml
  2. 23 0
      roles/login_common/tasks/update_package.yml

+ 4 - 0
roles/login_common/tasks/main.yml

@@ -19,4 +19,8 @@
 
 - name: Enable module idm in Rocky or Centos >= 8.0
   include_tasks: enable_dnf_module.yml
+  when: hostvars['127.0.0.1']['login_node_required']
+
+- name: Update Packages
+  include_tasks: update_package.yml
   when: hostvars['127.0.0.1']['login_node_required']

+ 23 - 0
roles/login_common/tasks/update_package.yml

@@ -0,0 +1,23 @@
+#  Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+---
+
+- name: Update nss package to install ipa server/client
+  command: yum update nss -y
+  changed_when: false
+  args:
+    warn: false
+  when:
+    - ( ansible_distribution | lower == os_centos )
+    - ( ansible_distribution_version < os_version )