mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-07-12 18:04:24 +03:00
80c2624454
Running `just add-inventory-host example.com 1.2.3.4` (or `make add-inventory-host domain=example.com ip=1.2.3.4`) adds a new host to the inventory, creating inventory/hosts and inventory/host_vars/matrix.DOMAIN/vars.yml from the example files, with strong secrets generated automatically. Existing configuration is never overwritten. The command refuses to run if the host is already in the inventory, so it can also be used for adding more hosts later. Based on the idea proposed in https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/4682 by @Ser5 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
19 lines
661 B
Makefile
19 lines
661 B
Makefile
# SPDX-FileCopyrightText: 2022 Slavi Pantaleev
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
.PHONY: roles lint add-inventory-host
|
|
|
|
help: ## Show this help.
|
|
@grep -F -h "##" $(MAKEFILE_LIST) | grep -v grep | sed -e 's/\\$$//' | sed -e 's/##//'
|
|
|
|
add-inventory-host: ## Adds a new host to the inventory, creating the inventory files if necessary (e.g. `make add-inventory-host domain=example.com ip=1.2.3.4`)
|
|
@./bin/add-inventory-host.sh "$(domain)" "$(ip)"
|
|
|
|
roles: ## Pull roles
|
|
rm -rf roles/galaxy
|
|
ansible-galaxy install -r requirements.yml -p roles/galaxy/ --force
|
|
|
|
lint: ## Runs ansible-lint against all roles in the playbook
|
|
ansible-lint roles/custom
|