Use ansible helm module
Now that we are removing helmfile, we install some things (flux and helm-operator) via helm directly. We would like to use the ansible helm module for that, but I couldn't get it to work right away:
TASK [apps : Install flux] *****************************************************
Wednesday 11 December 2019 13:26:17 +0000 (0:00:00.779) 0:07:23.534 ****
fatal: [ci-408-remove-helmfiles]: FAILED! => changed=false
module_stderr: |-
2019-12-11 13:26:18,615 - ChartBuilder - INFO - Cloning https://charts.fluxcd.io/ for release flux
Traceback (most recent call last):
File "master:/builds/openappstack/openappstack/ansible/plugins/mitogen-0.2.9/ansible_mitogen/runner.py", line 975, in _run
self._run_code(code, mod)
File "master:/builds/openappstack/openappstack/ansible/plugins/mitogen-0.2.9/ansible_mitogen/runner.py", line 939, in _run_code
exec(code, vars(mod))
File "master:/usr/lib/python3.6/site-packages/ansible/modules/cloud/misc/helm.py", line 207, in <module>
File "master:/usr/lib/python3.6/site-packages/ansible/modules/cloud/misc/helm.py", line 195, in main
File "master:/usr/lib/python3.6/site-packages/ansible/modules/cloud/misc/helm.py", line 127, in install
File "/usr/local/lib/python3.7/dist-packages/pyhelm/tiller.py", line 114, in list_releases
for y in release_list:
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 392, in __next__
return self._next()
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 544, in _next
raise self
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "failed to connect to all addresses"
debug_error_string = "{"created":"@1576070779.123727173","description":"Failed to pick subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":3934,"referenced_errors":[{"created":"@1576070779.123723626","description":"failed to connect to all addresses","file":"src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":393,"grpc_status":14}]}"
>
module_stdout: ''
msg: |-
MODULE FAILURE
See stdout/stderr for the exact error
rc: 1
The only connection option offered by the module is the host
one. I tried setting it to the cluster's ip address, but that resulted in the same error.
For now, we'll use a simple shell command to run the helm program that's already installed on the server, but it would be nice to use the ansible helm module instead.