-
-
Notifications
You must be signed in to change notification settings - Fork 641
[Arch] SyntaxError during task 'Check if local known_hosts file is present.' #530
Comments
Haven't tried specifically with Arch before... but one quick question: what version of Ansible is installed? ( |
Thanks for the quick reply. The installed Ansible version is 2.0.1.0 |
Hmm does sound like a python2 vs python3 issue. I also found this comment about virtualenv StreisandEffect/streisand#30 (comment). |
Thanks for your reply and the helpful link. Based on your link I've been trying to get it working by either providing a local
I tried running
I also tried to add a parameter to the ---
ansible_python_interpreter=/usr/bin/python2 How can I check btw which Python interpreter Ansible is using? Unfortunately I can't get it to work with any of the options specified above. The same error keeps occuring. I hope my description above provides enough information. If not, don't hesitate to ask :) |
Could you try putting it in the Vagrantfile and see what happens. diff --git a/Vagrantfile b/Vagrantfile
index 9ef14ab..19defa0 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -109,6 +109,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
if which('ansible-playbook')
config.vm.provision 'ansible' do |ansible|
ansible.playbook = "#{dir}/provisioning/playbook.yml"
+ ansible.extra_vars = { 'ansible_python_interpreter': '/usr/bin/env python2' }
end
else
config.vm.provision 'shell' do |sh| By setting this to python3 I get your exact error message at least. |
Awesome! That works. Thanks a lot @oxyc !! Can we incorporate this by default into DrupalVM? Or, if it affects other hosts in a bad way, perhaps a mention in the docs somewhere? |
@geerlingguy is the ansible expert, what do you think? I don't see a problem with adding it as a a default. Guess there might be a few cases where people do have python referencing python3. The local provisioners would never need it right? Edit: Unfortunately you can't fix this with |
@sidneygijzen I think I found a very easy fix. Just add it to your ansible_python_interpreter: "/usr/bin/env python2" Could you verify that this works? |
Fixes #530: Add docs for arch linux where python 3 is the default
@oxyc Neat! That works as well. Thank you! |
Hello,
I've been running Drupal VM (also) on a Arch Linux host for the past 8 months without any problems. To be able to make use of all the shiny new features in the latest releases, I'm currently upgrading Drupal VM from a master branch version from September ' 15 to the current master branch version.
Before starting the upgrade, I took all changed variables mentioned in the various release notes (such as updating the Apache Ansible Galaxy role & updating Apache vhost configs) into account.
After that I re-ran the provisioning of my Drupal VM box (default Drupal VM Ubuntu 14.04 box). Everything went well except for one of the last tasks, 'Check if local known_hosts file is present.' , which generates into the following error:
In order to resolve this I tried the following:
I have the feeling my Arch host, an interplay between Arch & Ansible is the cause (or maybe the format of the known_hosts file?), since I did the same upgrade of Drupal VM on a Ubuntu 15.10 host yesterday, and that went flawlessly.
I thought to post my question here to see if someone else has stumbled into this error? Are there any issues known with Drupal VM or Ansible on a Arch host?
Thank you in advance!
The text was updated successfully, but these errors were encountered: