Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
a70f1cb
Adds RHEL9 Dockerfile and related files
Jul 30, 2025
17999ce
Adds RHEL9 to the ansible roles
Aug 1, 2025
dd816d8
Import the redhat 9 gpg key
Aug 1, 2025
0184164
RHEL 9: SELinux-friendly Nix install flow and container-wide policy; …
cbaxley Aug 11, 2025
01e536c
Modified SELinux policy to use container_policy module
cbaxley Aug 11, 2025
6844a7e
Adds a script to fix SELinux contexts for quadlet units on RHEL 9
cbaxley Aug 13, 2025
46eb603
Adds the quadlet fix script
cbaxley Aug 14, 2025
3bcf34c
Fixes the SELinux install to only install when selinux_available is true
Aug 14, 2025
0637501
Collects the SELinux setup tasks into a single role
cbaxley Aug 14, 2025
bf4c4a5
Adds container-selinux package to base role if selinux is available
cbaxley Aug 14, 2025
9603043
Fixes errors in SELinux policy and setup
cbaxley Aug 18, 2025
d416ad8
Break out the selinux policies for nix and podman
cbaxley Aug 18, 2025
ee521f4
Setting further selinux policies for redhat 9.1
cbaxley Aug 19, 2025
7361220
Fixes the expand_rhel_disk.sh script
cbaxley Aug 20, 2025
e3b942d
Adds SELinux context fixes for Nix store packages
cbaxley Aug 20, 2025
b823d7a
Load the SELinux policy for Podman Quadlet and restorecon the files
cbaxley Aug 20, 2025
f6521f7
Reorder SELinux tasks to ensure proper context restoration
cbaxley Aug 20, 2025
62bbe47
Adds RHEL 9.1 to the docker workflow
Aug 21, 2025
cc0ec18
Merge branch 'develop' into cbaxley-563-redhat-9-1
cbaxley Aug 21, 2025
abcd1dc
Updates the expand_rhel_disk.sh script to double the root partition s…
cbaxley Aug 22, 2025
6e596a8
Rename Wazuh dashboard files: remove 'dumped' from filenames
Aug 22, 2025
4836fb0
Merge branch 'cbaxley-563-redhat-9-1' of https://github.com/cisagov/L…
Aug 22, 2025
e088fdd
Merge branch 'develop' into cbaxley-563-redhat-9-1
cbaxley Aug 22, 2025
a3b7be2
Adds a new installer for RHEL 9
cbaxley Aug 22, 2025
8817487
Updates the RHEL 9 pipeline to use the new installer
cbaxley Aug 22, 2025
8184a87
Updates the RHEL 9 installer to use the --yes flag for the expand_rhe…
cbaxley Aug 22, 2025
bfe32e5
Update to run all tests on RHEL 9
cbaxley Aug 22, 2025
0216c41
Remove caddy from the certificate setup
cbaxley Aug 22, 2025
e180155
Adds RHEL 9 cluster workflow
cbaxley Aug 26, 2025
ebfaa4f
Adds RHEL remote installation instructions
Aug 26, 2025
9b46794
Merge branch 'develop' into cbaxley-563-redhat-9-1
cbaxley Aug 26, 2025
1de310c
Adds RHEL cluster workflow to trigger on PRs
Aug 26, 2025
47cf622
Adds RHEL cluster workflow to trigger on PRs
Aug 26, 2025
25e3fd6
Fixes Azure Windows agent installation output parsing
Aug 27, 2025
10a741c
Checks Azure Windows agent installation output for errors
Aug 27, 2025
1bf4faf
Passes the azure environment variables to the Azure Windows agent ins…
Aug 27, 2025
ada98b8
Uses the default ip instead of the AZURE_IP environment variable
Aug 27, 2025
ce00735
Updates some of the tools and documentation for testing
Aug 28, 2025
05f75d9
Clean up SELinux setup and vars
cbaxley Aug 29, 2025
fd6d745
Updates the example args for the azure linux network script
Aug 29, 2025
c9a0dea
Change install.sh to install EPEL repository on RHEL9
Sep 2, 2025
3764b7a
Adds CodeReady Builder for RHEL 9
Sep 2, 2025
2303d77
Sbom generator fixes for Red Hat 9
Sep 4, 2025
fac65cb
Adds script to configure Red Hat firewall
cbaxley Sep 11, 2025
3886a39
Adds nftables configuration script for Red Hat 9
cbaxley Sep 11, 2025
817c5bb
Change sudo use in configure_lme_nftables.sh
cbaxley Sep 12, 2025
2b31794
Lme certs required iptables when running in a docker container
Sep 15, 2025
8f04f0a
Adds connectivity tests
cbaxley Sep 16, 2025
5a65abb
Merge remote-tracking branch 'refs/remotes/origin/cbaxley-563-redhat-…
cbaxley Sep 16, 2025
13716d7
Cleans up some stuff in the RHEL9 Dockerfile
cbaxley Sep 17, 2025
5b57837
Cleans up the firewall scripts to make them more robust
cbaxley Sep 17, 2025
155cf0e
Updates gitignore to ignore all output logs and password files
cbaxley Sep 24, 2025
71f46dd
Broaden nftables configuration
cbaxley Sep 24, 2025
ec01a81
Adds the recommendation to restart the system after applying the fire…
Sep 25, 2025
13bfdec
Remove libsemanage-devel from SELinux policy tools
cbaxley Sep 26, 2025
1228a27
Merge branch 'cbaxley-563-redhat-9-1' of https://github.com/cisagov/L…
cbaxley Sep 26, 2025
1c0680d
Allow user to choose ansible installation method on redhat based distros
Sep 29, 2025
38d2f20
offline install initial additions
HopperShell Oct 3, 2025
b34aafd
fixes
HopperShell Oct 3, 2025
a39bd5d
fixes for os labeling
HopperShell Oct 3, 2025
be96b6f
fixes
HopperShell Oct 3, 2025
ba89b0f
update heap sizes
HopperShell Oct 3, 2025
b5a0080
tagging and debuggin
HopperShell Oct 3, 2025
ff0cc94
further cleanup script
HopperShell Oct 3, 2025
4ba56c4
prepare offline fix
HopperShell Oct 3, 2025
81e1a68
prepare fixes
HopperShell Oct 3, 2025
adb0809
copy over the preare script
HopperShell Oct 3, 2025
0d330e7
pre pare offline with redhat
HopperShell Oct 3, 2025
3c07504
Update containers.txt
aarz-snl Oct 3, 2025
473d024
Update containers.txt
aarz-snl Oct 3, 2025
b939607
install fix
HopperShell Oct 3, 2025
1aaab89
grab main install
HopperShell Oct 3, 2025
3e2b21a
Fix offline installation functionality
Oct 6, 2025
1f5bc91
Add LVM rebalancing script for offline preparation
Oct 6, 2025
fae7ed6
Fix rebalance script to expand physical partition first
Oct 6, 2025
dcf82c4
Add expand_disk_for_offline.sh - proper allocation for offline prep
Oct 6, 2025
3e795d1
Remove rebalance_lvm_for_offline.sh - replaced by expand_disk_for_off…
Oct 6, 2025
5a07dbf
Fix offline installation workflow: reorder execution and fix RHEL pac…
Oct 7, 2025
e5f9ec7
Fix offline container loading and update disk allocation
Oct 8, 2025
3124098
Fix offline mode installation for RHEL 9
Oct 8, 2025
56e02b9
offline updates
aarz-snl Oct 13, 2025
fd3c2e4
update uninstall
aarz-snl Oct 13, 2025
6b53d3f
updated redhat to tarball nix
aarz-snl Oct 13, 2025
0a469b5
Upad install to not use nix for redhat
aarz-snl Oct 13, 2025
5cb8d8b
Fixes install process
aarz-snl Oct 13, 2025
b7c27f9
update prepare offline
aarz-snl Oct 13, 2025
e2e6ae8
Update prepare_offline.sh
aarz-snl Oct 14, 2025
3df3f1b
Fix offline RPM installation: Use safer dnf localinstall instead of r…
Oct 14, 2025
e1d8e59
Fix prepare_offline.sh: Skip Nix installation on RHEL systems
Oct 14, 2025
47ee6b3
Fix offline installation: Force reinstall critical podman packages
Oct 14, 2025
3e99274
Revert online mode container tagging to match develop branch
Oct 14, 2025
d97429b
fix ca fingerprint issue
aarz-snl Oct 15, 2025
9d94778
update prepare offline to force podman install
aarz-snl Oct 15, 2025
3abf7dc
Merge origin/develop into offline-installation-full
aarz-snl Oct 20, 2025
4400a5c
Fix .gitignore conflict markers
aarz-snl Oct 20, 2025
10ad6f3
Revert unnecessary task name changes - keep original names from develop
aarz-snl Oct 20, 2025
4852f47
Remove uninstall_lme.sh and reset wipe_lme.sh to develop version
aarz-snl Oct 20, 2025
1beedef
Remove UNINSTALL.md (development-only documentation)
aarz-snl Oct 20, 2025
b1489c4
Revert quadlet container changes to develop version
aarz-snl Oct 20, 2025
a367284
Adds six to the requirements.txt file
Oct 20, 2025
8929094
Update to fix issues with ubuntu
aarz-snl Oct 20, 2025
4b994ee
https for distrubtion server
aarz-snl Oct 22, 2025
9f2cd46
update install.sh install order
aarz-snl Oct 28, 2025
f0ce170
update install and ansible to install podman properly
aarz-snl Oct 28, 2025
321c731
fix distirbution quadlet to match offline installation branch
aarz-snl Oct 28, 2025
380c47d
update install.sh to not require tar.gz check offline_resources instead
aarz-snl Oct 29, 2025
aa10d91
Makes the redhat packaging more robust
Nov 4, 2025
5317283
Merge branch 'develop' into offline-installation-full
cbaxley Nov 5, 2025
6a25c1b
Fixes the rpm install to pick up all dependencies.
Nov 5, 2025
459a9db
Fix boolean evaluation for newer ansible versions
Nov 6, 2025
95a08b0
Updates the stack version to 8.18.3
Nov 6, 2025
b293b83
Merge branch 'develop' into offline-installation-full
cbaxley Nov 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,10 @@ cloud.md
# SELinux build artifacts
ansible/roles/base/files/selinux/*.mod
ansible/roles/base/files/selinux/*.pp

# Offline Install
offline_resources/
lme-offline-*.tar.gz

# Development scripts (not for production)
scripts/dev_uninstall_lme.sh
5 changes: 4 additions & 1 deletion ansible/roles/base/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@

# Include common OS tasks first
- name: Include common OS tasks
include_tasks: "{{ ansible_distribution | lower }}.yml"
include_tasks: "{{ item }}"
with_first_found:
- "{{ ansible_distribution | lower }}.yml"
- "{{ ansible_os_family | lower }}.yml"
when: ansible_distribution is defined

# Include version-specific tasks with fallback
Expand Down
16 changes: 13 additions & 3 deletions ansible/roles/base/tasks/redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
delay: 10
until: dnf_update is success
ignore_errors: "{{ ansible_check_mode }}"
when: not (offline_mode | default(false))

- name: Skip package installation in offline mode
debug:
msg: "Offline mode enabled - skipping package installation (packages should be pre-installed)"
when: offline_mode | default(false)

- name: Check if curl-minimal is installed
command: rpm -q curl-minimal
Expand All @@ -24,6 +30,7 @@
- name: Debug - Show common packages to be installed
debug:
msg: "Installing common packages: {{ common_packages | join(', ') }}"
when: not (offline_mode | default(false))

- name: Install common packages
dnf:
Expand All @@ -35,15 +42,17 @@
delay: 10
until: dnf_install is success
ignore_errors: "{{ ansible_check_mode }}"
when: not (offline_mode | default(false))

- name: Debug - Show common packages install result
debug:
var: dnf_install
when: debug_mode | default(false)
when: debug_mode | default(false) | bool

- name: Debug - Show Red Hat packages to be installed
debug:
msg: "Installing Red Hat packages: {{ redhat_packages | join(', ') }}"
when: not (offline_mode | default(false))

- name: Install required Red Hat packages
dnf:
Expand All @@ -55,11 +64,12 @@
delay: 10
until: dnf_install_redhat is success
ignore_errors: "{{ ansible_check_mode }}"
when: not (offline_mode | default(false))

- name: Debug - Show Red Hat packages install result
debug:
var: dnf_install_redhat
when: debug_mode | default(false)
when: debug_mode | default(false) | bool

# SELinux setup - run early before any Nix/Podman installation
- name: Detect if SELinux tooling is available (base role)
Expand Down Expand Up @@ -110,7 +120,7 @@
- name: Debug - Show firewalld disable result
debug:
msg: "Firewalld service {{ 'successfully disabled' if firewalld_disable.changed else 'was already disabled or not installed' }}"
when: debug_mode | default(false)
when: debug_mode | default(false) | bool

- name: Set timezone
timezone:
Expand Down
27 changes: 23 additions & 4 deletions ansible/roles/base/tasks/redhat_9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
delay: 5
until: epel_key_import is success
ignore_errors: "{{ ansible_check_mode }}"
when: not (offline_mode | default(false))

- name: Install EPEL repository
dnf:
Expand All @@ -22,12 +23,19 @@
delay: 5
until: epel_install is success
ignore_errors: "{{ ansible_check_mode }}"
when: not (offline_mode | default(false))

- name: Skip EPEL installation in offline mode
debug:
msg: "Offline mode enabled - skipping EPEL GPG key and repository installation (should be pre-installed from offline packages)"
when: offline_mode | default(false)

- name: Install dnf-plugins-core
dnf:
name: dnf-plugins-core
state: present
become: yes
when: not (offline_mode | default(false))

- name: Check available repositories
command: dnf repolist --all
Expand All @@ -39,23 +47,28 @@
command: dnf config-manager --set-enabled crb
become: yes
changed_when: true
when: "'crb' in available_repos.stdout"
when:
- "'crb' in available_repos.stdout"
- not (offline_mode | default(false))
ignore_errors: true

- name: Enable PowerTools repository (CentOS)
command: dnf config-manager --set-enabled powertools
become: yes
changed_when: true
when: "'powertools' in available_repos.stdout"
when:
- "'powertools' in available_repos.stdout"
- not (offline_mode | default(false))
ignore_errors: true

- name: Enable CodeReady Builder for RHEL (if registered)
command: subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms
become: yes
changed_when: true
when:
when:
- "'codeready-builder' in available_repos.stdout"
- ansible_distribution == "RedHat"
- not (offline_mode | default(false))
ignore_errors: true

- name: Install Red Hat 9-specific packages
Expand All @@ -67,4 +80,10 @@
retries: 60
delay: 10
until: dnf_install_rh9 is success
ignore_errors: "{{ ansible_check_mode }}"
ignore_errors: "{{ ansible_check_mode }}"
when: not (offline_mode | default(false))

- name: Skip Red Hat 9-specific packages installation in offline mode
debug:
msg: "Offline mode enabled - skipping Red Hat 9-specific packages installation (should be pre-installed)"
when: offline_mode | default(false)
17 changes: 13 additions & 4 deletions ansible/roles/base/tasks/selinux_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
- Available: {{ selinux_available | default(false) }}
- Current mode: {{ getenforce_out.stdout | default('N/A') }}
- Was enforcing: {{ selinux_was_enforcing | default(false) }}
when: debug_mode | default(false)
when: debug_mode | default(false) | bool

# Install SELinux policy tools early
- name: Ensure SELinux policy tools are present
Expand All @@ -49,7 +49,16 @@
- container-selinux
state: present
become: yes
when: selinux_available | default(false)
when:
- selinux_available | default(false)
- not (offline_mode | default(false))

- name: Skip SELinux policy tools installation in offline mode
debug:
msg: "Offline mode enabled - skipping SELinux policy tools installation (should be pre-installed)"
when:
- selinux_available | default(false)
- offline_mode | default(false)

- name: Ensure SELinux policy directory exists
file:
Expand Down Expand Up @@ -106,7 +115,7 @@
- name: Debug SELinux compile result
debug:
var: selinux_compile
when: debug_mode | default(false) and selinux_compile is defined
when: debug_mode | default(false) | bool and selinux_compile is defined

- name: Check if SELinux module already present (pre-load)
shell: semodule -l | grep -E "^lme_policy(\\s|$)" || true
Expand Down Expand Up @@ -178,5 +187,5 @@
- LME policy loaded: {{ 'Yes' if lme_policy_present.rc == 0 else 'No' }}
- Ready for Nix/Podman installation with proper contexts
when:
- debug_mode | default(false)
- debug_mode | default(false) | bool
- selinux_available | default(false)
2 changes: 1 addition & 1 deletion ansible/roles/base/tasks/selinux_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
- "Active (not disabled): {{ selinux_active }}"
- "Context supported: {{ selinux_context_supported }}"
- "cp preserve cmd: {{ cp_preserve_cmd }}"
when: debug_mode | default(false)
when: debug_mode | default(false) | bool


10 changes: 9 additions & 1 deletion ansible/roles/base/tasks/setup_passwords.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,19 @@
method: GET
return_content: yes
register: hibp_response
when: not (offline_mode | default(false))

- name: Skip HIBP check in offline mode
debug:
msg: "Offline mode enabled - skipping HIBP password breach check"
when: offline_mode | default(false)

- name: Fail if password is found in breaches
fail:
msg: "The password has been found in breaches... this should only happen if you provided a password via the cli... choose a different password"
when: hibp_response.content | regex_search(suffix)
when:
- not (offline_mode | default(false))
- hibp_response.content | regex_search(suffix)

- name: check if vault-pass.sh is created
stat:
Expand Down
8 changes: 8 additions & 0 deletions ansible/roles/base/tasks/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
delay: 10
until: apt_update is success
ignore_errors: "{{ ansible_check_mode }}"
when: not (offline_mode | default(false))

- name: Skip package installation in offline mode
debug:
msg: "Offline mode enabled - skipping package installation (packages should be pre-installed)"
when: offline_mode | default(false)

- name: Install common packages
apt:
Expand All @@ -21,6 +27,7 @@
delay: 10
until: apt_install is success
ignore_errors: "{{ ansible_check_mode }}"
when: not (offline_mode | default(false))

- name: Install required Ubuntu packages
apt:
Expand All @@ -32,6 +39,7 @@
delay: 10
until: apt_install_ubuntu is success
ignore_errors: "{{ ansible_check_mode }}"
when: not (offline_mode | default(false))

- name: Set timezone information
debconf:
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/base/tasks/ubuntu_24_04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
name: "{{ ubuntu_24_04_packages | default([]) }}"
state: present
become: yes
when: not (offline_mode | default(false))
60 changes: 56 additions & 4 deletions ansible/roles/fleet/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,35 @@
- "wazuh_api password is set: {{ wazuh_api_password | length > 0 }}"
when: debug_mode | bool

# Start Fleet distribution server FIRST in offline mode (before any package queries)
- name: Enable and start Fleet distribution service
systemd:
name: lme-fleet-distribution
enabled: yes
state: started
daemon_reload: yes
become: yes
when: offline_mode | default(false)

- name: Wait for Fleet distribution server to be ready
uri:
url: "https://{{ ipvar }}:8080/health"
method: GET
validate_certs: no
status_code: [200]
register: distribution_health
until: distribution_health.status is defined and distribution_health.status == 200
retries: 60
delay: 5
when: offline_mode | default(false)

- name: Check if Fleet distribution server is ready
fail:
msg: "Fleet distribution server failed to start after 5 minutes"
when:
- offline_mode | default(false)
- distribution_health.status is not defined or distribution_health.status != 200

# Wait for Kibana to be fully ready
- name: Wait for Kibana to be fully ready
uri:
Expand Down Expand Up @@ -184,22 +213,41 @@
no_log: "{{ not debug_mode }}"
ignore_errors: yes

- name: Get CA fingerprint
- name: Get CA fingerprint (Nix podman)
ansible.builtin.shell: |
set -a
. {{ playbook_dir }}/../scripts/extract_secrets.sh -q
set +a
/nix/var/nix/profiles/default/bin/podman exec -w /usr/share/elasticsearch/config/certs/ca lme-elasticsearch cat ca.crt | openssl x509 -noout -fingerprint -sha256 | cut -d "=" -f 2 | tr -d : | head -n1
args:
executable: /bin/bash
register: ca_fingerprint
register: ca_fingerprint_nix
changed_when: false
become: yes
no_log: "{{ not debug_mode }}"
when: not (offline_mode | default(false) and ansible_os_family == "RedHat")

- name: Get CA fingerprint (System podman - RHEL offline)
ansible.builtin.shell: |
set -a
. {{ playbook_dir }}/../scripts/extract_secrets.sh -q
set +a
podman exec -w /usr/share/elasticsearch/config/certs/ca lme-elasticsearch cat ca.crt | openssl x509 -noout -fingerprint -sha256 | cut -d "=" -f 2 | tr -d : | head -n1
args:
executable: /bin/bash
register: ca_fingerprint_system
changed_when: false
become: yes
no_log: "{{ not debug_mode }}"
when: offline_mode | default(false) and ansible_os_family == "RedHat"

- name: Set CA fingerprint fact
set_fact:
ca_fingerprint: "{{ ca_fingerprint_nix.stdout if ca_fingerprint_nix is not skipped else ca_fingerprint_system.stdout }}"

- name: Debug CA fingerprint
debug:
var: ca_fingerprint.stdout
var: ca_fingerprint
when: debug_mode | bool

- name: Set Fleet server hosts
Expand Down Expand Up @@ -270,7 +318,7 @@
Content-Type: "application/json"
body_format: json
body:
ca_trusted_fingerprint: "{{ ca_fingerprint.stdout }}"
ca_trusted_fingerprint: "{{ ca_fingerprint }}"
register: fleet_output_fingerprint_result
until: fleet_output_fingerprint_result.status == 200
retries: 12
Expand Down Expand Up @@ -627,3 +675,7 @@
- "wazuh_api={{ wazuh_api_password }}"
when: debug_mode | bool
no_log: "{{ not debug_mode }}"

# Note: Kibana offline mode configuration now happens in podman role
# (before Kibana starts) instead of here

Loading