mirror of
https://github.com/famedly/ansible-collection-matrix
synced 2024-12-04 16:49:17 +00:00
chore: delete unused role tests
This commit is contained in:
parent
8c4cc77006
commit
d248f5947e
13 changed files with 0 additions and 264 deletions
|
@ -1,14 +0,0 @@
|
|||
# Molecule managed
|
||||
|
||||
{% if item.registry is defined %}
|
||||
FROM {{ item.registry.url }}/{{ item.image }}
|
||||
{% else %}
|
||||
FROM {{ item.image }}
|
||||
{% endif %}
|
||||
|
||||
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
|
||||
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
|
||||
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
|
||||
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
|
||||
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \
|
||||
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates && xbps-remove -O; fi
|
|
@ -1,22 +0,0 @@
|
|||
*******
|
||||
Docker driver installation guide
|
||||
*******
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
* Docker Engine
|
||||
|
||||
Install
|
||||
=======
|
||||
|
||||
Please refer to the `Virtual environment`_ documentation for installation best
|
||||
practices. If not using a virtual environment, please consider passing the
|
||||
widely recommended `'--user' flag`_ when invoking ``pip``.
|
||||
|
||||
.. _Virtual environment: https://virtualenv.pypa.io/en/latest/
|
||||
.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ pip install 'molecule[docker]'
|
|
@ -1,28 +0,0 @@
|
|||
---
|
||||
dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
options:
|
||||
config-file: molecule/default/yamllint.yml
|
||||
platforms:
|
||||
- name: instance
|
||||
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian9}-ansible"
|
||||
command: ${MOLECULE_DOCKER_COMMAND:-""}
|
||||
volumes:
|
||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||
pre_build_image: true
|
||||
provisioner:
|
||||
name: ansible
|
||||
lint:
|
||||
name: ansible-lint
|
||||
playbooks:
|
||||
converge: ${MOLECULE_PLAYBOOK:-playbook.yml}
|
||||
scenario:
|
||||
name: default
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
|
@ -1,13 +0,0 @@
|
|||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
pre_tasks:
|
||||
- name: install gpg
|
||||
apt:
|
||||
state: present
|
||||
name:
|
||||
- gpg
|
||||
- dirmngr
|
||||
become: true
|
||||
roles:
|
||||
- role: element
|
|
@ -1,2 +0,0 @@
|
|||
---
|
||||
- role: geerlingguy.nginx
|
|
@ -1,14 +0,0 @@
|
|||
import os
|
||||
|
||||
import testinfra.utils.ansible_runner
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
||||
|
||||
def test_hosts_file(host):
|
||||
f = host.file('/etc/hosts')
|
||||
|
||||
assert f.exists
|
||||
assert f.user == 'root'
|
||||
assert f.group == 'root'
|
|
@ -1,12 +0,0 @@
|
|||
---
|
||||
extends: default
|
||||
|
||||
rules:
|
||||
braces:
|
||||
max-spaces-inside: 1
|
||||
level: error
|
||||
brackets:
|
||||
max-spaces-inside: 1
|
||||
level: error
|
||||
line-length: disable
|
||||
truthy: disable
|
2
roles/synapse/tests/.gitignore
vendored
2
roles/synapse/tests/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
.vagrant
|
||||
*.retry
|
49
roles/synapse/tests/Vagrantfile
vendored
49
roles/synapse/tests/Vagrantfile
vendored
|
@ -1,49 +0,0 @@
|
|||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.define "pip-stretch" do |pip|
|
||||
pip.vm.box = "debian/stretch64"
|
||||
|
||||
pip.vm.network "forwarded_port", guest: 8008, host: 8008
|
||||
pip.vm.network "forwarded_port", guest: 8448, host: 8448
|
||||
|
||||
pip.vm.provision "ansible" do |ansible|
|
||||
ansible.playbook = "test-pip.yml"
|
||||
ansible.extra_vars = { ansible_python_interpreter:"/usr/bin/python3" }
|
||||
end
|
||||
end
|
||||
config.vm.define "pip-buster" do |pip|
|
||||
pip.vm.box = "debian/buster64"
|
||||
|
||||
pip.vm.network "forwarded_port", guest: 8008, host: 8009
|
||||
pip.vm.network "forwarded_port", guest: 8448, host: 8449
|
||||
|
||||
pip.vm.provision "ansible" do |ansible|
|
||||
ansible.playbook = "test-pip.yml"
|
||||
ansible.extra_vars = { ansible_python_interpreter:"/usr/bin/python3" }
|
||||
end
|
||||
end
|
||||
config.vm.define "docker-stretch" do |docker|
|
||||
docker.vm.box = "debian/stretch64"
|
||||
|
||||
docker.vm.network "forwarded_port", guest: 8008, host: 8010
|
||||
docker.vm.network "forwarded_port", guest: 8448, host: 8450
|
||||
|
||||
docker.vm.provision "ansible" do |ansible|
|
||||
ansible.playbook = "test-docker.yml"
|
||||
ansible.extra_vars = { ansible_python_interpreter:"/usr/bin/python3" }
|
||||
end
|
||||
end
|
||||
config.vm.define "docker-buster" do |docker|
|
||||
docker.vm.box = "debian/buster64"
|
||||
|
||||
docker.vm.network "forwarded_port", guest: 8008, host: 8011
|
||||
docker.vm.network "forwarded_port", guest: 8448, host: 8451
|
||||
|
||||
docker.vm.provision "ansible" do |ansible|
|
||||
ansible.playbook = "test-docker.yml"
|
||||
ansible.extra_vars = { ansible_python_interpreter:"/usr/bin/python3" }
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,3 +0,0 @@
|
|||
[defaults]
|
||||
nocows=1
|
||||
roles_path=./roles:./../../
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
- role: geerlingguy.pip
|
||||
- role: geerlingguy.docker
|
||||
- role: geerlingguy.postgresql
|
|
@ -1,54 +0,0 @@
|
|||
---
|
||||
- hosts: all
|
||||
become: true
|
||||
tasks:
|
||||
- name: Flush handlers
|
||||
meta: flush_handlers
|
||||
|
||||
- name: Check if the api returns the correct version
|
||||
uri:
|
||||
url: "http://localhost:8008/_matrix/federation/v1/version"
|
||||
return_content: true
|
||||
register: api_version
|
||||
until: api_version.status == 200
|
||||
retries: 10
|
||||
delay: 2
|
||||
|
||||
- name: Check returned api version
|
||||
fail: >
|
||||
Return value is not as expected {{ api_version }}
|
||||
when: matrix_synapse_version != "v"~(api_version.content | from_json).server.version
|
||||
vars:
|
||||
dbname: synapse
|
||||
dbuser: synapse_user
|
||||
dbpw: synapse_password
|
||||
matrix_synapse_deployment_method: docker
|
||||
matrix_synapse_supervision_method: docker
|
||||
roles:
|
||||
- role: geerlingguy.pip
|
||||
pip_package: python3-pip
|
||||
pip_install_packages:
|
||||
- name: docker
|
||||
- name: psycopg2-binary
|
||||
- role: geerlingguy.docker
|
||||
- role: geerlingguy.postgresql
|
||||
postgresql_databases:
|
||||
- name: "{{ dbname }}"
|
||||
postgresql_users:
|
||||
- name: "{{ dbuser }}"
|
||||
password: "{{ dbpw }}"
|
||||
postgresql_global_config_options:
|
||||
- option: listen_addresses
|
||||
value: "172.17.0.1"
|
||||
postgresql_hba_entries:
|
||||
- { type: local, database: all, user: all, auth_method: trust }
|
||||
- { type: host, database: "{{ dbname }}", user: "{{ dbuser }}", address: "172.17.0.1/16", auth_method: md5 }
|
||||
- role: synapse
|
||||
matrix_server_name: localhost
|
||||
matrix_synapse_report_stats: false
|
||||
matrix_synapse_pg_host: 172.17.0.1
|
||||
matrix_synapse_pg_user: "{{ dbuser }}"
|
||||
matrix_synapse_pg_pass: "{{ dbpw }}"
|
||||
matrix_synapse_pg_db: "{{ dbname }}"
|
||||
matrix_synapse_extra_config:
|
||||
no_tls: true
|
|
@ -1,47 +0,0 @@
|
|||
---
|
||||
- hosts: all
|
||||
become: true
|
||||
vars:
|
||||
dbname: synapse
|
||||
dbuser: synapse_user
|
||||
dbpw: synapse_password
|
||||
tasks:
|
||||
- name: Flush handlers
|
||||
meta: flush_handlers
|
||||
|
||||
- name: Check if the api returns the correct version
|
||||
uri:
|
||||
url: "http://localhost:8008/_matrix/federation/v1/version"
|
||||
return_content: true
|
||||
register: api_version
|
||||
until: api_version.status == 200
|
||||
retries: 10
|
||||
delay: 2
|
||||
|
||||
- name: Check returned api version
|
||||
fail:
|
||||
msg: "Return value {{ api_version }} is not as expected {{ matrix_synapse_version }}"
|
||||
when: matrix_synapse_version != "v"~(api_version.content | from_json).server.version
|
||||
roles:
|
||||
- role: geerlingguy.pip
|
||||
pip_package: python3-pip
|
||||
pip_install_packages:
|
||||
- name: psycopg2-binary
|
||||
- role: geerlingguy.postgresql
|
||||
postgresql_databases:
|
||||
- name: "{{ dbname }}"
|
||||
postgresql_users:
|
||||
- name: "{{ dbuser }}"
|
||||
password: "{{ dbpw }}"
|
||||
postgresql_global_config_options:
|
||||
- option: listen_addresses
|
||||
value: "*"
|
||||
- role: synapse
|
||||
matrix_server_name: localhost
|
||||
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_extra_config:
|
||||
no_tls: true
|
Loading…
Reference in a new issue