rvm / rvm1-ansible

The official ansible RVM role to install and manage your Ruby versions.
MIT License
271 stars 136 forks source link

Fails on CentOS 7 #13

Closed jdart closed 10 years ago

jdart commented 10 years ago

Hi developer,

I'm getting errors when running this against centos 7.

"No Package matching 'python-httplib2' found available, installed or updated"

The best way may be having pip install it, but pip isn't available as a package and it's installation would require several steps.

Thanks, Jonathan

jdart commented 10 years ago

A command that could work: curl https://bootstrap.pypa.io/get-pip.py | python - ; pip install httplib2

Or just use the first half of the above to install pip and then use the core ansible "pip" module to install httplib2.

nickjj commented 10 years ago

I don't use centos/redhat, but that's interesting. It seems to exist on centos 6 and redhat 7 but you're right, it's not available on centos 7.

Installing pip should work but it seems unreasonable to install pip just for this package.

The dependency on that package is due to the usage of the uri module. I'm only using it on this task:

- name: Detect stable rvm version
  uri:
    url: '{{ rvm1_rvm_stable_version_number }}'
    return_content: True
  register: rvm_stable_version_number
  when: '"://" in rvm1_rvm_stable_version_number'

It may be worth just dropping that module and use curl directly with a bit of manual checks to make it idempotent. I'll address this in the very near future.

jdart commented 10 years ago

Fwiw the python package is available from: epel http://dl.fedoraproject.org/pub/epel/7/x86_64/repoview/letter_p.group.html which could be added as a yum repo.

jdart commented 10 years ago

If anyone is having the same issue, here's what I did as a stop gap while waiting for the next version.

Change tasks/redhat.yml to the below:

---

- name: RedHat/CentOS - Install pip
  command: bash -c "curl https://bootstrap.pypa.io/get-pip.py | python -"
  sudo: yes

- name: Install httplib2
  pip: name=httplib2
nickjj commented 10 years ago

@jdart, I just pushed v.1.3.0 which contains an alternative work around, let me know how it goes. If for some reason it still does not work on CentOS 7 then please open a new ticket.

You can view the changes here: https://github.com/rvm/rvm1-ansible/releases/tag/v1.3.0

And it's available on the Galaxy as well: https://galaxy.ansible.com/list#/roles/1087

Thanks for the report.

jdart commented 10 years ago

Works great, thanks! On Oct 16, 2014 9:37 AM, "Nick Janetakis" notifications@github.com wrote:

Closed #13 https://github.com/rvm/rvm1-ansible/issues/13.

— Reply to this email directly or view it on GitHub https://github.com/rvm/rvm1-ansible/issues/13#event-179466424.