dokku / ansible-dokku

Ansible modules for installing and configuring Dokku
MIT License
169 stars 44 forks source link

Faild installation when 'dokku_version' is set to 0.22.3, 0.22.4 or 0.22.5 #93

Closed selmison closed 3 years ago

selmison commented 3 years ago

Description of problem

When install dokku using 'dokku_bot.ansible_dokku' role and setting 'dokku_version' variable to 0.22.3, 0.22.4 and 0.22.5

How reproducible

Run playbook with:

roles:
  - dokku_bot.ansible_dokku
vars:
  dokku_version: 0.22.5

Steps to Reproduce

  1. Create a playbook.yml file with following content:
    - hosts: all
    roles:
    - dokku_bot.ansible_dokku
    vars:
    dokku_version: 0.22.5
  2. Execute the command ansible-playbook playbook.yml

Actual Results

Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 dokku : Depends: sshcommand (>= 0.12.0) but 0.11.0 is to be installed
         Recommends: parallel but it is not going to be installed
         Recommends: dokku-update but it is not going to be installed
         Recommends: dokku-event-listener but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Expected Results

Successful installation

Environment Information

Ubuntu 18.04 LTS

ltalirz commented 3 years ago

hey @selmison , if you look inside the role variables, you will notice that it includes the sshcommand version, so I guess all you need to do is update sshcommand_version as well: https://github.com/dokku/ansible-dokku/blob/31fac3145c72b52709a15554659cd2272aa6fd08/defaults/main.yml#L8-L13

However, I agree in the sense that I also wondered whether there is any particular reason for specifying the version of sshcommand in the role variables if it is anyhow a dependency of dokku. @josegonzalez would it be better/more user friendly to remove it from the role variables?

Have you come across use cases where it was necessary to pin the sshcommand version to something different than what you would get just by installing dokku? (same question applies to plugn/herokuish, if those are also dependencies)

josegonzalez commented 3 years ago

@ltalirz defer to you as the defacto ansible-dokku lead dev :)

ltalirz commented 3 years ago

Looking back at this, these are the current dependencies of the dokku apt package:

ubuntu@dev-dokku:/etc/apt/sources.list.d$ apt-cache depends dokku
dokku
  PreDepends: gliderlabs-sigil
 |PreDepends: nginx
  PreDepends: <openresty>
  PreDepends: dnsutils
 |PreDepends: cgroupfs-mount
  PreDepends: cgroup-lite
  PreDepends: plugn
  PreDepends: sudo
    sudo-ldap
  PreDepends: python3
  PreDepends: debconf
  Depends: locales
  Depends: git
  Depends: cpio
  Depends: curl
  Depends: man-db
  Depends: netcat
    netcat-traditional
    netcat-openbsd
  Depends: sshcommand
 |Depends: <docker-engine-cs>
 |Depends: <docker-engine>
 |Depends: <docker-io>
 |Depends: docker.io
 |Depends: docker-ce
 |Depends: <docker-ee>
  Depends: <moby-engine>
  Depends: docker-image-labeler
  Depends: net-tools
  Depends: software-properties-common
  Depends: procfile-util
 |Depends: <python-software-properties>
  Depends: python3-software-properties
  Depends: rsyslog
  Depends: dos2unix
  Depends: jq
  Recommends: herokuish
  Recommends: parallel
  Recommends: dokku-update
  Recommends: dokku-event-listener

I.e. dokku

For most users, the ansible role could therefore just install dokku and would be fine. In order to support use cases where pinning is desired, I'll see whether I can retain the possibility to also fix the version of those packages independently.

[1] For recommended packages, ansible will follow the settings of the OS. For Ubuntu, the default behavior has been to install recommended packages (since ubuntu 10.04), but the user can change this.