| |
@@ -58,12 +58,6 @@
|
| |
- python3-virtualenv
|
| |
state: present
|
| |
|
| |
- - name: register the libgit2 version installed
|
| |
- shell: rpm -q libgit2|cut -d \- -f 2| cut -d \. -f 1,2
|
| |
- register: libgit2_version
|
| |
- args:
|
| |
- warn: false
|
| |
-
|
| |
# Add various helpful configuration files
|
| |
- name: Install a custom bashrc
|
| |
become_user: "{{ ansible_env.SUDO_USER }}"
|
| |
@@ -84,6 +78,12 @@
|
| |
become_user: "{{ ansible_env.SUDO_USER }}"
|
| |
copy: src=bash_history dest=/home/{{ ansible_env.SUDO_USER }}/.bash_history
|
| |
|
| |
+ - name: register the libgit2 version installed
|
| |
+ shell: rpm -q libgit2|cut -d \- -f 2| cut -d \. -f 1,2
|
| |
+ register: libgit2_version
|
| |
+ args:
|
| |
+ warn: false
|
| |
+
|
| |
# Install Pagure inside a virtualenv and configure it
|
| |
- name: Install pygit2 in the virtualenv
|
| |
become_user: "{{ ansible_env.SUDO_USER }}"
|
| |
@@ -94,37 +94,27 @@
|
| |
virtualenv_python: python3
|
| |
virtualenv_command: virtualenv
|
| |
|
| |
- # Install Pagure inside a virtualenv and configure it for python3
|
| |
- - name: Install pygit2 in the python3 virtualenv
|
| |
- become_user: "{{ ansible_env.SUDO_USER }}"
|
| |
- pip:
|
| |
- name:
|
| |
- - "pygit2=={{ libgit2_version.stdout_lines[0] }}.*"
|
| |
- virtualenv: /home/{{ ansible_env.SUDO_USER }}/.virtualenvs/python3-pagure/
|
| |
- virtualenv_python: python3
|
| |
-
|
| |
- name: Install Pagure Python dependencies into a virtualenv
|
| |
become_user: "{{ ansible_env.SUDO_USER }}"
|
| |
pip:
|
| |
requirements: /home/{{ ansible_env.SUDO_USER }}/devel/{{ item }}
|
| |
virtualenv: /home/{{ ansible_env.SUDO_USER }}/.virtualenvs/python3-pagure/
|
| |
virtualenv_command: virtualenv
|
| |
- with_items:
|
| |
- - "requirements.txt"
|
| |
- - "requirements-ev.txt"
|
| |
- - "requirements-testing.txt"
|
| |
-
|
| |
- - name: Install Pagure Python dependencies into a python3 virtualenv
|
| |
- become_user: "{{ ansible_env.SUDO_USER }}"
|
| |
- pip:
|
| |
- requirements: /home/{{ ansible_env.SUDO_USER }}/devel/{{ item }}
|
| |
- virtualenv: /home/{{ ansible_env.SUDO_USER }}/.virtualenvs/python3-pagure/
|
| |
virtualenv_python: python3
|
| |
+ virtualenv_site_packages: yes
|
| |
+ extra_args: --no-use-pep517
|
| |
with_items:
|
| |
- "requirements.txt"
|
| |
- "requirements-ev.txt"
|
| |
- "requirements-testing.txt"
|
| |
|
| |
+ - name: Hotfix python-fedora to make flask_fas_openid compatible with flask >= 1.0
|
| |
+ become: "{{ ansible_env.SUDO_USER }}"
|
| |
+ lineinfile:
|
| |
+ path: /home/{{ ansible_env.SUDO_USER }}/.virtualenvs/python3-pagure/lib/python3.7/site-packages/flask_fas_openid.py
|
| |
+ regexp: '^ if assume_recent or \(major >'
|
| |
+ line: ' if assume_recent or (major > 0 or minor >= 10):'
|
| |
+
|
| |
- name: Install Pagure package into a virtualenv
|
| |
become_user: "{{ ansible_env.SUDO_USER }}"
|
| |
pip:
|
| |
@@ -206,12 +196,13 @@
|
| |
- pagure_webhook.service
|
| |
- pagure_worker.service
|
| |
|
| |
- - name: Enable the Pagure systemd services
|
| |
+ - name: Enable and start the Pagure systemd services
|
| |
become: False
|
| |
systemd:
|
| |
daemon_reload: yes
|
| |
name: "{{ item }}"
|
| |
enabled: True
|
| |
+ state: started
|
| |
scope: user
|
| |
with_items:
|
| |
- pagure
|
| |
Why this is moved?