Don't hardcode the python version
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
8fb52e6dd4
commit
e882eca30b
1 changed files with 14 additions and 1 deletions
|
@ -94,10 +94,23 @@
|
||||||
- bodhi
|
- bodhi
|
||||||
- cron
|
- cron
|
||||||
|
|
||||||
|
- name: Determine Python version
|
||||||
|
command:
|
||||||
|
argv:
|
||||||
|
- python3
|
||||||
|
- -c
|
||||||
|
- "from sys import version_info as vi; print(f'{vi[0]}.{vi[1]}')"
|
||||||
|
register: _python3_version_result
|
||||||
|
changed_when: False
|
||||||
|
|
||||||
|
- name: Set Python version fact
|
||||||
|
set_fact:
|
||||||
|
py3ver: "{{ _python3_version_result.stdout | trim }}"
|
||||||
|
|
||||||
- name: put the koji sync listener script in place
|
- name: put the koji sync listener script in place
|
||||||
copy:
|
copy:
|
||||||
src: koji_sync_listener.py
|
src: koji_sync_listener.py
|
||||||
dest: /usr/lib/python3.9/site-packages/koji_sync_listener.py
|
dest: /usr/lib/python{{ py3ver }}/site-packages/koji_sync_listener.py
|
||||||
mode: 0644
|
mode: 0644
|
||||||
when: env == "production"
|
when: env == "production"
|
||||||
tags:
|
tags:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue