| |
@@ -10,11 +10,11 @@
|
| |
with_items:
|
| |
- npm
|
| |
- redis
|
| |
- - mongodb-server
|
| |
- fedmsg-hub
|
| |
- fedmsg-relay
|
| |
- python3-virtualenv
|
| |
- python3-flask-oidc
|
| |
+ - python3-moksha-common
|
| |
- postfix
|
| |
|
| |
- name: Install the distribution versions of requirements.txt
|
| |
@@ -39,6 +39,7 @@
|
| |
- python3-pygments
|
| |
- python3-pygments-markdown-lexer
|
| |
- python3-retask
|
| |
+ - python3-twisted
|
| |
|
| |
|
| |
# Create directory structure
|
| |
@@ -59,6 +60,7 @@
|
| |
|
| |
# Set up the Python development environment
|
| |
- name: Install Fedora Hubs requirements.txt into hubs virtualenv
|
| |
+ become: true
|
| |
become_user: "{{ main_user }}"
|
| |
pip:
|
| |
requirements: "{{ hubs_code_dir }}/requirements.txt"
|
| |
@@ -67,6 +69,7 @@
|
| |
virtualenv_command: virtualenv-3
|
| |
|
| |
- name: Install Fedora Hubs test-requirements.txt into hubs virtualenv
|
| |
+ become: true
|
| |
become_user: "{{ main_user }}"
|
| |
pip:
|
| |
requirements: "{{ hubs_code_dir }}/test-requirements.txt"
|
| |
@@ -75,6 +78,7 @@
|
| |
virtualenv_command: virtualenv-3
|
| |
|
| |
- name: Install other packages into hubs virtualenv
|
| |
+ become: true
|
| |
become_user: "{{ main_user }}"
|
| |
pip:
|
| |
name: "{{ item }}"
|
| |
@@ -85,12 +89,14 @@
|
| |
- bleach
|
| |
|
| |
- name: Install Fedora Hubs into the virtualenv
|
| |
+ become: true
|
| |
become_user: "{{ main_user }}"
|
| |
command: "{{ hubs_venv_dir }}/bin/pip install -e {{ hubs_code_dir }}"
|
| |
args:
|
| |
- creates: "{{ hubs_venv_dir }}/lib/python3.5/site-packages/fedora-hubs.egg-link"
|
| |
+ creates: "{{ hubs_venv_dir }}/lib/python3.6/site-packages/fedora-hubs.egg-link"
|
| |
|
| |
- name: Set bin file context in the virtualenv
|
| |
+ become: true
|
| |
become_user: "{{ main_user }}"
|
| |
file:
|
| |
path: "{{ hubs_venv_dir }}/bin"
|
| |
@@ -105,6 +111,7 @@
|
| |
with_first_found:
|
| |
- hubs_config.{{ ansible_hostname }}
|
| |
- hubs_config
|
| |
+ become: true
|
| |
become_user: "{{ main_user }}"
|
| |
notify: "hubs configuration change"
|
| |
|
| |
@@ -117,18 +124,12 @@
|
| |
- fedmsg_config
|
| |
notify: "hubs configuration change"
|
| |
|
| |
- - name: Link to the FAS credentials file if any
|
| |
- file:
|
| |
- state: link
|
| |
- path: "/etc/fedmsg.d/fas_credentials.py"
|
| |
- src: "{{ hubs_code_dir }}/fedmsg.d/fas_credentials.py"
|
| |
- notify: "hubs configuration change"
|
| |
-
|
| |
- name: Configure application to authenticate with iddev.fedorainfracloud.org
|
| |
command:
|
| |
oidc-register
|
| |
--output-file {{ hubs_conf_dir }}/client_secrets.json
|
| |
https://iddev.fedorainfracloud.org/ {{ hubs_url }}
|
| |
+ become: true
|
| |
become_user: "{{ main_user }}"
|
| |
args:
|
| |
creates: "{{ hubs_conf_dir }}/client_secrets.json"
|
| |
@@ -138,7 +139,6 @@
|
| |
service: name={{ item }} state=started enabled=yes
|
| |
with_items:
|
| |
- redis
|
| |
- - mongod
|
| |
- postfix
|
| |
|
| |
# Set up, create, and populate the database.
|
| |
@@ -148,6 +148,7 @@
|
| |
# Set up JavaScript requirements
|
| |
- name: Install npm packages
|
| |
command: npm install
|
| |
+ become: true
|
| |
become_user: "{{ main_user }}"
|
| |
args:
|
| |
creates: node_modules
|
| |
@@ -155,6 +156,7 @@
|
| |
|
| |
- name: Build JavaScript assets
|
| |
command: npm run build
|
| |
+ become: true
|
| |
become_user: "{{ main_user }}"
|
| |
args:
|
| |
chdir: "{{ hubs_code_dir }}/hubs/static/client"
|
| |
@@ -166,7 +168,6 @@
|
| |
service: name={{ item }} state=stopped enabled=no
|
| |
with_items:
|
| |
- fedmsg-hub
|
| |
- - fedmsg-relay
|
| |
|
| |
|
| |
# Include mode-specific tasks
|
| |
A couple tweaks to bring the ansible role more in line with what we have in the infra.