shreyasajj 4年前
コミット
6fff823274
7個のファイルの変更34行の追加44行の削除
  1. +0
    -22
      .github/workflows/ansible-lint.yml
  2. +4
    -10
      docs/configuring-awx-system.md
  3. +1
    -1
      group_vars/matrix_servers
  4. +2
    -2
      roles/matrix-awx/tasks/main.yml
  5. +0
    -8
      roles/matrix-awx/tasks/rename_variables.yml
  6. +26
    -0
      roles/matrix-awx/tasks/update_variables.yml
  7. +1
    -1
      roles/matrix-bot-honoroit/defaults/main.yml

+ 0
- 22
.github/workflows/ansible-lint.yml ファイルの表示

@@ -1,22 +0,0 @@
name: Ansible Lint

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Lint Ansible Playbook
uses: ansible/ansible-lint-action@c37fb7b4bda2c8cb18f4942716bae9f11b0dc9bc
with:
# Paths to ansible files (i.e., playbooks, tasks, handlers etc..)
targets: "./"

override-deps: |
ansible-lint==5.3.1

args: "-x metadata, formatting"

+ 4
- 10
docs/configuring-awx-system.md ファイルの表示

@@ -4,7 +4,7 @@ An AWX setup for managing multiple Matrix servers.


This section is used in an AWX system that can create and manage multiple [Matrix](http://matrix.org/) servers. You can issue members an AWX login to their own 'organisation', which they can use to manage/configure 1 to N servers. This section is used in an AWX system that can create and manage multiple [Matrix](http://matrix.org/) servers. You can issue members an AWX login to their own 'organisation', which they can use to manage/configure 1 to N servers.


Members can be assigned a server from Digitalocean, or they can connect their own on-premises server. This script is free to use in a commercial context with the 'MemberPress Plus' and 'WP Oauth Sever' addons. It can also be run in a non-commercial context.
Members can be assigned a server from Digitalocean, or they can connect their own on-premises server. These playbooks are free to use in a commercial context with the 'MemberPress Plus' plugin. They can also be run in a non-commercial context.


The AWX system is arranged into 'members' each with their own 'subscriptions'. After creating a subscription the user enters the 'provision stage' where they defined the URLs they will use, the servers location and whether or not there's already a website at the base domain. They then proceed onto the 'deploy stage' where they can configure their Matrix server. The AWX system is arranged into 'members' each with their own 'subscriptions'. After creating a subscription the user enters the 'provision stage' where they defined the URLs they will use, the servers location and whether or not there's already a website at the base domain. They then proceed onto the 'deploy stage' where they can configure their Matrix server.


@@ -21,12 +21,7 @@ The following repositories allow you to copy and use this setup:


[Ansible Provision Server](https://gitlab.com/GoMatrixHosting/ansible-provision-server) - Used by AWX members to perform initial configuration of their DigitalOcean or On-Premises server. [Ansible Provision Server](https://gitlab.com/GoMatrixHosting/ansible-provision-server) - Used by AWX members to perform initial configuration of their DigitalOcean or On-Premises server.



## Testing Fork For This Playbook

Updates to this section are trailed here:

[GoMatrixHosting Matrix Docker Ansible Deploy](https://gitlab.com/GoMatrixHosting/matrix-docker-ansible-deploy)
[GMHosting External Tools](https://gitlab.com/GoMatrixHosting/gmhosting-external-tools) - Extra tools we run outside of AWX, some of which are experimental.




## Does I need an AWX setup to use this? How do I configure it? ## Does I need an AWX setup to use this? How do I configure it?
@@ -38,7 +33,6 @@ For simpler installation steps you can use to get started with this system, chec


## Does I need a front-end WordPress site? And a DigitalOcean account? ## Does I need a front-end WordPress site? And a DigitalOcean account?


You do not need a front-end WordPress site or any of the mentioned WordPress plugins to use this setup. It can be run on it's own in a non-commercial context.

You also don't need a DigitalOcean account, but this will limit you to only being able to connect 'On-Premises' servers.
You do not need a front-end WordPress site or the MemberPress plugin to use this setup. It can be run on it's own in a non-commercial context.


You also don't need a DigitalOcean account, although this will limit you to only being able to connect 'On-Premises' servers.

+ 1
- 1
group_vars/matrix_servers ファイルの表示

@@ -1028,7 +1028,7 @@ matrix_bot_honoroit_systemd_required_services_list: |
# Postgres is the default, except if not using `matrix_postgres` (internal postgres) # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
matrix_bot_honoroit_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}" matrix_bot_honoroit_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
matrix_bot_honoroit_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'honoroit.bot.db') | to_uuid }}" matrix_bot_honoroit_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'honoroit.bot.db') | to_uuid }}"
matrix_bot_honoroit_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
matrix_bot_honoroit_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"


###################################################################### ######################################################################
# #


+ 2
- 2
roles/matrix-awx/tasks/main.yml ファイルの表示

@@ -8,9 +8,9 @@
tags: tags:
- always - always


# Renames the variables if needed
# Renames or updates the vars.yml if needed
- include_tasks: - include_tasks:
file: "rename_variables.yml"
file: "update_variables.yml"
apply: apply:
tags: always tags: always
when: run_setup|bool and matrix_awx_enabled|bool when: run_setup|bool and matrix_awx_enabled|bool


+ 0
- 8
roles/matrix-awx/tasks/rename_variables.yml ファイルの表示

@@ -1,8 +0,0 @@
---

- name: Rename synapse presence variable
delegate_to: 127.0.0.1
replace:
path: "/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml"
regexp: 'matrix_synapse_use_presence'
replace: 'matrix_synapse_presence_enabled'

+ 26
- 0
roles/matrix-awx/tasks/update_variables.yml ファイルの表示

@@ -0,0 +1,26 @@
---

- name: Rename synapse presence variable
delegate_to: 127.0.0.1
replace:
path: "/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml"
regexp: 'matrix_synapse_use_presence'
replace: 'matrix_synapse_presence_enabled'

- name: Generate matrix_homeserver_generic_secret_key variable
delegate_to: 127.0.0.1
command: |
openssl rand -hex 16
register: generic_secret
no_log: True
when: ( matrix_homeserver_generic_secret_key is undefined ) or ( matrix_homeserver_generic_secret_key | length == 0 )

- name: Add new matrix_homeserver_generic_secret_key variable
delegate_to: 127.0.0.1
lineinfile:
path: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml'
line: "matrix_homeserver_generic_secret_key: {{ generic_secret.stdout }}"
insertbefore: '# Basic Settings End'
mode: '0600'
state: present
when: ( matrix_homeserver_generic_secret_key is undefined ) or ( matrix_homeserver_generic_secret_key | length == 0 )

+ 1
- 1
roles/matrix-bot-honoroit/defaults/main.yml ファイルの表示

@@ -7,7 +7,7 @@ matrix_bot_honoroit_container_image_self_build: false
matrix_bot_honoroit_docker_repo: "https://gitlab.com/etke.cc/honoroit.git" matrix_bot_honoroit_docker_repo: "https://gitlab.com/etke.cc/honoroit.git"
matrix_bot_honoroit_docker_src_files_path: "{{ matrix_base_data_path }}/honoroit/docker-src" matrix_bot_honoroit_docker_src_files_path: "{{ matrix_base_data_path }}/honoroit/docker-src"


matrix_bot_honoroit_version: v0.9.0
matrix_bot_honoroit_version: v0.9.1
matrix_bot_honoroit_docker_image: "{{ matrix_bot_honoroit_docker_image_name_prefix }}honoroit:{{ matrix_bot_honoroit_version }}" matrix_bot_honoroit_docker_image: "{{ matrix_bot_honoroit_docker_image_name_prefix }}honoroit:{{ matrix_bot_honoroit_version }}"
matrix_bot_honoroit_docker_image_name_prefix: "{{ 'localhost/' if matrix_bot_honoroit_container_image_self_build else 'registry.gitlab.com/etke.cc/' }}" matrix_bot_honoroit_docker_image_name_prefix: "{{ 'localhost/' if matrix_bot_honoroit_container_image_self_build else 'registry.gitlab.com/etke.cc/' }}"
matrix_bot_honoroit_docker_image_force_pull: "{{ matrix_bot_honoroit_docker_image.endswith(':latest') }}" matrix_bot_honoroit_docker_image_force_pull: "{{ matrix_bot_honoroit_docker_image.endswith(':latest') }}"


読み込み中…
キャンセル
保存