Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ python_dependencies:
- python-dev
- tk-dev
- zlib1g-dev

# Needed to get around restrictive umask on CIS-supplied images. Setting to Ubuntu default of 0022.
python_pip_umask: '0022'
6 changes: 3 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
when: pip_installed.stat.exists == false

- name: Upgrade pip
pip: name=pip state=latest executable="{{python_pip_path}}"
pip: name=pip state=latest executable="{{python_pip_path}}" umask="{{python_pip_umask}}"

- name: Add system pip.conf
template:
Expand All @@ -36,9 +36,9 @@

# Install packages
- name: Install/upgrade virtualenv
pip: name=virtualenv state=latest executable="{{python_pip_path}}"
pip: name=virtualenv state=latest executable="{{python_pip_path}}" umask="{{python_pip_umask}}"
when: python_major_version == '2'

- name: Install global packages
pip: name="{{item}}" state=present executable="{{python_pip_path}}"
pip: name="{{item}}" state=present executable="{{python_pip_path}}" umask="{{python_pip_umask}}"
with_items: "{{python_global_packages}}"