Skip to content

Commit 154d710

Browse files
committed
fix(ansible): add fstab cleanup playbook
1 parent a842b40 commit 154d710

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
# ONE-TIME FIX (2026-03-11):
3+
#
4+
# Removes stale /dev/sdb swap entry from fstab.
5+
# Linode base images included a swap disk reference, but our Terraform configs
6+
# provision only a single boot disk (sda). The dangling fstab entry caused
7+
# systemd to stall boot waiting for /dev/sdb (up to 1m30s), which led to
8+
# SSH timeouts in CI (housekeeping workflow).
9+
#
10+
# This likely only needs to be run once on existing Linode instances, but can
11+
# be safely re-run if needed. Future Linode images should not include
12+
# the swap entry, so new instances should not require this fix.
13+
#
14+
- name: Remove stale swap entry from fstab
15+
hosts: '{{ variable_host | default("null") }}'
16+
serial: "{{ variable_serial | default(1) }}"
17+
gather_facts: false
18+
become: true
19+
become_user: root
20+
tasks:
21+
- name: Remove /dev/sdb swap line from fstab
22+
ansible.builtin.lineinfile:
23+
path: /etc/fstab
24+
regexp: '^/dev/sdb\s+none\s+swap'
25+
state: absent
26+
register: fstab_changed
27+
28+
- name: Show result
29+
ansible.builtin.debug:
30+
msg: "fstab {{ 'updated' if fstab_changed.changed else 'unchanged (no swap entry found)' }}"

0 commit comments

Comments
 (0)