Skip to content

Commit

Permalink
Add checkvars for usability
Browse files Browse the repository at this point in the history
  • Loading branch information
BrutalBirdie committed May 1, 2021
1 parent 6f9aedc commit 4833f29
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*~
.vagrant
*.retry
.cache/
31 changes: 31 additions & 0 deletions tasks/checkvars.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---

- name: checking variable...
block:
- name: bbb_letsencrypt_email
debug:
msg: "value: {{ bbb_letsencrypt_email }}"
when: bbb_letsencrypt_enable
- name: check bbb_coturn_secret
debug:
msg: "value: {{ bbb_coturn_secret }}"
when: bbb_coturn_enable
- name: check bbb_greenlight_secret
debug:
msg: "value: {{ bbb_greenlight_secret }}"
when: bbb_greenlight_enable
- name: check bbb_greenlight_db_password
debug:
msg: "value: {{ bbb_greenlight_db_password }}"
when: bbb_greenlight_enable
- name: check distribution
debug:
msg: "distribution should be bionic and was detected as {{ ansible_distribution_release }}"
failed_when: ansible_distribution_release | lower != 'xenial'
rescue:
- name: CHECK YOUR VARIABLES!
debug:
msg: "{{ ansible_failed_result }}"
failed_when: ansible_failed_result.failed
tags:
- checkvars
2 changes: 2 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
- import_tasks: checkvars.yml

- name: Install required packages
apt:
name: "{{ bbb_required_packages }}"
Expand Down

0 comments on commit 4833f29

Please sign in to comment.