Skip to content

Commit

Permalink
Merge pull request #670 from ministryofjustice/onr/DSOS-2682/add-rhel…
Browse files Browse the repository at this point in the history
…-6-requirements-constraints

Onr/dsos 2682/add rhel 6 requirements constraints
  • Loading branch information
robertsweetman authored Apr 5, 2024
2 parents 25398d4 + c1ef5d1 commit 50d3a85
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions ansible/constraints.rhel6.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cryptography==2.3
10 changes: 8 additions & 2 deletions ansible/roles/ansible-requirements/tasks/pip.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
---
- name: Install specified python requirements
ansible.builtin.copy:
src: "{{ role_path }}/../../requirements.txt"
dest: "~/.ansible-configuration-management-requirements.txt"
src: "{{ role_path }}/../../{{ item }}"
dest: "~/.ansible-configuration-management-{{ item }}"
loop:
- requirements.txt
- constraints.rhel6.txt

- name: Install specified python requirements using given python interpreter
ansible.builtin.pip:
executable: "{{ ansible_python_interpreter | regex_replace('python', 'pip') }}"
requirements: "~/.ansible-configuration-management-requirements.txt"
extra_args: "{{ pip_extra_args }}"
vars:
pip_extra_args: "{% if '3.6' in ansible_python_interpreter %}-c ~/.ansible-configuration-management-constraints.rhel6.txt{% endif %}"
when: ansible_python_interpreter is defined

- name: Install specified python requirements using default pip
Expand Down

0 comments on commit 50d3a85

Please sign in to comment.