Created
December 25, 2015 08:40
-
-
Save alces/7c67e69474bba1216e35 to your computer and use it in GitHub Desktop.
Ansible playbook demonstrating easy_install, pip, and yum working via HTTP proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ansible-playbook | |
--- | |
- name: test how easy_install, pip, and yum modules works via proxy | |
hosts: all | |
environment: | |
http_proxy: http://192.168.1.10:3128 | |
https_proxy: http://192.168.1.10:3128 | |
tasks: | |
- name: Install easy_install | |
yum: | |
name: python-setuptools | |
- name: Install virtualenv | |
easy_install: | |
name: virtualenv | |
- name: Install fabric binary dependencies | |
yum: | |
name: "{{ item }}" | |
with_items: | |
- gcc | |
- make | |
- python-devel | |
- name: install a package into virtualenv | |
pip: | |
name: fabric | |
virtualenv: /opt/python-env/test01 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice - thanks a lot!