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
6 changes: 2 additions & 4 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ galaxy_info:
company: SinglePlatform (http://www.singleplatform.com/)
license: BSD 3-Clause

min_ansible_version: 2.1
min_ansible_version: 2.2
platforms:
- name: Ubuntu
versions:
Expand All @@ -14,6 +14,4 @@ galaxy_info:
- all

galaxy_tags:
- security
- logrhythm
- logging
- python
2 changes: 1 addition & 1 deletion tasks/build_source.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

- name: Install dependencies
apt: name="{{item}}" state=latest update_cache=yes cache_valid_time=86400
apt: name="{{item}}" update_cache=yes cache_valid_time=86400
with_items: "{{python_dependencies}}"

- name: Download python tarball
Expand Down
8 changes: 5 additions & 3 deletions tasks/install_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@
apt: name={{python_package_name}} update_cache=yes cache_valid_time=86400

- name: Get python version
shell: "apt-cache show {{python_package_name}} | grep 'Version:' | awk '{print $2}'"
shell: "apt-cache show {{python_package_name}} | grep 'Version:' | awk '{print $2}' | cut -d. -f1"
check_mode: no
register: python_version_output

- name: Set python_major_version
set_fact:
python_major_version: "{{python_version_output.stdout_lines[0][0]}}"
python_major_version: "{{python_version_output.stdout}}"

- name: Get python location
command: "which python{{python_major_version}}"
check_mode: no
register: python_location_output

- name: Set python_path
set_fact:
python_path: "{{python_location_output.stdout_lines[0]}}"
python_path: "{{python_location_output.stdout}}"
7 changes: 2 additions & 5 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
include: install_pip.yml
when: pip_installed.stat.exists == false

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

- name: Add system pip.conf
template:
src: pip.conf.j2
Expand All @@ -35,8 +32,8 @@
when: python_pip_config is defined

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

- name: Install global packages
Expand Down