abril/roles
Jayson Grace e4146b4ca9
Add PXE boot support to k3s_agent role (#409)
* Add conditional snapshotter for PXE-booted systems

**Added:**

- PXE Boot Check - Introduced tasks to check if the system is PXE-booted by
  analyzing `/proc/cmdline` in `roles/k3s_agent/tasks/main.yml`.
- Conditional Snapshotter in Template - Added logic in `k3s.service.j2` template
  to conditionally set `--snapshotter native` for PXE-booted systems.

**Changed:**

- `k3s.service.j2` Template Update - Modified the `ExecStart` line to include a
  conditional check for `is_pxe_booted` fact, dynamically setting the
  `--snapshotter` option for NFS-mounted systems.
- `main.yml` Task Modification - Added tasks to set `is_pxe_booted` fact based
  on the presence of `root=/dev/nfs` in the system's boot command line.

This update allows k3s agents on PXE-booted systems to use the native snapshotter
when running on NFS, addressing compatibility issues with OverlayFS.

* Introduce idiomatic practices for affected areas from previous commits

**Added:**

- Structured HTTP Proxy Configuration Block - Added a structured block in
  `http_proxy.yml` for managing HTTP proxy settings, aligning with Ansible's
  recommended practices. This includes creating directories and deploying
  configuration files in a clear, modular fashion.
- Conditional Execution for Proxy Setup - Implemented conditional execution
  for the proxy setup in `http_proxy.yml`, utilizing `proxy_env` to adhere
  to Ansible's best practices for conditional tasks.
- Improved PXE-Boot System Check Block - Introduced a more structured approach
  in `main.yml` for checking PXE-booted systems, enhancing readability and
  maintainability.

**Changed:**

- Adopted Ansible Builtin Modules - Transitioned existing tasks to use
  `ansible.builtin` modules, ensuring compatibility and future-proofing the
  role.
- Refined Task Grouping - Reorganized tasks into logical blocks, improving
  the overall structure and readability, and showcasing Ansible's capabilities
  for efficient task management.
- Updated K3s Service Configuration - Modified the K3s service configuration
  task in `main.yml` for a more streamlined approach using Ansible's template
  module, reflecting community-driven best practices.

**Removed:**

- Streamlined Task Definitions - Optimized task definitions to reduce
  redundancy, focusing on clarity and adherence to the evolving Ansible
  community standards.

* Added missing checks causing failures for agents
2024-02-06 14:24:31 -06:00
..
download/tasks initial commit 2022-03-27 10:05:37 -05:00
k3s/node/defaults Replace hardcoded 'master' group name with 'group_name_master' variable (#337) 2023-07-21 16:37:57 -05:00
k3s_agent Add PXE boot support to k3s_agent role (#409) 2024-02-06 14:24:31 -06:00
k3s_custom_registries Add option for custom registries / mirrors (#382) 2023-10-18 03:33:30 +00:00
k3s_server Add Cilium CNI option (#435) 2024-01-29 19:29:13 -06:00
k3s_server_post fix(cilium): k3s has an API server proxy at 127.0.0.1:6444 (#442) 2024-02-05 04:35:51 +00:00
lxc fixes: ERROR! The requested handler <'Reboot containers' / 'Reboot se… (#348) 2023-08-14 17:37:20 -05:00
prereq Update truthy values to true/false only, #204 (#387) 2024-01-15 12:43:44 -06:00
proxmox_lxc fixes: ERROR! The requested handler <'Reboot containers' / 'Reboot se… (#348) 2023-08-14 17:37:20 -05:00
raspberrypi feat(k3s): added support for latest raspberrypi os (debian 12 bookworm) (#404) 2024-01-26 22:20:06 +00:00
reset/tasks Add Calico CNI option (#414) 2024-01-26 18:53:27 -06:00
reset_proxmox_lxc Fix CI (#332) 2023-07-20 10:50:02 -05:00