Skip to content

Commit b504234

Browse files
authored
Merge pull request #27 from OT-OSM/configure_secure_boot_al2
Configure Secure Boot Setting AL2
2 parents dfde699 + 7ecc19d commit b504234

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

handlers/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,9 @@
4949
ansible.builtin.systemd:
5050
name: systemd-journald
5151
state: restarted
52+
53+
- name: Reload systemd
54+
ansible.builtin.systemd:
55+
daemon_reload: yes
56+
become: true
57+

tasks/amazon_linux.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
- name: Amazon Linux 2 | Configure secure boot setting
3+
include_tasks: configure_secure_boot_al2.yaml
24
- name: Amazon Linux 2 | Configure Time Synchronization
35
include_tasks: configure_time_synchronization_al2.yaml
46
- name: Amazon Linux 2 | Configure Filesystem Partitions
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
- name: "Ensure authentication required for single user mode (rescue & emergency)"
3+
ansible.builtin.lineinfile:
4+
path: "/usr/lib/systemd/system/{{ item }}"
5+
regexp: '^ExecStart='
6+
line: 'ExecStart=-/bin/sh -c "/usr/sbin/sulogin; /usr/bin/systemctl --fail --no-block default"'
7+
backup: yes
8+
loop: "{{ rescue_emergency_units }}"
9+
notify: Reload systemd
10+

vars/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ os_services_name: ['avahi-daemon', 'slapd', 'named', 'cups', 'telnet', 'discard-
8989
minute_aide_cronjob: '0'
9090
hour_aide_cronjob: '5'
9191

92+
#Configure SELinux
93+
rescue_emergency_units:
94+
- rescue.service
95+
- emergency.service
9296
# Configure Time Synchronization
9397
chrony_amazon_timesync_block: |
9498
# Amazon Linux 2 default Chrony configuration

0 commit comments

Comments
 (0)