debops / debops-tools

Your Debian-based data center in a box
https://debops.org/
GNU General Public License v3.0
1.07k stars 116 forks source link

Raspbian detected as Debian #187

Closed arbitrix closed 7 years ago

arbitrix commented 7 years ago

DebOps sets core__distribution to Debian instead of Raspbian when run on Raspbian. This causes debops.common to fail because of an incorrect /etc/apt/sources.list.

On today's Raspbian ansible_lsb.id="Raspbian" but ansible_distribution="Debian".

On Ubuntu 16.04 ansible_lsb.id="Ubuntu" and ansible_distribution="Ubuntu".

DebOps prefers ansible_distribution over ansible_lsb.id as per:

core__distribution: '{{ ansible_distribution
                        if (ansible_distribution != "NA")
                        else (ansible_lsb.id if ansible_lsb|d() else "NA") }}'

Would it be possible to have Raspbian autodetected by preferring ansible_lsb.id? Or would that break other platforms?

drybjed commented 7 years ago

Since this issue is propping up pretty consistently, I'll reoder the values to have ansible_lsb.id tried as the first one. It shouldn't affect other platforms supported by the project (Debian, Ubuntu).

arbitrix commented 7 years ago

Thank you.

drybjed commented 7 years ago

@arbitrix Does it work as expected now? I don't have a Raspbian to test it with...

arbitrix commented 7 years ago

@drybjed I will bootstrap one and report back.