dokku / ansible-dokku

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

dokku_ports doesn't use the new 0.31+ ports commands, thus crashes #168

Closed laurenskling closed 4 months ago

laurenskling commented 7 months ago

Description of problem

fatal: [xxx.myserver.xxx]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "app": "myapp",
            "mappings": [
                "http:80:1337",
                "https:443:1337"
            ],
            "state": "present"
        }
    },
    "meta": {
        "error": "Command 'dokku --quiet proxy:ports-set myapp http:80:1337 https:443:1337' returned non-zero exit status 1.",
        "present": false
    },
    "msg": "Command 'dokku --quiet proxy:ports-set myapp http:80:1337 https:443:1337' returned non-zero exit status 1."
}

So manually on my server, I reproduce:

myuser@myserver:~# dokku proxy:ports-set myapp http:80:1337 https:443:1337
 !     Invalid plugin subcommand call: ports-set

this is because ports management changed in 0.31: https://dokku.com/docs/networking/port-management/

How reproducible

use dokku 0.31+, use ansible dokku_ports

Environment Information

this command fails :/ sorry

How (deb/make) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?:

I installed Dokku on a VPS and trying to get ansible to install my projects

ltalirz commented 7 months ago

https://github.com/dokku/ansible-dokku/issues/169

marcoklein commented 7 months ago

Also related to #159 if you installed via Ansible Galaxy. If I pull latest master and drop that in the roles folder the ports plugin works just fine.

ltalirz commented 4 months ago

v2023.11.6 is now released on ansible galaxy, also just started a workflow to push the latest state of master https://github.com/dokku/ansible-dokku/actions/runs/8261254138

Please check whether this fixes your issue

strugee commented 4 months ago

I can confirm that upgrading from v2021.11.28 to v2024.3.13 fixes this issue for me. Thank you!

ltalirz commented 4 months ago

Great, I'll close this then. Should something still need to be fixed, feel free to reopen