Commit b0f6e98b authored by Carlos Ramos Carreño's avatar Carlos Ramos Carreño

Install lsb-release when deploying SlapOS in SLE.

The `lsb_release` command is required in order to run the playbook,
because it uses `ansible_lsb`.
Otherwise, the following error is raised:

```
fatal: [127.0.0.1]: FAILED! => {"msg": "The conditional check '(ansible_distribution == \"Ubuntu\" and ansible_distribution_version == \"20.04\") or (ansible_lsb.codename == \"kylin\" and ansible_lsb.major_release == \"v10\")' failed. The error was: error while evaluating conditional ((ansible_distribution == \"Ubuntu\" and ansible_distribution_version == \"20.04\") or (ansible_lsb.codename == \"kylin\" and ansible_lsb.major_release == \"v10\")): 'dict object' has no attribute 'codename'. 'dict object' has no attribute 'codename'\n\nThe error appears to be in '/tmp/tmpplaybook_unstableslapos.27149/roles/repository/tasks/main.yml': line 91, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n  - name: Install Ubuntu 20.04 repository key\n    ^ here\n"}
```

As the package containing `lsb_release` is different on different Linux
distros, this commit only attempts to install it in SLE 16 SP6, where
it is called `lsb-release`.

See merge request nexedi/slapos.core!655
parent 52432e27
......@@ -35,6 +35,9 @@ GetDistro
if [[ ${DISTRO} =~ (-.) ]] && [[ -f /etc/debian_version ]]; then
apt_get install lsb-release
GetDistro
else
is_package_installed lsb-release || install_package lsb-release
GetDistro
fi
# Warn users who aren't on an explicitly supported distro, but allow them to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment