-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsite.yml
More file actions
51 lines (50 loc) · 1.18 KB
/
site.yml
File metadata and controls
51 lines (50 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
- name: Amazon 2023 cis benchmark
hosts: all
become: true
roles:
- role: "AMAZON2023-CIS"
#- name: Check if swap exists
# hosts: all
# become: yes
# tasks:
# - name: Check if swap is enabled
# command: swapon --show
# register: swap_status
# ignore_errors: yes
#
# - name: Debug swap status
# debug:
# msg: "{{ swap_status.stdout_lines }}"
#
# - name: Set swap existence fact
# set_fact:
# swap_exists: "{{ swap_status.stdout | length > 0 }}"
#
# - name: Display swap existence result
# debug:
# msg: "Swap exists: {{ swap_exists }}"
#
#
#- name: Install and configure firewalld
# hosts: all
# become: yes
# tasks:
# - name: Install firewalld on CentOS/RHEL/Amazon Linux 2023
# package:
# name: firewalld
# state: present
# when: ansible_facts['os_family'] == "RedHat"
#
# - name: Install firewalld on Ubuntu/Debian
# apt:
# name: firewalld
# state: present
# update_cache: yes
# when: ansible_facts['os_family'] == "Debian"
#
# - name: Start and enable firewalld service
# service:
# name: firewalld
# state: started
# enabled: yes