Skip to content

Commit

Permalink
Allow multiple aliases for server name
Browse files Browse the repository at this point in the history
  • Loading branch information
dkobras committed May 29, 2020
1 parent 010debc commit 7aafcb3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Requires Ansible >= 2.4.0

To get up _BigBlueButton_ up and running the following variables can be configured:

* `bbb_server_name`: Set the FQDN hostname that points to the server where _BigBlueButton_ is going to be installed. This is the only mandatory value, the playbook will fail if this variable is not defined.
* `bbb_server_names`: Set the list of FQDN hostnames that point to the server where _BigBlueButton_ is going to be installed. If only a single FQDN is required, `bbb_server_name` can be used instead. Setting either one of these is the only mandatory value, the playbook will fail if neither variable is defined.
* `bbb_configure_firewall`: Configure local UFW firewall on server (Default: `True`).
* `bbb_configure_nat`: Configure NAT support for servers behind an external firewall (Default: `False`).
* `bbb_configure_ssl`: Configure SSL support using _LetsEncrypt_ certificates (Default: `False`).
Expand Down
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ bbb_install_check: False
bbb_configure_firewall: True
bbb_configure_nat: False
bbb_configure_ssl: False
bbb_server_names:
- "{{ bbb_server_name }}"
bbb_ssl_webroot_path: /var/www/bigbluebutton-default
bbb_ssl_renewal_command_args: '--renew-hook "systemctl restart nginx"'
## Uncoment the following line to test on test network.
Expand Down
3 changes: 1 addition & 2 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ dependencies:
vars:
letsencrypt_webroot_path: "{{ bbb_ssl_webroot_path }}"
letsencrypt_email: "{{ bbb_ssl_email }}"
letsencrypt_cert_domains:
- "{{ bbb_server_name }}"
letsencrypt_cert_domains: "{{ bbb_server_names }}"
bbb_ssl_renewal_command_args: '--renew-hook "systemctl restart nginx"'
when: bbb_configure_ssl == True
6 changes: 3 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
msg: "OS not supported for BigBlueButton installation"
when: ansible_distribution != "Ubuntu" or ansible_distribution_version != "{{ bbb_ubuntu_version }}"

- name: Check if bbb_server_name is defined
- name: Check if primary BigBluebutton server name is defined
assert:
that:
- bbb_server_name != ""
- bbb_server_names[0] != ""
tags:
- bbb-check_vars

Expand Down Expand Up @@ -170,7 +170,7 @@
- install_bbb-check

- name: Set BigBlueButton server name
command: bbb-conf --setip "{{ bbb_server_name }}"
command: bbb-conf --setip "{{ bbb_server_names[0] }}"
tags:
- run_bbb-conf_setip

Expand Down
6 changes: 3 additions & 3 deletions templates/bbb-ssl.conf.j2
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
server {
listen 80;
listen [::]:80;
server_name {{ bbb_server_name }};
server_name {{ bbb_server_names|join(' ') }};
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/letsencrypt/live/{{ bbb_server_name }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ bbb_server_name }}/privkey.pem;
ssl_certificate /etc/letsencrypt/live/{{ bbb_server_names[0] }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ bbb_server_names[0] }}/privkey.pem;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
Expand Down

0 comments on commit 7aafcb3

Please sign in to comment.