Ansible for Matrix Deployment: Difference between revisions

From Irregularpedia
Jump to navigation Jump to search
Initial
 
syntax
Tag: 2017 source edit
Line 1: Line 1:
Return to [[server-guides.md|server-guides]] If you are installing on an LXC see the [[Proxmox%20Linux%20Container%20LXC%20Setup.md|Proxmox Linux Container LXC Setup]] Guide First, set DNS using the [https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-dns.md DNS Guide].
= Installing Ansible for Matrix Deployment =
 
Return to [[server-guides|Server Guides]].
 
If you are installing on an LXC, see the [[Proxmox Linux Container LXC Setup]] guide first. Set DNS using the [https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-dns.md DNS Guide].


<span id="steps"></span>
== Steps ==
== Steps ==


<span id="install-ansible"></span>
=== Install Ansible ===
=== Install Ansible ===
Refer to the official [https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-on-ubuntu Ansible Installation Guide].


https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-on-ubuntu
<pre>
 
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
<syntaxhighlight lang="shell">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
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 update
Line 15: Line 17:
sudo apt install just
sudo apt install just


sudo apt install -y python3-pip #install pip
sudo apt install -y python3-pip # Install pip
python3 -m pip install --user ansible #use pip to install ansible
python3 -m pip install --user ansible # Use pip to install Ansible
pip install passlib
pip install passlib
</syntaxhighlight>
</pre>
<span id="running-ansible"></span>
 
=== Running Ansible ===
=== Running Ansible ===
After DNS is fully configured and ready:


When fully configured, DNS is set up and ready to go.
<pre>
make roles
ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start
</pre>


<syntaxhighlight lang="shell">make roles
ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start</syntaxhighlight>
<span id="vars-creation"></span>
== Vars Creation ==
== Vars Creation ==


<syntaxhighlight lang="shell">echo "domain.tld: matrix."
<pre>
echo "domain.tld: matrix."
read domain
read domain
echo "remote ip address: "
echo "remote IP address: "
read remote_ip
read remote_ip
git clone https://github.com/spantaleev/matrix-docker-ansible-deploy.git
git clone https://github.com/spantaleev/matrix-docker-ansible-deploy.git
Line 39: Line 43:
cp examples/hosts inventory/hosts
cp examples/hosts inventory/hosts
sed 's/YOUR_BARE_DOMAIN_NAME_HERE/$domain/g' inventory/host_vars/matrix.$domain/vars.yml
sed 's/YOUR_BARE_DOMAIN_NAME_HERE/$domain/g' inventory/host_vars/matrix.$domain/vars.yml
</syntaxhighlight>
</pre>
<span id="vars-configuration"></span>
 
== VARS Configuration ==
== VARS Configuration ==


<syntaxhighlight lang="shell">sed 's/synapse/dendrite/' inventory/host_vars/matrix.$domain/vars.yml</syntaxhighlight>
<pre>
sed 's/synapse/dendrite/' inventory/host_vars/matrix.$domain/vars.yml
</pre>
 
== References ==
* [https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-on-ubuntu Ansible Installation Documentation]
* [https://github.com/spantaleev/matrix-docker-ansible-deploy Matrix Docker Ansible Deploy Repository]
* [https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-dns.md DNS Guide]

Revision as of 17:53, 3 December 2024

Installing Ansible for Matrix Deployment

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

Refer to the official Ansible Installation Guide.

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

After DNS is fully configured and ready:

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

References