Browse Source

Update main.yml

Signed-off-by: abhishek-sa1 <abhishek.sa3@dell.com>
abhishek-sa1 3 years ago
parent
commit
6ce4320c9c
1 changed files with 12 additions and 10 deletions
  1. 12 10
      roles/login_common/tasks/main.yml

+ 12 - 10
roles/login_common/tasks/main.yml

@@ -1,4 +1,4 @@
-#  Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
+#  Copyright 2022 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.
@@ -13,14 +13,16 @@
 #  limitations under the License.
 ---
 
-- name: Add ports of manager and login node to firewall
-  include_tasks: firewall_settings.yml
-  when: hostvars['127.0.0.1']['login_node_required']
+- block:   
+    - name: Add ports of manager and login node to firewall
+      include_tasks: firewall_settings.yml
 
-- 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: Enable module idm in Rocky or Centos >= 8.0
+      include_tasks: enable_dnf_module.yml
 
-- name: Update Packages
-  include_tasks: update_package.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']
+    - hostvars['127.0.0.1']['ipa_server_ms'] and login_node_group in group_names or
+      not hostvars['127.0.0.1']['ipa_server_ms']