Commit Graph
12 Commits
Author SHA1 Message Date
cyberops7andGitHub 8de0775282 Fix RKE2 MetalLB L2Advertisement to honor custom lb_pool_name (#135) (#168)
* Fix RKE2 MetalLB L2Advertisement to honor custom lb_pool_name (#135)

The apply-manifests role rendered the IPAddressPool from a template using
lb_pool_name, but applied the L2Advertisement from a hardcoded remote file
where the pool name was baked in as 'first-pool'. Setting lb_pool_name to
anything else left the L2Advertisement pointing at a non-existent pool, so
MetalLB assigned LoadBalancer IPs but never advertised them (services got an
external IP but were unreachable).

Template the L2Advertisement locally from lb_pool_name, mirroring the
IPAddressPool pattern, so both manifests always reference the same pool.

* Add explicit become: true to apply-manifests kubectl tasks

These tasks set become_user without a task-level become, tripping
ansible-lint's partial-become rule. become is already enabled globally via
ansible_become in group_vars/all.yaml, so the tasks already escalate to the
ansible user — but that is invisible to the linter (and to anyone reading the
task in isolation). Make it explicit with become: true alongside become_user.

Behavior-neutral: verified with ansible-playbook -vvv that the escalation
target is unchanged (sudo -u ansible; chown ansible on the temp files), so
kubectl still runs as the ansible user that owns ~/.kube/config.
2026-07-02 00:34:00 -06:00
James Turland ec3a088ed7 update 2024-09-25 15:51:50 +01:00
JamesandGitHub 8aed1489df Merge pull request #90 from jdratlif/main
A few updates for the RKE2 ansible plays
2024-09-25 15:49:04 +01:00
James Turland c61143e109 fix folder structure 2024-05-16 16:58:51 +01:00
John Ratliff 4a231dc838 combine roles
Use one play for both roles since the targets are the same
Fact gathering disabled because it's slow and not needed for anything in the roles
2024-05-09 10:48:51 +00:00
John Ratliff 26e36348f9 add role argument validation 2024-05-09 10:47:03 +00:00
John Ratliff eb346e7fb0 move defaults into role 2024-05-09 10:46:51 +00:00
John Ratliff a6e93c5f9e fix directory permissions 2024-05-09 10:34:36 +00:00
John Ratliff dffd6962a4 move rke2 vars to role
default values are in defaults
url in vars since that pattern should never change
2024-05-09 10:25:29 +00:00
John Ratliff f70bd28c56 add ansible config
specifies inventory automatically
disables host key checking
2024-05-09 10:16:30 +00:00
John Ratliff c67c9780b5 update rke2 inventory
add rke2 group for added targeting
2024-05-09 10:15:13 +00:00
James Turland 13bf31486f rke2 2024-05-08 12:30:25 +01:00