Ansible for Matrix Deployment

From Irregularpedia
Revision as of 05:34, 7 September 2024 by Maintenance script (talk | contribs) (Initial)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Return to server-guides If you are installing on an LXC see the Proxmox Linux Container LXC Setup Guide First, set DNS using the DNS Guide.

Steps

Install Ansible

https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-on-ubuntu

wget -qO - 'https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg 1> /dev/null
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/prebuilt-mpr.list
sudo apt update

sudo apt install just

sudo apt install -y python3-pip #install pip
python3 -m pip install --user ansible #use pip to install ansible
pip install passlib

Running Ansible

When fully configured, DNS is set up and ready to go.

make roles
ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start

Vars Creation

echo "domain.tld: matrix."
read domain
echo "remote ip address: "
read remote_ip
git clone https://github.com/spantaleev/matrix-docker-ansible-deploy.git
cd ./matrix-docker-ansible-deploy
mkdir inventory/host_vars/matrix.$domain
cp examples/vars.yml inventory/host_vars/matrix.$domain/vars.yml
cp examples/hosts inventory/hosts
sed 's/YOUR_BARE_DOMAIN_NAME_HERE/$domain/g' inventory/host_vars/matrix.$domain/vars.yml

VARS Configuration

sed 's/synapse/dendrite/' inventory/host_vars/matrix.$domain/vars.yml