Browse Source

Merge pull request #877 from Bhagyashree-shetty/devel

Issue #876: Login node ssh security issue and repos added to minimal …
Sujit Jadhav 3 years ago
parent
commit
a8931a623a

+ 10 - 0
roles/common/tasks/main.yml

@@ -110,6 +110,16 @@
   when: ( os_supported_leap not in compute_os )
 
 - block:
+    - name: Add leap repos
+      zypper_repository:
+        name: "{{ item.name }}"
+        repo: "{{ item.repo }}"
+        state: present
+        autorefresh: yes
+      with_items:
+        - "{{ leap_repo }}"
+      tags: install
+      
     - name: Installing python-xml
       package:
         name: python-xml

+ 6 - 0
roles/common/vars/main.yml

@@ -13,6 +13,12 @@
 #  limitations under the License.
 ---
 
+leap_repo:
+  - { name: repo-non-oss, repo: http://download.opensuse.org/distribution/leap/15.3/repo/non-oss/ }
+  - { name: repo-oss, repo: http://download.opensuse.org/distribution/leap/15.3/repo/oss/ }
+  - { name: repo-update-oss, repo: http://download.opensuse.org/update/leap/15.3/oss/ }
+  - { name: repo-update-non-oss, repo: http://download.opensuse.org/update/leap/15.3/non-oss/ }
+
 nvidia_repo: https://download.nvidia.com/opensuse/leap/15.3/
 docker_repo_url_leap: https://download.docker.com/linux/sles/docker-ce.repo
 docker_repo_dest_leap: /etc/YaST2/docker-ce.repo

+ 5 - 0
roles/login_node/tasks/configure_sshd.yml

@@ -13,6 +13,11 @@
 #  limitations under the License.
 ---
 
+- name: Set values for user and allow_deny variables
+  set_fact:
+    user: "{{ hostvars['127.0.0.1']['user'] }}"
+    allow_deny: "{{ hostvars['127.0.0.1']['allow_deny'] }}"
+    
 - name: Check if AllowUsers entry exixts
   shell: cat "{{ sshd_conf_file }}"
   register: file_content