[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Where'd lsb-compat go?



Hello,

On Mon, Jul 15, 2019 at 03:48:50PM -0400, Stefan Monnier wrote:
> > 3) It spurs me to ask: So, if not via LSB, what is the canonical way to
> > programatically determine the version of an installed Debian setup?
> 
> Why would a program want to know?

Being able to programmatically query the status of a system is the
cornerstone of configuration management. Some products handle it
better than others.

I've never heard of OP's product but well known solutions in this
space include Puppet and Ansible, which have the advantage of being
open source.

Ansible does not suffer from this confusion over the version number
of "10":

$ ansible backup4*,limoncello* -m setup -a 'filter=ansible_distribution*'
backup4.bitfolk.com | SUCCESS => {
    "ansible_facts": {
        "ansible_distribution": "Debian", 
        "ansible_distribution_file_parsed": true, 
        "ansible_distribution_file_path": "/etc/os-release", 
        "ansible_distribution_file_variety": "Debian", 
        "ansible_distribution_major_version": "9", 
        "ansible_distribution_release": "stretch", 
        "ansible_distribution_version": "9.9"
    }, 
    "changed": false
}
limoncello.bitfolk.com | SUCCESS => {
    "ansible_facts": {
        "ansible_distribution": "Debian", 
        "ansible_distribution_file_parsed": true, 
        "ansible_distribution_file_path": "/etc/os-release", 
        "ansible_distribution_file_variety": "Debian", 
        "ansible_distribution_major_version": "10", 
        "ansible_distribution_release": "buster", 
        "ansible_distribution_version": "10.0"
    }, 
    "changed": false
}

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting


Reply to: