I am on Centos 7 and I was trying to install Pyrax and seeing these errors:
ERROR: os-service-types 1.7.0 has requirement pbr!=2.1.0,>=2.0.0, but you’ll have pbr 1.10.0 which is incompatible.
ERROR: python-keystoneclient 3.22.0 has requirement pbr!=2.1.0,>=2.0.0, but you’ll have pbr 1.10.0 which is incompatible.
ERROR: python-keystoneclient 3.22.0 has requirement requests>=2.14.2, but you’ll have requests 2.6.0 which is incompatible.
ERROR: oslo-config 6.12.0 has requirement requests>=2.18.0, but you’ll have requests 2.6.0 which is incompatible.
ERROR: stevedore 1.31.0 has requirement pbr!=2.1.0,>=2.0.0, but you’ll have pbr 1.10.0 which is incompatible.
So, I Installed Python 3.6 and ran pip3 install pyrax and success! The problem seems to be that ansible-playbook is still looking at Python 2.7 which does NOT have the pyrax module installed because I am seeing this:
TASK [Database build request] ****************************************************************************************************************************
fatal: [devdb → localhost]: FAILED! => {“changed”: false, “msg”: “pyrax is required for this module”}
How can I tell Ansible to NOT use Python 2.7 and only use 3.6 and its modules?
I am on Centos 7 and I was trying to install Pyrax and seeing these errors:
ERROR: os-service-types 1.7.0 has requirement pbr!=2.1.0,>=2.0.0, but you'll have pbr 1.10.0 which is incompatible.
ERROR: python-keystoneclient 3.22.0 has requirement pbr!=2.1.0,>=2.0.0, but you'll have pbr 1.10.0 which is incompatible.
ERROR: python-keystoneclient 3.22.0 has requirement requests>=2.14.2, but you'll have requests 2.6.0 which is incompatible.
ERROR: oslo-config 6.12.0 has requirement requests>=2.18.0, but you'll have requests 2.6.0 which is incompatible.
ERROR: stevedore 1.31.0 has requirement pbr!=2.1.0,>=2.0.0, but you'll have pbr 1.10.0 which is incompatible.
So, I Installed Python 3.6 and ran pip3 install pyrax and success! The problem seems to be that ansible-playbook is
still looking at Python 2.7 which does NOT have the pyrax module installed because I am seeing this:
TASK [Database build request]
****************************************************************************************************************************
fatal: [devdb -> localhost]: FAILED! => {"changed": false, "msg": "pyrax is required for this module"}
How can I tell Ansible to NOT use Python 2.7 and only use 3.6 and its modules?
Set the following variable to the path of your Python binary:
Thank you for the quick response. My apologies for hijacking the loop, this my first email will make a new Subject line going forward.
Coming back to my issue, yes I was successfully clone in my target machine where ansible is installed . But when I target same location with following line in ansible playbook, it’s prompting me password
You may be missing the point of Stefan’s question. Is Ansible executing this git command as the SAME USER that you are executing the git command as, when you execute the command manually?
Authentication for git is user-based. If Ansible is not running the command as the SAME USER that you are using when you run the command manually, then you can expect authentication to fail. By the way, the user that Ansible is running git as is NOT necessarily the user that is running Ansible.
A quick look at the Ansible docs reveals a git_config module. You could try using it to retrieve the global git configuration (the equivalent of running git config --global -l) via Ansible on the target host. Does the output match what you get when you execute that command manually on the target host? If not, you have found the problem.
Hello Rake,
Yes, we do, however, cloning the repo in the same target did not prompt me for the password, but it did when running playbook container repo details. I guess following might help
- name: Get updated files from git repository
git:
repo: "https://{{ githubuser | urlencode }}:{{ githubpassword }}@[github.com/privrepo.git](http://github.com/privrepo.git)"
dest: /tmp
Seriously - the single most likely reason for what you are seeing is that the users are different. Not the githubuser - the user that is executing the git command. So prove to yourself that they are in fact the same, e.g. by setting a variable in the global config for the user you think is being used, then using the git_config module to display the values being used by Ansible…
Hello Rake,
Yes, we do, however, cloning the repo in the same target did not prompt me for the password, but it did when running
playbook container repo details. I guess following might help
>- name: Get updated files from git repository git: repo: "https://{{ githubuser | urlencode }}:{{ githubpassword
}}@github.com/privrepo.git <http://github.com/privrepo.git>" dest: /tmp|
OK, but what is the mechanism which enables you to bypass the password when you clone manually (under the assumption
that you need the password for private repositories as opposed to public ones).