dokku / ansible-dokku

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

fix: check for the `app` key of the data object in `dokku_network_property` #127

Closed fr3fou closed 2 years ago

fr3fou commented 2 years ago

This PR fixes the following bug from occuring

{
  "changed": false,
  "module_stderr": "Shared connection to [blank] closed.\r\n",
  "module_stdout": "{'global': True, 'property': 'initial-network', 'value': 'app-internal', 'app': None}\r\n\r\n{\"meta\": {\"present\": false, \"error\": \"When \\\"global\\\" is set to true, \\\"app\\\" must not be provided.\"}, \"failed\": true, \"msg\": \"When \\\"global\\\" is set to true, \\\"app\\\" must not be provided.\", \"invocation\": {\"module_args\": {\"global\": true, \"property\": \"initial-network\", \"value\": \"app-internal\", \"app\": null}}}\r\n",
  "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
  "rc": 1
}

When using the following task description:

- name: Setting a global network property
  dokku_network_property:
    global: true
    property: initial-network
    value: app-internal