summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed AbdelHalim <[email protected]>2026-02-26 21:53:23 +0100
committerAhmed AbdelHalim <[email protected]>2026-02-26 21:53:23 +0100
commitc680d7fe797163f7fb20f59815a20e3a1cf8c734 (patch)
tree70930cb58f47ac82d246b2c5b144db03c6cfc23e
parent0be687ae2896cc9bf6f2bbb7417090c3b91cbecc (diff)
Fix using od instead of xxd
The od is available as part of coreutils which is shipping by default on linux but added for completeness Co-Authored-By: Claude.ai
-rw-r--r--roles/coreutils/meta/main.yml17
-rw-r--r--roles/coreutils/tasks/main.yml6
-rw-r--r--roles/network/meta/main.yml1
-rw-r--r--roles/network/tasks/main.yml4
4 files changed, 27 insertions, 1 deletions
diff --git a/roles/coreutils/meta/main.yml b/roles/coreutils/meta/main.yml
new file mode 100644
index 00000000..8de3810a
--- /dev/null
+++ b/roles/coreutils/meta/main.yml
@@ -0,0 +1,17 @@
+---
+dependencies: []
+galaxy_info:
+ author: "a14m"
+ description: "Install coreutils on Linux distributions"
+ license: "MIT"
+ min_ansible_version: "2.18"
+ platforms:
+ - name: "ArchLinux"
+ versions:
+ - "all"
+ - name: "Ubuntu"
+ versions:
+ - "noble"
+ - name: "Debian"
+ versions:
+ - "bookworm"
diff --git a/roles/coreutils/tasks/main.yml b/roles/coreutils/tasks/main.yml
new file mode 100644
index 00000000..4de5eefd
--- /dev/null
+++ b/roles/coreutils/tasks/main.yml
@@ -0,0 +1,6 @@
+---
+- name: "Ensure coreutils is installed"
+ become: true
+ ansible.builtin.package:
+ name: "coreutils"
+ state: "present"
diff --git a/roles/network/meta/main.yml b/roles/network/meta/main.yml
index 9a2a0fd8..029cd125 100644
--- a/roles/network/meta/main.yml
+++ b/roles/network/meta/main.yml
@@ -1,6 +1,7 @@
---
dependencies:
- role: "systemd"
+ - role: "coreutils"
galaxy_info:
author: "a14m"
description: "Configure basic distro networking features"
diff --git a/roles/network/tasks/main.yml b/roles/network/tasks/main.yml
index f488e940..7832c364 100644
--- a/roles/network/tasks/main.yml
+++ b/roles/network/tasks/main.yml
@@ -59,8 +59,10 @@
# noqa: risky-shell-pipe since this is used early before bash configuration
# it is the exception and needed to ensure that iwd is working on Mac machines
# that only work with broadcom-wl and iwd
+ # od is part of coreutils which is available by default on Arch/Debian but
+ # added as role dependency for safty
ansible.builtin.shell:
- cmd: "printf '%s' '{{ network_wifi_ssid }}' | xxd -p | tr -d '\\n'"
+ cmd: "printf '%s' '{{ network_wifi_ssid }}' | od -A n -t x1 | tr -d ' \\n'"
register: network_wifi_hex_ssid
changed_when: false
when: network_wifi_ssid != ""