Skip to content
Snippets Groups Projects
Unverified Commit 1dc805fd authored by Thomas F. Duellmann's avatar Thomas F. Duellmann Committed by GitHub
Browse files

Fix for issue when --user flag for pip was added inside a virtual environment (#87)

parent 9878e10d
No related branches found
No related tags found
No related merge requests found
......@@ -2,27 +2,37 @@
- name: configure AWS
hosts: localhost
gather_facts: false
vars:
virtualenv_path: "{{ lookup('env', 'VIRTUAL_ENV') }}"
pip_args: '--user'
tasks:
- name: prepare environment flags if run in virtualenv
set_fact:
pip_args: ''
when: virtualenv_path | length > 0
- name: install awscli
pip:
name: awscli
state: present
extra_args: --user
extra_args: "{{ pip_args }}"
- name: install boto
pip:
name: boto
state: present
extra_args: --user
extra_args: "{{ pip_args }}"
- name: install boto3
pip:
name: boto3
state: present
extra_args: --user
extra_args: "{{ pip_args }}"
- name: install botocore
pip:
name: botocore
state: present
extra_args: --user
extra_args: "{{ pip_args }}"
- name: Create global AWS role
iam_role:
name: global-serverless-role
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment