Browse Source

Merge pull request #628 from DeepikaKrishnaiah/devel

Enable idm module in dnf to install ipa
Lucas A. Wilson 3 năm trước cách đây
mục cha
commit
425d0c7565

+ 21 - 0
roles/login_common/tasks/enable_dnf_module.yml

@@ -0,0 +1,21 @@
+#  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: Enable module idm in Rocky or Centos >= 8.0
+  command: dnf module enable idm:DL1 -y
+  when:
+    - ( ansible_distribution | lower == os_centos ) or
+      ( ansible_distribution | lower == os_rocky )
+    - ( ansible_distribution_version >= os_version )

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

@@ -15,4 +15,8 @@
 
 - name: Add ports of manager and login node to firewall
   include_tasks: firewall_settings.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
   when: hostvars['127.0.0.1']['login_node_required']

+ 6 - 1
roles/login_common/vars/main.yml

@@ -29,4 +29,9 @@ kerberos_port4: "464/udp"
 dns_port1: "53/tcp"
 dns_port2: "53/udp"
 dt_port1: "7389/tcp"
-ntp_port1: "123/udp"
+ntp_port1: "123/udp"
+
+# Usage: enable_dnf_module.yml
+os_centos: 'centos'
+os_rocky: 'rocky'
+os_version: '8.0'