Add capabilities to test with vagrant

This commit is contained in:
Emmanouil Kampitakis 2019-02-15 03:24:30 +01:00
parent fc3ecf8cbd
commit f2ca9d60f1
5 changed files with 41 additions and 4 deletions

13
tests/Vagrantfile vendored Normal file
View file

@ -0,0 +1,13 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "debian/stretch64"
config.vm.network "forwarded_port", guest: 8008, host: 8008
config.vm.network "forwarded_port", guest: 8448, host: 8448
config.vm.provision "ansible" do |ansible|
ansible.playbook = "test.yml"
end
end

3
tests/ansible.cfg Normal file
View file

@ -0,0 +1,3 @@
[defaults]
nocows=1
roles_path=./roles:./../../

2
tests/requirements.yml Normal file
View file

@ -0,0 +1,2 @@
---
- role: geerlingguy.postgresql

1
tests/test.retry Normal file
View file

@ -0,0 +1 @@
default

View file

@ -1,5 +1,23 @@
---
hosts: all
vars:
roles:
- role: matrix-ansible-synapse
- hosts: all
become: true
vars:
dbname: synapse
dbuser: synapse_user
dbpw: synapse_password
roles:
- role: geerlingguy.postgresql
postgresql_databases:
- name: "{{ dbname }}"
postgresql_users:
- name: "{{ dbuser }}"
password: "{{ dbpw }}"
- role: matrix-ansible-synapse
matrix_server_name: localhost
matrix_synapse_skip_tls: true
matrix_synapse_report_stats: false
matrix_synapse_pg_host: localhost
matrix_synapse_pg_user: "{{ dbuser }}"
matrix_synapse_pg_pass: "{{ dbpw }}"
matrix_synapse_pg_db: "{{ dbname }}"
matrix_synapse_macaroon_secret_key: "THIS_IS_TOTALLY_SECRET_1337_L33T_HaxXxOR"