Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ Dependencies

None

Example Usage
-------------

The following initial steps will download this current ansible role,
configure a default playbook, and run. These steps require the
installation of ansible on your system.

$ git clone https://github.com/dhellmann/ansible-python-dev.git
$ cp ansible-python-dev/ansible.yml.example ansible.yml
# Adjust ansible.yml if you would like to install on a different server
$ ansible-playbook ansible.yml

Example Playbook
----------------

Expand All @@ -49,4 +61,4 @@ BSD
Author Information
------------------

Doug Hellmann
Doug Hellmann
4 changes: 4 additions & 0 deletions ansible.yml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
- hosts: localhost
roles:
- ansible-python-dev
1 change: 1 addition & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
- python_dev_versions
- [ 'wheel', 'certifi', 'pyopenssl', 'pyasn1', 'ndg-httpsclient' ]

- include: setuptools.yml
- name: Install Python tools
pip: name={{ item }}
sudo: true
Expand Down
5 changes: 4 additions & 1 deletion tasks/pip.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
---
- name: Remove system package for pip
apt: name=python-pip state=absent
sudo: yes
apt: name={{ item }} state=absent
with_items:
- python-pip
- python-pip-whl
- name: Download ez_setup.py
get_url: url=https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py dest=/tmp/ez_setup.py mode=0755
- name: Download get-pip.py
Expand Down
13 changes: 13 additions & 0 deletions tasks/setuptools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- name: Remove system packages for python utilities
sudo: yes
apt: name={{ item }} state=absent
with_items:
- python-setuptools
- python3-setuptools
- python-setuptools-whl
- python-pkg-resources
- python3-pkg-resources
- python-virtualenv
- python-tox
- python-chardet-whl

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chardet is an unexpected one to have in this list. Is it used by one or more of these others?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove this. It is actually installed with either python-tox or python-virtualenv (and is not used if you then remove these packages. However there is a much longer list. e.g.

$ sudo apt-get install python-virtualenv
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
python-chardet-whl python-colorama python-colorama-whl python-distlib
python-distlib-whl python-html5lib python-html5lib-whl python-pip
python-pip-whl python-requests-whl python-setuptools python-setuptools-whl
python-six-whl python-urllib3-whl python-wheel python3-pkg-resources

There is a apt-get autoremove function that will remove unwanted packages, but I feel that is best left for a user to run.