Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
ansible: add roles.py script to manage roles
Browse files Browse the repository at this point in the history
status-im/infra-template#5
Signed-off-by: Jakub Sokołowski <[email protected]>
  • Loading branch information
jakubgs committed Jun 13, 2024
1 parent dd4d254 commit d6ca823
Show file tree
Hide file tree
Showing 8 changed files with 414 additions and 94 deletions.
15 changes: 9 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,19 @@ PROVISIONER_ARCHIVE = $(PROVISIONER_NAME)-$(subst _,-,$(ARCH))_$(PROVISIONER_VER
PROVISIONER_URL = https://github.com/radekg/terraform-provisioner-ansible/releases/download/$(PROVISIONER_VERSION)/$(PROVISIONER_ARCHIVE)
PROVISIONER_PATH = $(TF_PLUGINS_DIR)/$(ARCH)/$(PROVISIONER_NAME)_$(PROVISIONER_VERSION)

all: requirements install-provisioner secrets init-terraform
all: roles-install install-provisioner secrets init-terraform
@echo "Success!"

requirements-install:
ansible-galaxy install --keep-scm-meta --ignore-errors --force -r ansible/requirements.yml
roles-install:
ansible/roles.py --install

requirements-check:
ansible/versioncheck.py
roles-check:
ansible/roles.py --check

requirements: requirements-install requirements-check
roles-update:
ansible/roles.py --update

roles: roles-install roles-check

$(PROVISIONER_PATH):
@mkdir -p $(TF_PLUGINS_DIR)/$(ARCH); \
Expand Down
2 changes: 1 addition & 1 deletion ansible/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
run_once: true
gather_facts: false
tasks:
- local_action: command ./versioncheck.py
- local_action: command ./roles.py --check
changed_when: false

- name: Bootstrap Python support for Ansible
Expand Down
2 changes: 1 addition & 1 deletion ansible/gitea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
run_once: true
gather_facts: false
tasks:
- local_action: command ./versioncheck.py
- local_action: command ./roles.py --check
changed_when: false

- name: Configure Gitea host
Expand Down
13 changes: 0 additions & 13 deletions ansible/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,43 @@
---
- name: infra-role-bootstrap-linux
src: [email protected]:status-im/infra-role-bootstrap-linux.git
scm: git

- name: infra-role-wireguard
src: [email protected]:status-im/infra-role-wireguard.git
scm: git

- name: infra-role-consul-service
src: [email protected]:status-im/infra-role-consul-service.git
scm: git

- name: infra-role-systemd-timer
src: [email protected]:status-im/infra-role-systemd-timer.git
scm: git

- name: infra-role-nginx
src: [email protected]:status-im/infra-role-nginx.git
version: 3043c998cbc92a634a71dc48363b3e2525696d26
scm: git

- name: infra-role-nginx-metrics
src: [email protected]:status-im/infra-role-nginx-metrics.git
version: fdc31d5b233b1b3b1bd46338a3c64e0dd08641cf
scm: git

- name: infra-role-origin-certs
src: [email protected]:status-im/infra-role-origin-certs.git
version: f2b061da8976444d6576b755578f0e799cde4372
scm: git

- name: infra-role-open-ports
src: [email protected]:status-im/infra-role-open-ports.git
version: ec9b3527285fb129cf0e65c5d6d17356eae6aa2d
scm: git

- name: infra-role-swap-file
src: [email protected]:status-im/infra-role-swap-file.git
version: ada5240a37f569997dec867c600681226b268074
scm: git

- name: infra-role-restic-backups
src: [email protected]:status-im/infra-role-restic-backups.git
version: af6b0d7c196f9f4fa590810ddcac2b7bcdf8a83e
scm: git

- name: infra-role-threatstack
src: [email protected]:status-im/infra-role-threatstack.git
version: 581bf6f1bd8b0d4873a77166b9ceb48a417565eb
scm: git

- name: infra-role-gitea
src: [email protected]:status-im/infra-role-gitea.git
version: 45d63139cff8e476d8792c9b258f715a0aafbdd7
scm: git
Loading

0 comments on commit d6ca823

Please sign in to comment.