Merge ~aym-frikha/charm-helpers:Ansible-bug-1748433 into charm-helpers:master

Proposed by Aymen Frikha
Status: Needs review
Proposed branch: ~aym-frikha/charm-helpers:Ansible-bug-1748433
Merge into: charm-helpers:master
Diff against target: 13 lines (+1/-1)
1 file modified
charmhelpers/contrib/ansible/__init__.py (+1/-1)
Reviewer Review Type Date Requested Status
Kevin W Monroe (community) Disapprove
VCS imports Pending
Review via email: mp+345474@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

Per the following thread, charm-helpers source has moved to github:

https://lists.ubuntu.com/archives/juju/2017-September/009496.html

While the source is mirrored here on launchpad, pull requests should be made against the upstream repo here:

https://github.com/juju/charm-helpers

With that said, I'm not seeing the difference between "$HOME/.ansible/tmp" and "~/.ansible/tmp". If forcing this to "/root/..." is indeed necessary, please help me understand why in an issue/PR at the above repository.

Thanks!

review: Disapprove
Revision history for this message
Aymen Frikha (aym-frikha) wrote :

Kevin, please take a look at : https://github.com/juju/charm-helpers/pull/181

Unmerged commits

fb281c1... by Aymen Frikha

LP:#1748433
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".
We need to handle variable "ansible_remote_tmp" variable explicitly to avoid any problem
in newer versions.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/charmhelpers/contrib/ansible/__init__.py b/charmhelpers/contrib/ansible/__init__.py
2index f3617db..5281946 100644
3--- a/charmhelpers/contrib/ansible/__init__.py
4+++ b/charmhelpers/contrib/ansible/__init__.py
5@@ -134,7 +134,7 @@ def install_ansible_support(from_ppa=True, ppa_location='ppa:rquillo/ansible'):
6 charmhelpers.fetch.apt_update(fatal=True)
7 charmhelpers.fetch.apt_install('ansible')
8 with open(ansible_hosts_path, 'w+') as hosts_file:
9- hosts_file.write('localhost ansible_connection=local')
10+ hosts_file.write('localhost ansible_connection=local ansible_remote_tmp=/root/.ansible/tmp')
11
12
13 def apply_playbook(playbook, tags=None, extra_vars=None):

Subscribers

People subscribed via source and target branches

to all changes: