teralytics / ansible-marathon-module

An Ansible role that helps deploying applications on marathon.
MIT License
13 stars 6 forks source link

Support marathon https endpoints #13

Open benfab opened 6 years ago

benfab commented 6 years ago

Hello,

The marathon module fails to deploy an application when using https marathon endpoint, see the error below. My configuration works well with http, so I would like to ask if there any tricks to use https marathon endpoint?

Thank you!

fatal: [127.0.0.1]: FAILED! => {"changed": false, "module_stderr": "No handlers could be found for logger \"marathon\"\nTraceback (most recent call last):\n  File \"/tmp/ansible_LsfjG3/ansible_module_marathon.py\", line 305, in <module>\n    main()\n  File \"/tmp/ansible_LsfjG3/ansible_module_marathon.py\", line 278, in main\n    ret, changed = mam.create_if_not_exists(app_json)\n  File \"/tmp/ansible_LsfjG3/ansible_module_marathon.py\", line 192, in create_if_not_exists\n    app_info = self._get_app_info()\n  File \"/tmp/ansible_LsfjG3/ansible_module_marathon.py\", line 128, in _get_app_info\n    app_info = self._marathon_client.get_app(self._appid)\n  File \"/root/.local/lib/python2.7/site-packages/marathon/client.py\", line 249, in get_app\n    'GET', '/v2/apps/{app_id}'.format(app_id=app_id), params=params)\n  File \"/root/.local/lib/python2.7/site-packages/marathon/client.py\", line 99, in _do_request\n    raise MarathonError('No remaining Marathon servers to try')\nmarathon.exceptions.MarathonError: No remaining Marathon servers to try\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0}
vincepii commented 6 years ago

The uri module parameter is passed directly to the marathon library using http://thefactory.github.io/marathon-python/marathon.html#marathon.client.MarathonClient.

So if you only change

uri=https://foo

to

uri=http://foo

leaving everything else unchanged, things work?