Compare commits

..
50 Commits
Author SHA1 Message Date
gballan a8ab505140 Adding orangepi3lts to uptime_kuma/docker; Updating docker playbook to include uptime_kuma group
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-10 10:34:34 -05:00
gballan dcec2141c0 Adding PHP role for web servers; updating web servers config with hosted sites
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-09 11:29:04 -05:00
gballan 5d946b7f9b Fixing calls to ansible_* facts
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-08 22:57:26 -05:00
gballan be2208b245 Adding uptime kuma config
ci/woodpecker/push/woodpecker Pipeline failed
2026-10-24 00:14:43 -04:00
gballan 089f875520 Adding new Pi 5 1GB to inventory; updating monitoring server nodes list with new wifi node IPs
ci/woodpecker/push/woodpecker Pipeline failed
2026-10-20 22:03:21 -04:00
gballan ea32497180 Adding playbook to run benchmarks via sysbench
ci/woodpecker/push/woodpecker Pipeline failed
2026-10-16 14:58:36 -04:00
gballan bbf63b4c63 Adding Raspberry Pi Zero 1; adding Pi 3A+ and Pi Zero to Grafan
ci/woodpecker/push/woodpecker Pipeline failed
2026-10-07 01:09:26 -04:00
gballan 588a44a0c1 Adding Pi 3A+
ci/woodpecker/push/woodpecker Pipeline failed
2026-10-05 22:35:10 -04:00
gballan 924bacd958 Adding rest of Raspberry Pis to Prometheus
ci/woodpecker/push/woodpecker Pipeline failed
2026-10-05 19:15:15 -04:00
gballan f21fb8b604 Adding rest of Raspberry Pis to inventory 2026-10-05 19:15:04 -04:00
gballan fcd584e2ba Fixing SSSD config 2026-10-05 19:14:46 -04:00
gballan 3d8bdafd28 Moving prometheus targets to group_vars
ci/woodpecker/push/woodpecker Pipeline failed
2026-10-05 17:35:23 -04:00
gballan 83790d5b73 Added Prometheus and Grafana config
ci/woodpecker/push/woodpecker Pipeline was canceled
2026-10-05 17:32:14 -04:00
gballan 197962ecda Adding the new pi 5 2GB to raspberry pi group
ci/woodpecker/push/woodpecker Pipeline failed
2026-10-05 15:49:44 -04:00
gballan 81e7ce6a4b Updated Docker playbook to install Python library for managing containers; updated Podman playbook to set up containers
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-29 23:31:41 -04:00
gballan d0c201c1f3 Updating sssd role
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-28 15:10:22 -04:00
gballan e0575045d2 Adding common /nfs mount to systems
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-28 14:46:18 -04:00
gballan 5d8d0c6dea Updating SSSD role
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-28 11:11:20 -04:00
gballan d39027365d Updating SSSD role
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-28 11:02:50 -04:00
gballan 2e03babda2 Fixing LDAP groups, maybe
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-28 10:54:22 -04:00
gballan 63525e0967 Updating SSSD role
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-28 10:48:19 -04:00
gballan 1dcb23dfaf Removing SSSD bind credentials; updating SSSD role
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-28 10:41:32 -04:00
gballan 61f3d73d70 Adding SSSD config
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-28 10:22:18 -04:00
gballan 43d7b9fce6 Updating SSSD role:
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-28 10:10:35 -04:00
gballan 8d2d3874f7 Adding sssd role
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-28 10:08:05 -04:00
gballan b4b36cefb3 Adding sssd role
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-28 10:07:14 -04:00
gballan 84dfd3b040 Adding sssd role
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-28 10:00:57 -04:00
gballan 229df90f74 Removing unnecessary podman version output
ci/woodpecker/push/woodpecker Pipeline was successful
2026-09-28 09:16:32 -04:00
gballan 28827dd5d3 Switching CI runners to podman
ci/woodpecker/push/woodpecker Pipeline was successful
2026-09-28 09:12:54 -04:00
gballan b940e10a4c Updating list of Pis
ci/woodpecker/push/woodpecker Pipeline was successful
2026-09-27 23:20:03 -04:00
gballan 44dd4195a7 Updating pi1b addresses
ci/woodpecker/push/woodpecker Pipeline was successful
2026-09-25 23:04:09 -04:00
gballan decdf4f99d Created a raspberrypi group to track all Pis in the infrastructure
ci/woodpecker/push/woodpecker Pipeline was successful
2026-09-23 23:09:08 -04:00
gballan de98fe2057 Replacing ansible.builtin.shell with ansible.builtin.command
ci/woodpecker/push/woodpecker Pipeline was successful
2026-09-23 21:54:49 -04:00
gballan 0c2889923d Adding DNS VMs
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-23 21:52:21 -04:00
gballan 78a7bcc8f4 Added a basic sysinfo playbook to show hardware information about systems
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-23 21:37:40 -04:00
gballan dbb636d94e Adding ansible_user config to all systems so I don't have to specify xadmin every time 2026-09-23 21:37:21 -04:00
gballan 178b7e7f89 Adding various systems and SBCs to the hosts.ini 2026-09-23 21:36:59 -04:00
gballan 6d82582a05 Simplifying ansible-lint step
ci/woodpecker/push/woodpecker Pipeline was successful
2026-09-15 23:10:21 -04:00
gballan f70f95141a Adding ansible-lint config; hopefully last fix
ci/woodpecker/push/woodpecker Pipeline was canceled
2026-09-15 23:02:41 -04:00
gballan d6682e1ad9 Trying ansible-lint via python-slim container
ci/woodpecker/push/woodpecker Pipeline was successful
2026-09-15 22:49:54 -04:00
gballan d65efc33b6 Fixing ansible-galaxy install for CI
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-15 22:43:04 -04:00
gballan 42a4a454db Fixing more ansible-lint stuff
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-15 21:48:25 -04:00
gballan a2550e5664 Adding missing gerrlingguy.docker dependency
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-15 21:47:47 -04:00
gballan a8254dcb28 Fixing more ansible-lint errors
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-15 21:44:22 -04:00
gballan 7a43c728a3 Fixing ansible-lint errors
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-15 21:39:47 -04:00
gballan 2438978296 Updating Woodpecker CI config to handle role installs
ci/woodpecker/push/woodpecker Pipeline was canceled
2026-09-15 21:39:19 -04:00
gballan 2d5e516ca6 Changing ansible-lint to run offline
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-15 20:27:21 -04:00
gballan 6920ce6f05 Renaming lint step
ci/woodpecker/push/woodpecker Pipeline failed
2026-09-15 20:22:14 -04:00
gballan d392bddd3a Switching to python:3.14-slim image to try speeding up the lint step
ci/woodpecker/push/woodpecker Pipeline is pending
2026-09-15 20:16:35 -04:00
gballan 31abe0f2b2 Adding Woodpecker config with ansible-lint
ci/woodpecker/push/woodpecker Pipeline was canceled
2026-09-15 20:13:24 -04:00
32 changed files with 679 additions and 68 deletions

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
# .ansible-lint
---
# Exclude paths from linting
exclude_paths:
- .cache/
- .github/
- tests/
- molecule/
- roles/
# Enable specific profiles (min, basic, moderate, safety, shared, production)
profile: moderate
warn_list:
- skip_this_tag
- experimental
# Set the project directory
project_dir: .
+10
View File
@@ -0,0 +1,10 @@
when:
- event: [pull_request, push]
branch: [main]
steps:
- name: ansible-lint
image: ghcr.io/ansible/community-ansible-dev-tools:latest
commands:
- git config --global --add safe.directory "$CI_WORKSPACE"
- ansible-lint --force-color
+24 -5
View File
@@ -1,4 +1,5 @@
--- ---
ansible_user: xadmin
packages_common: packages_common:
- 'bash' - 'bash'
@@ -24,8 +25,8 @@ apache_vhosts: >-
+ (apache_vhosts_munin | default([])) + (apache_vhosts_munin | default([]))
}} }}
docker_add_repo: True docker_add_repo: true
docker_install_compose_plugin: False docker_install_compose_plugin: false
docker_users: docker_users:
- 'gballan' - 'gballan'
@@ -43,13 +44,13 @@ munin_node_plugins:
- name: 'uptime' - name: 'uptime'
- name: 'users' - name: 'users'
ntp_enabled: True ntp_enabled: true
ntp_timezone: 'America/New_York' ntp_timezone: 'America/New_York'
ntp_package: 'chrony' ntp_package: 'chrony'
ntp_daemon: 'chronyd' ntp_daemon: 'chronyd'
ntp_config_file: '/etc/chrony/chrony.conf' ntp_config_file: '/etc/chrony/chrony.conf'
ntp_driftfile: '/var/lib/chrony/chrony.drift' ntp_driftfile: '/var/lib/chrony/chrony.drift'
ntp_manage_config: True ntp_manage_config: true
ntp_servers: ntp_servers:
- 'virginia.time.system76.com iburst' - 'virginia.time.system76.com iburst'
- 'ohio.time.system76.com iburst' - 'ohio.time.system76.com iburst'
@@ -58,9 +59,27 @@ ntp_restrict:
- '127.0.0.1' - '127.0.0.1'
- '::1' - '::1'
# SSSD & OpenLDAP core settings
sssd_nss_homedir_substring: '/nfs/users'
sssd_domain_name: "metaunix"
openldap_host: "ldap.int.metaunix.net"
openldap_port: 636
openldap_use_starttls: false
openldap_search_base: "dc=metaunix,dc=net"
openldap_schema: "rfc2307"
# TLS / Certificate validation
sssd_disable_tls_verify: true
# Behavior & Performance
sssd_enable_mkhomedir: true
sssd_cache_credentials: true
sssd_enumerate: false
sssd_default_shell: "/bin/bash"
sudoers_sudoers: sudoers_sudoers:
privileges: privileges:
- name: '%sudo' - name: '%sudo'
entry: 'ALL=NOPASSWD:ALL' entry: 'ALL=NOPASSWD:ALL'
- name: '%linuxadmins' - name: '%linuxadmins'
entry: 'ALL=(ALL) ALL' entry: 'ALL=NOPASSWD:ALL'
+15
View File
@@ -0,0 +1,15 @@
---
podman_containers:
woodpecker_agent:
image: docker.io/woodpeckerci/woodpecker-agent:v3.16
state: started
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
env:
WOODPECKER_BACKEND=docker
WOODPECKER_SERVER=10.7.10.84:9000
WOODPECKER_AGENT_SECRET=af2c22a8f27fe2c22249d3b1e42f92df
generate_systemd:
restart_policy: always
names: true
+6 -6
View File
@@ -7,14 +7,14 @@ gitea_data_dir: /var/lib/gitea
# use the default SSH server for git operations, not Gitea's built-in one # use the default SSH server for git operations, not Gitea's built-in one
gitea_ssh_port: 22 gitea_ssh_port: 22
gitea_user: git gitea_user: git
gitea_start_ssh: False gitea_start_ssh: false
gitea_disable_registration: True gitea_disable_registration: true
gitea_show_registration_button: False gitea_show_registration_button: false
gitea_require_signin: False gitea_require_signin: false
gitea_enable_push_create_org: True gitea_enable_push_create_org: true
gitea_enable_push_create_user: True gitea_enable_push_create_user: true
# Apache reverse proxy config # Apache reverse proxy config
apache_mods_enabled_gitea: apache_mods_enabled_gitea:
+3 -3
View File
@@ -1,9 +1,9 @@
--- ---
git_install_from_source: False git_install_from_source: false
ruby_install_from_source: False ruby_install_from_source: false
ruby_install_bundler: True ruby_install_bundler: true
nodejs_version: '24.x' nodejs_version: '24.x'
@@ -0,0 +1,28 @@
---
prometheus_prometheus_targets:
- "localhost:9090"
prometheus_node_exporter_targets:
- "10.7.10.15:9100"
- "10.7.10.16:9100"
- "10.7.10.26:9100"
- "10.7.10.96:9100"
- "10.7.10.97:9100"
- "10.7.10.101:9100"
- "10.7.10.102:9100"
- "10.7.10.105:9100"
- "10.7.10.106:9100"
- "10.7.10.107:9100"
- "10.7.20.65:9100"
- "10.7.20.66:9100"
- "10.7.20.67:9100"
- "10.7.20.68:9100"
- "10.7.20.69:9100"
- "ci-v2-arm1.int.metaunix.net:9100"
- "ci-v2-arm2.int.metaunix.net:9100"
- "ci-v2-arm3.int.metaunix.net:9100"
- "ks-v2.int.metaunix.net:9100"
- "lb-v3.int.metaunix.net:9100"
- "ns3.int.metaunix.net:9100"
- "ns4.int.metaunix.net:9100"
+1 -1
View File
@@ -25,7 +25,7 @@ apache_vhosts_munin:
DirectoryIndex index.html DirectoryIndex index.html
munin_local_conf_remove: True munin_local_conf_remove: true
munin_html_strategy: 'cgi' munin_html_strategy: 'cgi'
munin_graph_strategy: 'cgi' munin_graph_strategy: 'cgi'
munin_max_processes: 4 munin_max_processes: 4
+123
View File
@@ -0,0 +1,123 @@
---
### PHP config ###
php_install_composer: true
php_enable_php_fpm: true
php_webserver_daemon: "nginx"
# Ensure the socket directory and permissions allow Nginx access
php_fpm_pool_user: "nginx"
php_fpm_pool_group: "nginx"
php_fpm_listen_owner: "nginx"
php_fpm_listen_group: "nginx"
# Default Unix socket location on RHEL
php_fpm_listen: "/run/php-fpm/www.sock"
php_packages:
- php-cli
- php-common
- php-fpm
- php-gd
- php-ldap
- php-mbstring
- php-mysqlnd
- php-pdo
- php-pgsql
- php-xml
- php-pecl-zip
### Nginx config ###
nginx_vhosts:
# ----------------------------------------
# metaunix.net (Default Server)
# ----------------------------------------
- listen: "80 default_server"
server_name: "{{ ansible_fqdn }} metaunix.net www.metaunix.net www.int.metaunix.net"
root: "/nfs/web/www"
index: "index.html"
extra_parameters: |
location / {
try_files $uri $uri/ =404;
}
location ~ .well-known/acme-challenge/ {
root /nfs/web/acme;
try_files $uri =404;
}
# ----------------------------------------
# wiki.bitgoblin.tech (DokuWiki)
# ----------------------------------------
- listen: "80"
server_name: "wiki.bitgoblin.tech"
root: "/nfs/web/dokuwiki"
index: "index.php"
extra_parameters: |
location / {
index doku.php;
try_files $uri $uri/ @dokuwiki;
}
location @dokuwiki {
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
rewrite ^/(.*) /doku.php?id=$1 last;
}
location ~ ^/lib.*\.(gif|png|ico|jpg)$ {
expires 30d;
}
location ^~ /conf/ {
return 403;
}
location ^~ /data/ {
return 403;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:{{ php_fpm_listen }};
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
fastcgi_param SERVER_PORT 443;
fastcgi_param HTTP_X_FORWARDED_PROTO $http_x_forwarded_proto;
fastcgi_param HTTP_X_FORWARDED_SSL on;
fastcgi_param REDIRECT_STATUS 200;
}
location ~ .well-known/acme-challenge/ {
root /nfs/web/acme;
try_files $uri =404;
}
# ----------------------------------------
# yourls.bitgoblin.tech
# ----------------------------------------
- listen: "80"
server_name: "yourls.bitgoblin.tech u.bitgoblin.tech"
root: "/nfs/web/yourls"
index: "index.php"
extra_parameters: |
location / {
try_files $uri $uri/ /yourls-loader.php$is_args$args;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:{{ php_fpm_listen }};
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REDIRECT_STATUS 200;
}
location ~ .well-known/acme-challenge/ {
root /nfs/web/acme;
try_files $uri =404;
}
+39 -3
View File
@@ -21,22 +21,58 @@ lb-v3 ansible_host=lb-v3.int.metaunix.net
[kickstart_servers] [kickstart_servers]
ks-v2 ansible_host=ks-v2.int.metaunix.net ks-v2 ansible_host=ks-v2.int.metaunix.net
[monitoring_server]
pi5b2g ansible_host=10.7.10.106
[munin_masters] [munin_masters]
munin-v1 ansible_host=munin-v1.int.metaunix.net munin-v1 ansible_host=munin-v1.int.metaunix.net
[nameservers] [nameservers]
#ns1 ansible_host=ns1.int.metaunix.net ns1 ansible_host=ns1.int.metaunix.net
#ns2 ansible_host=ns2.int.metaunix.net ns2 ansible_host=ns2.int.metaunix.net
ns3 ansible_host=ns3.int.metaunix.net ns3 ansible_host=ns3.int.metaunix.net
ns4 ansible_host=ns4.int.metaunix.net ns4 ansible_host=ns4.int.metaunix.net
[orangepi]
orangepi3lts ansible_host=10.7.10.97
orangepi3zerow ansible_host=10.7.10.96
[raspberrypi]
backup-v2 ansible_host=10.7.10.26
ci-v2-arm1 ansible_host=ci-v2-arm1.int.metaunix.net
ci-v2-arm2 ansible_host=ci-v2-arm2.int.metaunix.net
ci-v2-arm3 ansible_host=ci-v2-arm3.int.metaunix.net
ks-v2 ansible_host=ks-v2.int.metaunix.net
lb-v3 ansible_host=lb-v3.int.metaunix.net
ns3 ansible_host=ns3.int.metaunix.net
ns4 ansible_host=ns4.int.metaunix.net
pitty-v1-pico ansible_host=10.7.10.16
pitty-v1-sw ansible_host=10.7.10.15
pi1b-1 ansible_host=10.7.10.101
pi1b-2 ansible_host=10.7.10.102
#pi1b-3 ansible_host=10.7.10.103
pi3b ansible_host=10.7.10.104
pi4b4g ansible_host=10.7.10.105
pi5b2g ansible_host=10.7.10.106
picm5-1 ansible_host=10.7.10.107
picam-1 ansible_host=10.7.20.65
pimusic-1 ansible_host=10.7.20.66
pimusic-2 ansible_host=10.7.20.67
pizero1 ansible_host=10.7.20.68
pi5b1g ansible_host=10.7.20.69
[serial_ttyd] [serial_ttyd]
pitty ansible_host=10.7.10.175 pitty-v1-sw ansible_host=10.7.10.15
pitty-v1-pico ansible_host=10.7.10.16
[smtp_servers] [smtp_servers]
smtp1 ansible_host=smtp1.int.metaunix.net smtp1 ansible_host=smtp1.int.metaunix.net
smtp2 ansible_host=smtp2.int.metaunix.net smtp2 ansible_host=smtp2.int.metaunix.net
[uptime_kuma]
orangepi3lts ansible_host=10.7.10.97
pi5b1g ansible_host=10.7.20.69
[web_servers] [web_servers]
www3 ansible_host=www3.int.metaunix.net www3 ansible_host=www3.int.metaunix.net
www4 ansible_host=www4.int.metaunix.net www4 ansible_host=www4.int.metaunix.net
+1 -1
View File
@@ -4,7 +4,7 @@
hosts: hosts:
- gitea_servers - gitea_servers
- munin_masters - munin_masters
become: True become: true
roles: roles:
- geerlingguy.apache - geerlingguy.apache
+8 -1
View File
@@ -1,8 +1,15 @@
--- ---
- name: Install and configure SSSD
hosts: all
become: true
roles:
- gballan.sssd
- name: Configure sudoers - name: Configure sudoers
hosts: all hosts: all
become: True become: true
roles: roles:
- arillso.sudoers - arillso.sudoers
+7 -7
View File
@@ -2,28 +2,28 @@
- name: Uninstall Puppet/OpenVox packages - name: Uninstall Puppet/OpenVox packages
hosts: all hosts: all
become: yes become: true
tasks: tasks:
- name: Uninstall puppet package - name: Uninstall puppet package
package: ansible.builtin.package:
name: 'puppet-agent' name: 'puppet-agent'
state: absent state: absent
- name: Uninstall puppet-release package - name: Uninstall puppet-release package
package: ansible.builtin.package:
name: 'puppet8-release' name: 'puppet8-release'
state: absent state: absent
- name: Uninstall openvox package - name: Uninstall openvox package
package: ansible.builtin.package:
name: 'openvox-agent' name: 'openvox-agent'
state: absent state: absent
- name: Uninstall openvox-release package - name: Uninstall openvox-release package
package: ansible.builtin.package:
name: 'openvox8-release' name: 'openvox8-release'
state: absent state: absent
- name: Disable Puppet Service if present - name: Disable Puppet Service if present
hosts: all hosts: all
become: yes become: true
tasks: tasks:
- name: Check if Puppet service exists - name: Check if Puppet service exists
ansible.builtin.service_facts: ansible.builtin.service_facts:
@@ -32,5 +32,5 @@
ansible.builtin.service: ansible.builtin.service:
name: puppet name: puppet
state: stopped state: stopped
enabled: False enabled: false
when: "'puppet.service' in services or 'puppet' in services" when: "'puppet.service' in services or 'puppet' in services"
+32
View File
@@ -0,0 +1,32 @@
---
- name: Run Sysbench Suite
hosts: all
become: true
tasks:
- name: Ensure sysbench is installed
ansible.builtin.package:
name: sysbench
state: present
tags: [always]
- name: CPU Benchmarks
tags: [cpu, sysbench_cpu]
block:
- name: Sysbench CPU (Single-thread)
ansible.builtin.command: sysbench cpu --cpu-max-prime=20000 --threads=1 run
register: sysbench_cpu_single
changed_when: false
- name: Sysbench CPU (Multi-thread)
ansible.builtin.command: sysbench cpu --cpu-max-prime=20000 --threads={{ ansible_processor_vcpus }} run
register: sysbench_cpu_multi
changed_when: false
- name: Memory Benchmarks
tags: [memory, sysbench_memory]
block:
- name: Sysbench Memory (Write throughput)
ansible.builtin.command: sysbench memory --memory-block-size=1M --memory-total-size=10G --memory-oper=write run
register: sysbench_mem_write
changed_when: false
+3 -3
View File
@@ -2,18 +2,18 @@
- name: Install Git - name: Install Git
hosts: gl_servers hosts: gl_servers
become: True become: true
roles: roles:
- geerlingguy.git - geerlingguy.git
- name: Install Ruby - name: Install Ruby
hosts: gl_servers hosts: gl_servers
become: True become: true
roles: roles:
- geerlingguy.ruby - geerlingguy.ruby
- name: Install Node.js - name: Install Node.js
hosts: gl_servers hosts: gl_servers
become: True become: true
roles: roles:
- geerlingguy.nodejs - geerlingguy.nodejs
+14 -2
View File
@@ -3,8 +3,20 @@
- name: Install and configure Docker - name: Install and configure Docker
hosts: hosts:
- ci_servers - ci_servers
- ci_runners - uptime_kuma
become: True become: true
roles: roles:
- geerlingguy.docker - geerlingguy.docker
- name: Ensure python3-docker is installed
hosts:
- ci_servers
- uptime_kuma
become: true
tasks:
- name: Install python3-docker
ansible.builtin.package:
name:
- python3-docker
state: present
+10
View File
@@ -0,0 +1,10 @@
---
- name: Deploy node_exporter across all fleet hosts
hosts: all
become: true
roles:
- role: prometheus.prometheus.node_exporter
vars:
node_exporter_web_listen_address: "0.0.0.0:9100"
+1 -1
View File
@@ -2,7 +2,7 @@
- name: Install Gitea - name: Install Gitea
hosts: gitea_servers hosts: gitea_servers
become: True become: true
roles: roles:
- roles-ansible.gitea - roles-ansible.gitea
+67
View File
@@ -0,0 +1,67 @@
---
- name: Deploy standalone Prometheus on Raspberry Pi 5
hosts: monitoring_server
become: true
vars:
# Bind to all interfaces on default port
prometheus_web_listen_address: "0.0.0.0:9090"
# Reduce retention to save storage/microSD wear (default is 15d)
prometheus_storage_retention: "60d"
# Self-scrape configuration
prometheus_scrape_configs:
- job_name: "prometheus"
metrics_path: "/metrics"
static_configs:
- targets: "{{ prometheus_prometheus_targets }}"
- job_name: "node_exporter"
metrics_path: "/metrics"
static_configs:
- targets: "{{ prometheus_node_exporter_targets }}"
roles:
- role: prometheus.prometheus.prometheus
- name: Deploy Grafana on Raspberry Pi 5
hosts: monitoring_server
become: true
pre_tasks:
- name: Ensure python3-debian is present for deb822 repository support
ansible.builtin.apt:
name: python3-debian
state: present
update_cache: true
roles:
- role: grafana.grafana.grafana
vars:
grafana_version: "latest"
# All grafana.ini sections now live under grafana_ini
grafana_ini:
server:
http_port: 3000
http_addr: "0.0.0.0"
security:
admin_user: "admin"
admin_password: "LimpBizkit6"
analytics:
reporting_enabled: false
check_for_updates: false
# Provision datasources directly
grafana_datasources:
- name: "Prometheus"
type: "prometheus"
access: "proxy"
url: "http://localhost:9090"
isDefault: true
editable: true
# Optional: install community plugins automatically
# grafana_plugins:
# - grafana-piechart-panel
+2 -2
View File
@@ -2,14 +2,14 @@
- name: Install Munin master - name: Install Munin master
hosts: munin_masters hosts: munin_masters
become: True become: true
roles: roles:
- geerlingguy.munin - geerlingguy.munin
- name: Install Munin node - name: Install Munin node
hosts: all hosts: all
become: True become: true
roles: roles:
- geerlingguy.munin-node - geerlingguy.munin-node
+20
View File
@@ -0,0 +1,20 @@
---
- name: Setup and mount NFS share
hosts: all
become: true
gather_facts: true
tasks:
- name: Ensure NFS client packages are installed
ansible.builtin.package:
name: "{{ 'nfs-common' if ansible_facts['os_family'] == 'Debian' else 'nfs-utils' }}"
state: present
- name: Ensure NFS share is mounted and persistent in fstab
ansible.posix.mount:
path: /nfs
src: nfs-v4.int.metaunix.net:/export/nfs
fstype: nfs
opts: rw,vers=4,_netdev,sync,hard,intr,rsize=8192,wsize=8192
state: mounted
+1 -1
View File
@@ -2,7 +2,7 @@
- name: Install Nginx - name: Install Nginx
hosts: web_servers hosts: web_servers
become: True become: true
roles: roles:
- geerlingguy.nginx - geerlingguy.nginx
+1 -1
View File
@@ -2,7 +2,7 @@
- name: Install NTP - name: Install NTP
hosts: all hosts: all
become: True become: true
roles: roles:
- geerlingguy.ntp - geerlingguy.ntp
+14 -14
View File
@@ -11,36 +11,36 @@
tasks: tasks:
- name: Update apt cache (Debian) - name: Update apt cache (Debian)
ansible.builtin.apt: ansible.builtin.apt:
update_cache: yes update_cache: true
cache_valid_time: 3600 cache_valid_time: 3600
when: ansible_os_family == "Debian" when: ansible_facts['os_family'] == "Debian"
- name: Upgrade all packages (Debian) - name: Upgrade all packages (Debian)
ansible.builtin.apt: ansible.builtin.apt:
upgrade: dist upgrade: dist
autoremove: yes autoremove: true
autoclean: yes autoclean: true
when: ansible_os_family == "Debian" when: ansible_facts['os_family'] == "Debian"
- name: Upgrade all packages (RedHat) - name: Upgrade all packages (RedHat) # noqa: package-latest
ansible.builtin.dnf: ansible.builtin.dnf:
name: "*" name: "*"
state: latest state: latest
update_cache: yes update_cache: true
when: ansible_os_family == "RedHat" when: ansible_facts['os_family'] == "RedHat"
- name: Check if reboot is required (Debian) - name: Check if reboot is required (Debian)
ansible.builtin.stat: ansible.builtin.stat:
path: /var/run/reboot-required path: /var/run/reboot-required
register: reboot_required_debian register: reboot_required_debian
when: ansible_os_family == "Debian" when: ansible_facts['os_family'] == "Debian"
- name: Check if reboot is required (RedHat) - name: Check if reboot is required (RedHat)
ansible.builtin.command: needs-restarting -r ansible.builtin.command: needs-restarting -r
register: reboot_required_redhat register: reboot_required_redhat
failed_when: False failed_when: false
changed_when: False changed_when: false
when: ansible_os_family == "RedHat" when: ansible_facts['os_family'] == "RedHat"
- name: Reboot Debian systems if required - name: Reboot Debian systems if required
ansible.builtin.reboot: ansible.builtin.reboot:
@@ -48,7 +48,7 @@
reboot_timeout: 600 reboot_timeout: 600
when: when:
- reboot_if_required - reboot_if_required
- ansible_os_family == "Debian" - ansible_facts['os_family'] == "Debian"
- reboot_required_debian.stat.exists - reboot_required_debian.stat.exists
- name: Reboot RedHat systems if required - name: Reboot RedHat systems if required
@@ -57,5 +57,5 @@
reboot_timeout: 600 reboot_timeout: 600
when: when:
- reboot_if_required - reboot_if_required
- ansible_os_family == "RedHat" - ansible_facts['os_family'] == "RedHat"
- reboot_required_redhat.rc == 1 - reboot_required_redhat.rc == 1
+5 -7
View File
@@ -1,17 +1,15 @@
--- ---
- hosts: all - name: Install common packages
become: True hosts: all
become: true
tasks: tasks:
- name: Install common packages on all hosts - name: Install common packages on all hosts
package: ansible.builtin.package:
name: "{{ packages_common }}" name: "{{ packages_common }}"
state: present state: present
- hosts: all
become: True
tasks:
- name: Install extra packages if listed - name: Install extra packages if listed
package: ansible.builtin.package:
name: "{{ packages_extra | default([]) }}" name: "{{ packages_extra | default([]) }}"
state: present state: present
+8
View File
@@ -0,0 +1,8 @@
---
- name: Install PHP
hosts: web_servers
become: true
roles:
- geerlingguy.php
+2
View File
@@ -1,3 +1,5 @@
---
- name: Test connectivity - name: Test connectivity
hosts: all hosts: all
+103
View File
@@ -0,0 +1,103 @@
---
- name: Install and configure Podman
hosts: ci_runners
become: true
vars:
# Packages common to both Debian and RHEL families
podman_base_packages:
- podman
- podman-docker
# Debian/Ubuntu specific packages
podman_debian_packages:
- podman-compose
# RHEL-family specific packages (adjust or add epel-release if compose is needed)
podman_rhel_packages: []
# Set to true if you need the Docker-compatible API socket (e.g., for Woodpecker CI)
podman_enable_socket: true
tasks:
- name: Gather distribution-specific facts
ansible.builtin.setup:
gather_subset:
- "!all"
- distribution
- os_family
- name: Install Podman packages on Debian/Ubuntu
ansible.builtin.apt:
name: "{{ podman_base_packages + podman_debian_packages }}"
state: present
update_cache: true
cache_valid_time: 3600
when: ansible_facts['os_family'] == 'Debian'
- name: Install Podman packages on RHEL/Rocky/AlmaLinux/CentOS
ansible.builtin.dnf:
name: "{{ podman_base_packages + podman_rhel_packages }}"
state: present
when: ansible_facts['os_family'] == 'RedHat'
- name: Enable and start system-wide Podman socket
ansible.builtin.systemd:
name: podman.socket
state: started
enabled: true
when: podman_enable_socket
- name: Verify Podman installation
ansible.builtin.command: podman --version
register: podman_version_output
changed_when: false
- name: Run Podman containers
hosts: ci_runners
become: true
tasks:
- name: Determine mount host paths
ansible.builtin.set_fact:
_mount_paths: >-
{{
_mount_paths | default([]) +
(item.value.volumes | map('regex_replace', ':.*$', '') | list)
}}
loop: "{{ podman_containers | default({}) | dict2items }}"
when:
- item.value.volumes is defined
- item.value.state | default('started') != 'absent'
- name: Check status of mount paths on host
ansible.builtin.stat:
path: "{{ item }}"
loop: "{{ _mount_paths | default([]) | unique }}"
register: _mount_stats
- name: Ensure container mount directories exist
ansible.builtin.file:
# If the target path exists and is a file/socket/link, create its parent dir.
# If it doesn't exist at all, create it as a directory.
path: "{{ (item.stat.exists and not item.stat.isdir) | ternary(item.item | dirname, item.item) }}"
state: directory
mode: "0755"
loop: "{{ _mount_stats.results }}"
# Skip creating anything if the file/socket already exists
when: not (item.stat.exists and not item.stat.isdir)
- name: Manage Podman containers
containers.podman.podman_container:
name: "{{ item.key }}"
image: "{{ item.value.image | default(omit) }}"
state: "{{ item.value.state | default('started') }}"
command: "{{ item.value.command | default(omit) }}"
ports: "{{ item.value.ports | default(omit) }}"
volumes: "{{ item.value.volumes | default(omit) }}"
env: "{{ item.value.env | default(omit) }}"
network: "{{ item.value.network | default(omit) }}"
privileged: "{{ item.value.privileged | default(false) }}"
recreate: "{{ item.value.recreate | default(false) }}"
generate_systemd: "{{ item.value.generate_systemd | default(omit) }}"
loop: "{{ podman_containers | default({}) | dict2items }}"
+30 -10
View File
@@ -1,12 +1,32 @@
--- ---
- import_playbook: ntp.yml - name: NTP
- import_playbook: base.yml import_playbook: ntp.yml
- import_playbook: auth.yml - name: Base states
- import_playbook: packages.yml import_playbook: base.yml
- import_playbook: munin.yml - name: Authentication
- import_playbook: gitea.yml import_playbook: auth.yml
- import_playbook: docker.yml - name: NFS Client
- import_playbook: apache.yml import_playbook: nfs_client.yml
- import_playbook: nginx.yml - name: Packages
- import_playbook: dev.yml import_playbook: packages.yml
- name: Grafana / Prometheus
import_playbook: grafana.yml
- name: node_exporter and others for Prometheus
import_playbook: exporters.yml
- name: Munin
import_playbook: munin.yml
- name: Gitea
import_playbook: gitea.yml
- name: Podman
import_playbook: podman.yml
- name: Docker
import_playbook: docker.yml
- name: PHP
import_playbook: php.yml
- name: Apache
import_playbook: apache.yml
- name: Nginx
import_playbook: nginx.yml
- name: Development playbook
import_playbook: dev.yml
+40
View File
@@ -0,0 +1,40 @@
---
- name: CPU Info
hosts: all
become: true
tasks:
- name: Show system CPU info
ansible.builtin.command: lscpu
register: cmd_output
changed_when: false
- name: Print stdout to terminal
ansible.builtin.debug:
var: cmd_output.stdout_lines
- name: RAM Info
hosts: all
become: true
tasks:
- name: Show free and used memory
ansible.builtin.command: free -h
register: cmd_output
changed_when: false
- name: Print stdout to terminal
ansible.builtin.debug:
var: cmd_output.stdout_lines
- name: Disk Info
hosts: all
become: true
tasks:
- name: Show mounted disks and their usage
ansible.builtin.command: df -h
register: cmd_output
changed_when: false
- name: Print stdout to terminal
ansible.builtin.debug:
var: cmd_output.stdout_lines
+23
View File
@@ -0,0 +1,23 @@
---
- name: Deploy Uptime Kuma 2
hosts: uptime_kuma
become: true
tasks:
- name: Ensure named Docker volume exists
community.docker.docker_volume:
name: uptime-kuma
state: present
- name: Run Uptime Kuma container
community.docker.docker_container:
name: uptime-kuma
image: louislam/uptime-kuma:2
state: started
restart_policy: unless-stopped
published_ports:
- "3001:3001"
volumes:
- uptime-kuma:/app/data
pull: true
+19
View File
@@ -1,12 +1,29 @@
collections: collections:
- name: ansible.posix - name: ansible.posix
version: 2.2.2
- name: community.general - name: community.general
version: 13.4.0
- name: community.docker
version: 5.3.0
- name: containers.podman
version: 1.20.2
- name: grafana.grafana
version: 6.1.0
- name: prometheus.prometheus
version: 0.30.1
roles: roles:
- name: gballan.sssd
src: gitea@git.metaunix.net:gballan/ansible-role-sssd.git
scm: git
version: v0.1.7
- src: arillso.sudoers - src: arillso.sudoers
version: 2.3.0 version: 2.3.0
- src: geerlingguy.apache - src: geerlingguy.apache
version: 4.2.0 version: 4.2.0
- src: geerlingguy.docker
version: 8.0.0
- src: geerlingguy.git - src: geerlingguy.git
version: 3.0.1 version: 3.0.1
- src: geerlingguy.munin - src: geerlingguy.munin
@@ -17,6 +34,8 @@ roles:
version: 3.3.0 version: 3.3.0
- src: geerlingguy.nodejs - src: geerlingguy.nodejs
version: 7.1.0 version: 7.1.0
- src: geerlingguy.php
version: 6.1.0
- src: geerlingguy.ntp - src: geerlingguy.ntp
version: 4.0.0 version: 4.0.0
- src: geerlingguy.ruby - src: geerlingguy.ruby