mirror of
https://github.com/famedly/ansible-collection-matrix
synced 2025-03-04 14:47:18 +00:00
Add default values
This commit is contained in:
parent
5a05d4cb84
commit
49b27875cb
12 changed files with 228 additions and 0 deletions
11
.yamllint
Normal file
11
.yamllint
Normal file
|
@ -0,0 +1,11 @@
|
|||
extends: default
|
||||
|
||||
rules:
|
||||
braces:
|
||||
max-spaces-inside: 1
|
||||
level: error
|
||||
brackets:
|
||||
max-spaces-inside: 1
|
||||
level: error
|
||||
line-length: disable
|
||||
truthy: disable
|
48
README.md
Normal file
48
README.md
Normal file
|
@ -0,0 +1,48 @@
|
|||
Role Name
|
||||
=========
|
||||
|
||||
A brief description of the role goes here.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Any pre-requisites that may not be covered by Ansible itself or the role should
|
||||
be mentioned here. For instance, if the role uses the EC2 module, it may be a
|
||||
good idea to mention in this section that the boto package is required.
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
A description of the settable variables for this role should go here, including
|
||||
any variables that are in defaults/main.yml, vars/main.yml, and any variables
|
||||
that can/should be set via parameters to the role. Any variables that are read
|
||||
from other roles and/or the global scope (ie. hostvars, group vars, etc.) should
|
||||
be mentioned here as well.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
A list of other roles hosted on Galaxy should go here, plus any details in
|
||||
regards to parameters that may need to be set for other roles, or variables that
|
||||
are used from other roles.
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
Including an example of how to use your role (for instance, with variables
|
||||
passed in as parameters) is always nice for users too:
|
||||
|
||||
- hosts: servers
|
||||
roles:
|
||||
- { role: ansible-riot-webapp, x: 42 }
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
BSD
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
||||
An optional section for the role authors to include contact information, or a
|
||||
website (HTML is not allowed).
|
34
defaults/main.yml
Normal file
34
defaults/main.yml
Normal file
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
riot_version: 1.1.1
|
||||
riot_webapp_dir: /opt/riot/
|
||||
riot_config:
|
||||
brand: Riot
|
||||
bug_report_endpoint_url: https://riot.im/bugreports/submit
|
||||
default_federate: true
|
||||
default_hs_url: https://matrix.org
|
||||
default_is_url: https://vector.im
|
||||
default_theme: light
|
||||
disable_3pid_login: false
|
||||
disable_custom_urls: false
|
||||
disable_guests: false
|
||||
disable_login_language_selector: false
|
||||
enable_presence_by_hs_url:
|
||||
'https://matrix.org': false
|
||||
features:
|
||||
feature_groups: labs
|
||||
feature_pinning: labs
|
||||
integrations_jitsi_widget_url: https://scalar.vector.im/api/widgets/jitsi.html
|
||||
integrations_rest_url: https://scalar.vector.im/api
|
||||
integrations_ui_url: https://scalar.vector.im/
|
||||
piwik:
|
||||
siteId: 1
|
||||
url: https://piwik.riot.im/
|
||||
whitelistedHSUrls:
|
||||
- 'https://matrix.org'
|
||||
whitelistedISUrls:
|
||||
- 'https://vector.im'
|
||||
- 'https://matrix.org'
|
||||
roomDirectory:
|
||||
servers:
|
||||
- matrix.org
|
||||
welcomeUserId: '@riot-bot:matrix.org'
|
2
handlers/main.yml
Normal file
2
handlers/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
# handlers file for ansible-riot-webapp
|
58
meta/main.yml
Normal file
58
meta/main.yml
Normal file
|
@ -0,0 +1,58 @@
|
|||
---
|
||||
galaxy_info:
|
||||
author: your name
|
||||
description: your description
|
||||
company: your company (optional)
|
||||
|
||||
# If the issue tracker for your role is not on github, uncomment the
|
||||
# next line and provide a value
|
||||
# issue_tracker_url: http://example.com/issue/tracker
|
||||
|
||||
# Some suggested licenses:
|
||||
# - BSD (default)
|
||||
# - MIT
|
||||
# - GPLv2
|
||||
# - GPLv3
|
||||
# - Apache
|
||||
# - CC-BY
|
||||
license: license (GPLv2, CC-BY, etc)
|
||||
|
||||
min_ansible_version: 1.2
|
||||
|
||||
# If this a Container Enabled role, provide the minimum Ansible Container version.
|
||||
# min_ansible_container_version:
|
||||
|
||||
# Optionally specify the branch Galaxy will use when accessing the GitHub
|
||||
# repo for this role. During role install, if no tags are available,
|
||||
# Galaxy will use this branch. During import Galaxy will access files on
|
||||
# this branch. If Travis integration is configured, only notifications for this
|
||||
# branch will be accepted. Otherwise, in all cases, the repo's default branch
|
||||
# (usually master) will be used.
|
||||
# github_branch:
|
||||
|
||||
#
|
||||
# platforms is a list of platforms, and each platform has a name and a list of versions.
|
||||
#
|
||||
# platforms:
|
||||
# - name: Fedora
|
||||
# versions:
|
||||
# - all
|
||||
# - 25
|
||||
# - name: SomePlatform
|
||||
# versions:
|
||||
# - all
|
||||
# - 1.0
|
||||
# - 7
|
||||
# - 99.99
|
||||
|
||||
galaxy_tags: []
|
||||
# List tags for your role here, one per line. A tag is a keyword that describes
|
||||
# and categorizes the role. Users find roles by searching for tags. Be sure to
|
||||
# remove the '[]' above, if you add tags to this list.
|
||||
#
|
||||
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
||||
# Maximum 20 tags per role.
|
||||
|
||||
dependencies: []
|
||||
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
||||
# if you add dependencies to this list.
|
14
molecule/default/Dockerfile.j2
Normal file
14
molecule/default/Dockerfile.j2
Normal file
|
@ -0,0 +1,14 @@
|
|||
# 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
|
22
molecule/default/INSTALL.rst
Normal file
22
molecule/default/INSTALL.rst
Normal file
|
@ -0,0 +1,22 @@
|
|||
*******
|
||||
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]'
|
18
molecule/default/molecule.yml
Normal file
18
molecule/default/molecule.yml
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: instance
|
||||
image: centos:7
|
||||
provisioner:
|
||||
name: ansible
|
||||
lint:
|
||||
name: ansible-lint
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
5
molecule/default/playbook.yml
Normal file
5
molecule/default/playbook.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
roles:
|
||||
- role: ansible-riot-webapp
|
BIN
molecule/default/tests/__pycache__/test_default.cpython-37.pyc
Normal file
BIN
molecule/default/tests/__pycache__/test_default.cpython-37.pyc
Normal file
Binary file not shown.
14
molecule/default/tests/test_default.py
Normal file
14
molecule/default/tests/test_default.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
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'
|
2
vars/main.yml
Normal file
2
vars/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
# vars file for ansible-riot-webapp
|
Loading…
Add table
Reference in a new issue