# Trellis detecting wrong Ubuntu type - but it's incorrect

**URL:** https://discourse.roots.io/t/trellis-detecting-wrong-ubuntu-type-but-its-incorrect/18325
**Category:** trellis
**Created:** 2020-05-25T09:29:23Z
**Posts:** 9

## Post 1 by @JordanC26 — 2020-05-25T09:29:23Z

I just set up an empty DO droplet with Ubuntu 18.04. No existing LEMP stack etc.

 ![Screenshot 2020-05-25 at 10.27.08](https://discourse.roots.io/uploads/default/original/2X/d/dcf55871ce73da1392ac31fcd53cc0bbcd6627a2.png)

Gave Trellis the connection details etc. It connects fine but eventually I see the following statement:

> TASK [common : Validate Ubuntu version] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> **Trellis is built for Ubuntu 18.04 Bionic as of**
> 
> **[Ubuntu 18.04 by swalkinshaw · Pull Request #992 · roots/trellis · GitHub](https://github.com/roots/trellis/pull/992)**
> 
> **Your Ubuntu version is 16.04 xenial**
> 
> **We recommend you re-create your server to get the best experience.**
> 
> **Note: both of these methods will delete all your existing data. It’s up to**
> 
> **you to backup what’s needed and restore it.**
> 
> **Development via Vagrant: `vagrant destroy && vagrant up`**
> 
> **Staging/Production: Create a new server with Ubuntu 18.04 and provision**

That is incorrect. I only just installed 18.04 and when SSH’d in, it also tells me I am running 18.04

I am running the latest version of Trellis and Bedrock. Only cloned it down a week ago.

---

## Post 2 by @strarsis — 2020-05-25T09:31:29Z

When you invoke `lsb_release -a` on that system, do you really get that Ubuntu release?

---

## Post 3 by @JordanC26 — 2020-05-25T09:31:35Z

Maybe it’s related but after a few more minutes, it entirely fails on the following step:

```
TASK [mariadb : Install MySQL client] **********************************************************************************************************************************************************************
System info:
  Ansible 2.8.0; Darwin
  Trellis version (per changelog): "Removes ID from Lets Encrypt bundled certificate and make filename stable"
---------------------------------------------------
'/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options
::=--force-confold" install 'mariadb-client'' failed: E: Unable to
correct problems, you have held broken packages.

E: Unable to correct problems, you have held broken packages.

fatal: [ebedding-staging]: FAILED! => {"cache_update_time": 1590398914, "cache_updated": false, "changed": false, "rc": 100, "stderr_lines": ["E: Unable to correct problems, you have held broken packages."], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nSome packages could not be installed. This may mean that you have\nrequested an impossible situation or if you are using the unstable\ndistribution that some required packages have not yet been created\nor been moved out of Incoming.\nThe following information may help to resolve the situation:\n\nThe following packages have unmet dependencies:\n mariadb-client : Depends: mariadb-client-10.2 (>= 10.2.32+maria~xenial) but it is not going to be installed\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "Some packages could not be installed. This may mean that you have", "requested an impossible situation or if you are using the unstable", "distribution that some required packages have not yet been created", "or been moved out of Incoming.", "The following information may help to resolve the situation:", "", "The following packages have unmet dependencies:", " mariadb-client : Depends: mariadb-client-10.2 (>= 10.2.32+maria~xenial) but it is not going to be installed"]}
```

---

## Post 4 by @JordanC26 — 2020-05-25T09:33:21Z

> [@strarsis](#):
>
> lsb\_release -a

Yep.

> No LSB modules are available.  
> Distributor ID: Ubuntu  
> Description: Ubuntu 18.04.3 LTS  
> Release: 18.04  
> Codename: bionic

> Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-66-generic x86\_64)

---

## Post 5 by @strarsis — 2020-05-25T10:28:40Z

Judging from the Trellis ansible code/config, this seems to be an issue with ansible itself:

> <https://github.com/roots/trellis/blob/master/roles/common/tasks/main.yml#L72>

  
In this case apparently, `ansible_distribution_release` holds `bionic` on a `xenial` system.

Try to install the latest version of ansible as this may have been already fixed. On WSL I use the `pip` installer approach.

---

## Post 6 by @JordanC26 — 2020-05-26T07:43:15Z

Thanks for looking this up @strarsis.

I am running Ansible version 2.8.0. I ran the following to make sure I have everything locally as required: `pip install -r requirements.txt`

- Requirement already satisfied: ansible\<3.0,\>=2.8.0 in /Users/jordancharters/Library/Python/2.7/lib/python/site-packages (from -r requirements.txt (line 1)) (2.8.0)
- The other requirements were all met already too.

What version of Ansible are you on?

---

## Post 7 by @strarsis — 2020-05-26T09:04:25Z

I use ansible `2.7.13` on WSL (1).

Ansible uses the distro python package:

> **[nir0s/distro](https://github.com/nir0s/distro)**
>
> A much more elaborate, renewed alternative implementation for Python's platform.linux_distribution() - nir0s/distro

Install the latest distro version and run it manually on your system, does it work correctly there?

Could this issue be related?:

> <https://github.com/nir0s/distro/issues/238>
>
> Calls to distro.codename() worked as expected in 1.30, but in 1.40 I'm seeing what amounts to truncated output.
> Python 3.6.7 on Ubuntu...

Line that apparently extracts the codename:

> <https://github.com/nir0s/distro/blob/25c47569a4d5293b1062f48cdedf6e067f842592/distro.py#L982>

---

## Post 8 by @JordanC26 — 2020-05-27T07:39:27Z

Thanks for the suggestion. Updating to Ansible 2.9 helped pass this issue.

However on provisions after the first, it sometimes has an issue still and lets me go back to 2.8 and continue fine again, strange. I’ll try investigate further another time.

---

## Post 9 by @system — 2020-07-06T09:32:42Z

This topic was automatically closed after 42 days. New replies are no longer allowed.
