Add software role and matrix federation button
This commit is contained in:
parent
7d8fa25ad9
commit
f1b7c65577
4 changed files with 33 additions and 8 deletions
|
|
@ -2,6 +2,14 @@
|
|||
- name: Run all roles
|
||||
hosts: serguzim_net
|
||||
tasks:
|
||||
- name: Install software
|
||||
ansible.builtin.include_role:
|
||||
name: software
|
||||
apply:
|
||||
tags: software
|
||||
tags: software
|
||||
when: "inventory_hostname == 'node003'"
|
||||
|
||||
- name: Include common roles
|
||||
ansible.builtin.include_role:
|
||||
name: "{{ services_item }}"
|
||||
|
|
|
|||
|
|
@ -9,9 +9,11 @@ gatus_external_endpoints_backups: "{{ vault_hosts | vault_hosts_backup_to_gatus(
|
|||
gatus_endpoints_hosts: "{{ opentofu.hosts | hosts_to_gatus() }}"
|
||||
gatus_endpoints_services: "{{ all_services | services_to_gatus() }}"
|
||||
|
||||
gatus_federation_tester: "https://federationtester.matrix.org/api/report?server_name=msrg.cc"
|
||||
|
||||
gatus_endpoints_other:
|
||||
- name: matrix-federation
|
||||
url: https://federationtester.matrix.org/api/report?server_name=msrg.cc
|
||||
url: "{{ gatus_federation_tester }}"
|
||||
group: 9-external
|
||||
interval: 5m
|
||||
conditions:
|
||||
|
|
@ -51,6 +53,11 @@ gatus_yml:
|
|||
client-secret: "{{ opentofu.authentik_data.gatus.client_secret }}"
|
||||
scopes: ["openid"]
|
||||
|
||||
ui:
|
||||
buttons:
|
||||
- name: Matrix Federation Tester
|
||||
link: "{{ gatus_federation_tester }}"
|
||||
|
||||
alerting:
|
||||
email: "{{ vault_gatus.alerting.email }}"
|
||||
ntfy: "{{ vault_gatus.alerting.ntfy }}"
|
||||
|
|
|
|||
48
roles/software/tasks/docker.yml
Normal file
48
roles/software/tasks/docker.yml
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
- name: Install required system packages
|
||||
apt:
|
||||
pkg:
|
||||
- apt-transport-https
|
||||
- ca-certificates
|
||||
- curl
|
||||
- software-properties-common
|
||||
- python3-pip
|
||||
- virtualenv
|
||||
- python3-setuptools
|
||||
state: latest
|
||||
update_cache: true
|
||||
become: true
|
||||
|
||||
- name: Add Docker GPG apt Key
|
||||
apt_key:
|
||||
url: https://download.docker.com/linux/ubuntu/gpg
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Add Docker Repository
|
||||
apt_repository:
|
||||
repo: deb https://download.docker.com/linux/ubuntu focal stable
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Update apt and install docker packages
|
||||
apt:
|
||||
pkg:
|
||||
- docker-ce
|
||||
- docker-ce-cli
|
||||
- containerd.io
|
||||
- docker-buildx-plugin
|
||||
- docker-compose-plugin
|
||||
state: latest
|
||||
update_cache: true
|
||||
become: true
|
||||
|
||||
- name: Add user to the Docker group
|
||||
user:
|
||||
name: "{{ ansible_user }}"
|
||||
groups: docker
|
||||
append: yes
|
||||
become: true
|
||||
|
||||
- name: Create a network
|
||||
community.docker.docker_network:
|
||||
name: apps
|
||||
17
roles/software/tasks/main.yml
Normal file
17
roles/software/tasks/main.yml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
- name: Install aptitude
|
||||
apt:
|
||||
name: aptitude
|
||||
state: latest
|
||||
update_cache: true
|
||||
become: true
|
||||
|
||||
- name: Install docker
|
||||
ansible.builtin.import_tasks: docker.yml
|
||||
|
||||
- name: Install jq
|
||||
apt:
|
||||
pkg:
|
||||
- jq
|
||||
state: latest
|
||||
update_cache: true
|
||||
become: true
|
||||
Loading…
Reference in a new issue