Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Commit

Permalink
Extract variables to defaults and split bbb installation to allow ski…
Browse files Browse the repository at this point in the history
…pping bbb-demo and bbb-check.
  • Loading branch information
janrotter committed May 2, 2016
1 parent 08a571b commit 21d54c9
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 21 deletions.
7 changes: 6 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
---
ffmpeg_version: '2.3.3'
bbb_apt_key: '328BD16D'

#Repositories
bbb_apt_repo_url: 'http://ubuntu.bigbluebutton.org/trusty-1-0/'
libreoffice_ppa: 'ppa:libreoffice/libreoffice-4-4'
ffmpeg_ppa: 'ppa:mc3man/trusty-media'
2 changes: 0 additions & 2 deletions handlers/main.yml

This file was deleted.

35 changes: 22 additions & 13 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
- bbb_dependencies

- name: apt_repository required packages are present
apt: name={{ item }} state=present
with_items:
- python-apt
apt: name=python-apt state=present
tags:
- bbb_role_dependencies

Expand All @@ -32,7 +30,7 @@
- name: BigBlueButton apt key is present
apt_key:
url: http://ubuntu.bigbluebutton.org/bigbluebutton.asc
id: 328BD16D
id: '{{ bbb_apt_key }}'
state: present
tags:
- bbb_apt_key
Expand All @@ -46,28 +44,39 @@
- 'deb-src http://archive.ubuntu.com/ubuntu trusty-updates multiverse'
tags:
- multiverse_repositories
- repositories

- name: libreoffice ppa is enabled
apt_repository: repo='ppa:libreoffice/libreoffice-4-4'
apt_repository: repo='{{ libreoffice_ppa }}'
tags:
- libreoffice_repositories
- repositories

- name: ffmpeg ppa is enabled
apt_repository: repo='ppa:mc3man/trusty-media'
apt_repository: repo='{{ ffmpeg_ppa }}'
tags:
- ffmpeg_repositories
- repositories

- name: BigBlueButton repo is enabled
apt_repository: repo={{ item }} state=present
with_items:
- 'deb http://ubuntu.bigbluebutton.org/trusty-1-0/ bigbluebutton-trusty main'
- 'deb {{ bbb_apt_repo_url }} bigbluebutton-trusty main'
tags:
- bbb_repositories
- repositories

- name: Install bigbluebutton
apt: name={{ item }} state=present
with_items:
- bigbluebutton
- bbb-demo
- bbb-check
- name: bigbluebutton is installed
apt: name=bigbluebutton state=present
tags:
- install_bbb

- name: bbb-demo is installed
apt: name=bbb-demo state=present
tags:
- install_bbb_demo

- name: bbb-check is installed
apt: name=bbb-check state=present
tags:
- install_bbb_check
5 changes: 2 additions & 3 deletions tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ INVENTORY='localhost,'
CONNECTION='local'

ansible-playbook -i $INVENTORY tests/test.yml --syntax-check
ansible-playbook -i $INVENTORY tests/test.yml --connection=$CONNECTION --sudo --skip-tags dist_upgrade
if ansible-playbook -i $INVENTORY tests/test.yml --connection=$CONNECTION --sudo --skip-tags non_idempotent \
ansible-playbook -i $INVENTORY tests/test.yml --connection=$CONNECTION --sudo
if ansible-playbook -i $INVENTORY tests/test.yml --connection=$CONNECTION --sudo \
| grep --quiet 'changed=0.*failed=0'; then
echo 'Idempotency: PASS' && exit 0
else
echo 'Idempotency: FAIL' && exit 1
fi

2 changes: 0 additions & 2 deletions vars/main.yml

This file was deleted.

0 comments on commit 21d54c9

Please sign in to comment.