Skip to content
This repository has been archived by the owner on Jun 4, 2021. It is now read-only.

Arch linux: Invalid Syntax Error #299

Closed
obilodeau opened this issue May 26, 2016 · 4 comments
Closed

Arch linux: Invalid Syntax Error #299

obilodeau opened this issue May 26, 2016 · 4 comments

Comments

@obilodeau
Copy link

Local inventory file should have the following on Arch because /usr/bin/python defaults to python3:

[localhost]
127.0.0.1 ansible_python_interpreter=python2

I don't think the README suggestion done in #30 is sufficient since I knew I had python2 installed but streisand still didn't work.

I think that changing the default value of ansible_python_interpreter to python2 would be acceptable since it has been available that way for a while now but I don't know what's the story for OS X so I didn't create a pull request.

@jlund
Copy link
Member

jlund commented Jun 1, 2016

Yeah, that suggestion would work for Ubuntu as well, but I don't know if python2 means anything on OS X.

@CorbanR Can you check to see if OS X ships with a python2 command?

@CorbanR
Copy link
Collaborator

CorbanR commented Jun 1, 2016

OSX has /usr/bin/python2.7(The only exception is if you override the local install with brew)

so

[localhost] 127.0.0.1 ansible_python_interpreter=python2 would not work as a default.

I wonder if we could add something to the striesand wrapper to detect OSX and dynamically set the proper ansible_python_interpreter=<python_version> local variable based on that?

@obilodeau
Copy link
Author

Actually anything that would make the error more obvious that it is an
interpreter version issue would be already an improvement.

On Tue, May 31, 2016, 11:29 PM Corban R. [email protected] wrote:

OSX has /usr/bin/python2.7(The only exception is if you override the
local install with brew)

so

127.0.0.1 ansible_python_interpreter=python2``` would not work as a default.

I wonder if we could add something to the striesand wrapper to detect OSX and dynamically set the proper ansible_python_interpreter=python2 local variable based on that?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#299 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAhWFaVZ6Sp8jC9CBQyU5BfIBuKMLfQUks5qHPt9gaJpZM4InzOC
.

@cpu
Copy link
Collaborator

cpu commented Jun 16, 2017

The ./streisand wrapper correctly sets the ansible_python_interpreter based on the system. I'm going to close this issue since it works as-expected on my Arch machine. Thanks!

@cpu cpu closed this as completed Jun 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants