FIX: Syntax error in SSH hardening playbook 91/3991/4
authordave kormann <davek@research.att.com>
Mon, 14 Dec 2020 17:04:26 +0000 (12:04 -0500)
committerdave kormann <davek@research.att.com>
Mon, 14 Dec 2020 17:25:10 +0000 (12:25 -0500)
Previous change introduced the ssh playbook to the world of
mismatched quotes.  Bad idea, fixed.

also cleaned up a few more suspect things yamllint turned up.

signed-off-by: dave kormann  <davek@research.att.com>
Change-Id: Ib8364126521434cfc0c44f193356147481d6e3f5

roles/ops-hardening/tasks/main.yaml
roles/ssh_conf_hardening/tasks/main.yaml

index 7aab166..90a57a2 100644 (file)
 
 #
 # tighten USB permissions
-# 
+#
 - name: Set USBGuard RestoreControllerDeviceState to false
   lineinfile:
     path: /etc/usbguard/usbguard-daemon.conf
 
 - Name: Ban suspect USB devices
   blockinfile:
-    # this isn't the optimal way to do this, i know, but i don't 
+    # this isn't the optimal way to do this, i know, but i don't
     # want to create a whole new template tree just to add this.
-    path:  /etc/usbguard/rules.conf
+    path: /etc/usbguard/rules.conf
     create: yes
     owner: root
     group: root
      # enabled:
      # xHCI controller/hub
      allow with-interface equals { 09:00:00 }
-     # mass media — sites may want to consider restricting 
+     # mass media — sites may want to consider restricting
      # this to 08:06:50 to just get the virtual CDROM and ban
-     # other USB media 
+     # other USB media
      allow with-interface equals { 08:*:* }
      # ethernet
      allow with-interface equals { 02:02:ff }
index 256620c..cfc4425 100644 (file)
 
 - name: "Limit interactive session count to 2"
   ssh_conf:
-    regexp: '[\s]*MaxSessions"
+    regexp: '[\s]*MaxSessions'
     values: "MaxSessions 2\n"
 
 - name: Banner creation
     name: sshd
     state: restarted
 
-- name : create a banner file
+- name: create a banner file
   lineinfile:
     path: /etc/banner
     create: yes