Files
ansible-hardening/tasks/rhel7stig/kernel.yml
Major Hayden aacea9495f Disable usb-storage module [+Docs]
This patch disables the usb-storage module by default. Documentation
is included.

Implements: blueprint security-rhel7-stig
Change-Id: I2fdc1854506972a33c81ca25ea08467a6f49cad2
2016-11-29 14:53:45 -06:00

46 lines
1.3 KiB
YAML

---
# Copyright 2016, Rackspace US, Inc.
#
# 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: RHEL-07-020160 - USB mass storage must be disabled.
lineinfile:
dest: /etc/modprobe.d/openstack-ansible-security-disable-usb-storage.conf
line: install usb-storage /bin/true
create: yes
when:
- security_rhel7_disable_usb_storage | bool
tags:
- kernel
- medium
- RHEL-07-020160
- name: Set sysctl configurations
sysctl:
name: "{{ item.name }}"
value: "{{ item.value }}"
state: "{{ item.enabled | ternary('present', 'absent') }}"
reload: yes
with_items: "{{ sysctl_settings_rhel7 }}"
tags:
- medium
- kernel
- RHEL-07-040350
- RHEL-07-040351
- RHEL-07-040380
- RHEL-07-040410
- RHEL-07-040420
- RHEL-07-040421
- RHEL-07-040730
- RHEL-07-040860