To test bionic support, I built a charm that added bionic to metadata.yaml and ran it through our CI. This was against a model with three elasticsearch units.
I got the following error:
2018-02-09 12:01:41 DEBUG config-changed
2018-02-09 12:01:41 DEBUG config-changed PLAY [localhost] ***************************************************************
2018-02-09 12:01:41 DEBUG config-changed
2018-02-09 12:01:41 DEBUG config-changed TASK [Gathering Facts] *********************************************************
2018-02-09 12:01:41 DEBUG config-changed ok: [localhost]
2018-02-09 12:01:41 DEBUG config-changed
2018-02-09 12:01:41 DEBUG config-changed TASK [Add apt key.] ************************************************************
2018-02-09 12:01:42 DEBUG config-changed ok: [localhost]
2018-02-09 12:01:42 DEBUG config-changed
2018-02-09 12:01:42 DEBUG config-changed TASK [Add apt archive.] ********************************************************
2018-02-09 12:01:42 DEBUG config-changed ok: [localhost]
2018-02-09 12:01:42 DEBUG config-changed
2018-02-09 12:01:42 DEBUG config-changed TASK [Update ufw config to avoid error] ****************************************
2018-02-09 12:01:42 DEBUG config-changed changed: [localhost]
2018-02-09 12:01:42 DEBUG config-changed
2018-02-09 12:01:42 DEBUG config-changed TASK [Disable firewall only when explicitly configured to do so.] **************
2018-02-09 12:01:43 DEBUG config-changed ok: [localhost]
2018-02-09 12:01:43 DEBUG config-changed
2018-02-09 12:01:43 DEBUG config-changed TASK [Reset firewall] **********************************************************
2018-02-09 12:01:43 DEBUG config-changed skipping: [localhost]
2018-02-09 12:01:43 DEBUG config-changed
2018-02-09 12:01:43 DEBUG config-changed TASK [Turn on fire wall with logging.] *****************************************
2018-02-09 12:01:43 DEBUG config-changed skipping: [localhost]
2018-02-09 12:01:43 DEBUG config-changed
2018-02-09 12:01:43 DEBUG config-changed TASK [Open the firewall for all clients] ***************************************
2018-02-09 12:01:43 DEBUG config-changed skipping: [localhost] => (item=relations["client"])
2018-02-09 12:01:43 DEBUG config-changed
2018-02-09 12:01:43 DEBUG config-changed TASK [Deny all other requests on 9200] *****************************************
2018-02-09 12:01:43 DEBUG config-changed skipping: [localhost]
2018-02-09 12:01:43 DEBUG config-changed
2018-02-09 12:01:43 DEBUG config-changed TASK [Open the firewall for all peers] *****************************************
2018-02-09 12:01:43 DEBUG config-changed skipping: [localhost] => (item=relations["peer"])
2018-02-09 12:01:43 DEBUG config-changed
2018-02-09 12:01:43 DEBUG config-changed TASK [Record current cluster health] *******************************************
2018-02-09 12:01:43 DEBUG config-changed skipping: [localhost]
2018-02-09 12:01:43 DEBUG config-changed
2018-02-09 12:01:43 DEBUG config-changed TASK [Deny all incoming requests on 9300 once unit is part of cluster] *********
2018-02-09 12:01:43 DEBUG config-changed skipping: [localhost]
2018-02-09 12:01:43 DEBUG config-changed
2018-02-09 12:01:43 DEBUG config-changed TASK [Update elasticsearch.yml] ************************************************
2018-02-09 12:01:44 DEBUG config-changed fatal: [localhost]: FAILED! => {"changed": true, "failed": true, "msg": "Source /root/.ansible/tmp/ansible-tmp-1518177703.87-171782118040759/source not found"}
2018-02-09 12:01:44 DEBUG config-changed to retry, use: --limit @/var/lib/juju/agents/unit-elasticsearch-0/charm/playbook.retry
2018-02-09 12:01:44 DEBUG config-changed
2018-02-09 12:01:44 DEBUG config-changed PLAY RECAP *********************************************************************
2018-02-09 12:01:44 DEBUG config-changed localhost : ok=5 changed=1 unreachable=0 failed=1
2018-02-09 12:01:44 DEBUG config-changed
2018-02-09 12:01:44 DEBUG config-changed Traceback (most recent call last):
2018-02-09 12:01:44 DEBUG config-changed File "/var/lib/juju/agents/unit-elasticsearch-0/charm/hooks/config-changed", line 107, in <module>
2018-02-09 12:01:44 DEBUG config-changed hooks.execute(sys.argv)
2018-02-09 12:01:44 DEBUG config-changed File "/var/lib/juju/agents/unit-elasticsearch-0/charm/hooks/charmhelpers/contrib/ansible/__init__.py", line 229, in execute
2018-02-09 12:01:44 DEBUG config-changed self.playbook_path, tags=[hook_name], extra_vars=extra_vars)
2018-02-09 12:01:44 DEBUG config-changed File "/var/lib/juju/agents/unit-elasticsearch-0/charm/hooks/charmhelpers/contrib/ansible/__init__.py", line 161, in apply_playbook
2018-02-09 12:01:44 DEBUG config-changed subprocess.check_call(call, env=env)
2018-02-09 12:01:44 DEBUG config-changed File "/usr/lib/python3.6/subprocess.py", line 291, in check_call
2018-02-09 12:01:44 DEBUG config-changed raise CalledProcessError(retcode, cmd)
2018-02-09 12:01:44 DEBUG config-changed subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'playbook.yaml', '--tags', 'config-changed']' returned non-zero exit status 2.
2018-02-09 12:01:44 ERROR juju.worker.uniter.operation runhook.go:107 hook "config-changed" failed: exit status 1
Ansible version changed from 2.0 to 2.5 and there is several changes in newer version. The default config of remote_tmp changed from " $HOME/.ansible/tmp" to "~/.ansible/tmp". In my opinion it's better that the charmhelper library handle this parameter to avoid any problem related to this in newer versions. I will submit a patch to charmhelpers shortly.