upgrade Ruby version

This commit is contained in:
Max Erenberg 2021-05-12 22:20:43 +00:00 committed by root
parent 578fe92f16
commit 5e7365785d
1 changed files with 12 additions and 9 deletions

View File

@ -2,7 +2,9 @@
- hosts: 127.0.0.1
connection: local
vars:
bundle: /opt/greenlight/.gem/ruby/2.5.0/bin/bundle
ruby_version: 2.7.0
gem: gem2.7
bundle: "/opt/greenlight/.gem/ruby/{{ ruby_version }}/bin/bundle"
tasks:
- name: add PPA for bigbluebutton support packages
apt_repository:
@ -25,7 +27,7 @@
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
- name: add repo for Nodesource
apt_repository:
repo: deb https://deb.nodesource.com/node_8.x xenial main
repo: deb https://deb.nodesource.com/node_14.x xenial main
filename: nodesource
- name: add GPG key for bigbluebutton
apt_key:
@ -66,7 +68,7 @@
state: latest
- name: install nodejs
apt:
# consider apt pinning this to version 8
# consider apt pinning this
name: nodejs
state: latest
- name: install bigbluebutton
@ -77,10 +79,6 @@
apt:
name: bbb-html5
state: latest
- name: install ruby2.5
apt:
name: ruby2.5
state: latest
- name: install greenlight
apt:
name: greenlight
@ -210,7 +208,7 @@
- name: install bundler for greenlight
become: yes
become_user: greenlight
command: gem install --user-install bundler
command: '{{ gem }} install --user-install bundler'
args:
creates: '{{ bundle }}'
- name: configure NGINX to route to Greenlight
@ -223,6 +221,11 @@
shell: '{{ bundle }} exec rake secret | tee /opt/greenlight/rake_secret'
args:
creates: /opt/greenlight/rake_secret
register: rake_secret
- name: assert rake secret was created
assert:
that:
- rake_secret.stdout != ''
- name: obtain BBB API secret
shell: "bbb-conf --secret | grep -oP 'Secret: \\K[[:alnum:]]+'"
register: api_secret
@ -239,7 +242,7 @@
regexp: '^{{ item.key }}=.*$'
replace: '{{ item.key }}={{ item.value }}'
with_dict:
SECRET_KEY_BASE: "{{ lookup('file', '/opt/greenlight/rake_secret') }}"
SECRET_KEY_BASE: "{{ rake_secret.stdout }}"
BIGBLUEBUTTON_ENDPOINT: 'https://{{ ansible_fqdn }}/bigbluebutton/'
BIGBLUEBUTTON_SECRET: '{{ api_secret.stdout }}'
SAFE_HOSTS: '{{ ansible_fqdn }}'