dokku / ansible-dokku

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

should not filter out existing mapping when using ports-set #107

Closed wjzijderveld closed 3 years ago

wjzijderveld commented 3 years ago

With the implementation of PR #91 a bug was introduced, where it would remove existing port-mappings.

Example role

- name: configure ports
  dokku_ports:
    app: example-app
    mappings:
      - http:80:9000
      - https:443:9000
    state: present

Issue description

In the case that port 80 was already mapped in dokku, the check on existing mappings would result in the removal from the mapping on dokku, as only port 443 would be included in the ports-set command. On a next run the exact opposite would occur, port 443 would be removed and port 80 would be added.

This PR simply removes the check on existing mappings