ansible-dokku
ansible-dokku copied to clipboard
Skip port mappings when no changes are detected
The dokku_ports
task always completes with changed=true, even when the same ports are already set for an application.
This PR checks if the existing ports match the ports to set, if so, it completes with changed=false.
The command for checking existing ports dokku --quiet proxy:ports {app}
returns a non-zero exit code when no ports are defined, so I replaced this with a call to dokku --quiet proxy:report {app}
.
dokku --quiet proxy:report {app}
Proxy enabled: true
Proxy port map: http:80:80 https:443:80
Proxy type: nginx