Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ansible facts and Armbian

Featured Replies

As an ansible neophyte, I'm looking through the 'ansible facts' trying to figure out how to positively identify an Armbian system, with the goal of contributing a patch to the k3s project to improve support for Armbian.

 

Toward the end of the k3s-ansible playbook, they try to write some kernel options to a file in /boot. According to the comments, they've identified by Armbian machine as Ubuntu. At any rate, Armbian seems to want these flags in /boot/armbianEnv.txt, and the file ansible wants to modify doesn't exist so the update aborts:

 

fatal: [t4]: FAILED! => {"changed": false, "msg": "Destination /boot/firmware/cmdline.txt does not exist !", "rc": 257}

 

Looking at the ansible facts for the kernel (the motd says, "Welcome to Armbian Focal with Linux 5.4.45-sunxi64"), I don't see any entries that just come right out and say "Armbian". I'm not sure if it's common to look for subtle cues, or if this means that Armbian should be changing some metadata to announce itself? Or alternatively, why does Armbian use a different filename than Ubuntu?

 

What do you folks think? Any suggestions or pointers?

 

Thanks!

 

 

  • Author

Grovelling through k3s's playbook a and digging through the Armbian filesystem a little bit, I've figured out that Armbian reports:

 

Quote

lsb_release -a


No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 20.04 LTS
Release:    20.04
Codename:    focal

 

Whereas some folks on the Internet report that Rasbian returns:

 

Quote

lsb_release -a


No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10.0 (n/a)
...

 

It seems like it might work better to follow Raspbian's pattern. It would give me something for ansible to sink its teeth into (ansible does not seem to report Distributor ID, which is a shame)

 

Would it hurt anything to change this behavior? I haven't built a kernel in forever, let alone filed a patch to a distribution. How would I go about getting that to happen?

 

 

  • Author
3 minutes ago, Tido said:

 

Not sure how that helps with ansible. I believe the metadata is gathered and then the logic runs on the remote server, does it not?

 

It looks like everything in Armbian that says it's Armbian are in files with 'Armbian' in the name, from /boot to /etc.  Which of course general purpose Linux tools will not be looking for.

@hinkley

Changing how we interact with the LSB release info would be an architectural decision we'd have to investigate.

 

My suggested approach for now would be to write a custom facts module that looks for and parses /etc/armbian-release and store it in the library folder of your role.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.