From 657e8a098fea4057f880966bd2e4a24cdac1f637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Mon, 10 May 2021 15:29:38 +0200 Subject: [PATCH] ansible: add meta requirements target, add check to bootstrap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- Makefile | 4 +++- ansible/bootstrap.yml | 10 ++++++++++ ansible/geth.yml | 6 +++--- ansible/logs.yml | 6 +++--- ansible/mainnet.yml | 4 ++-- ansible/prater.yml | 6 +++--- ansible/pyrmont.yml | 6 +++--- ansible/rayonism.yml | 6 +++--- 8 files changed, 30 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index 8e79699..4aa325b 100644 --- a/Makefile +++ b/Makefile @@ -19,12 +19,14 @@ PROVISIONER_PATH = $(TF_PLUGINS_DIR)/$(ARCH)/$(PROVISIONER_NAME)_$(PROVISIONER_V all: requirements install-provisioner secrets init-terraform @echo "Success!" -requirements: +requirements-install: ansible-galaxy install --keep-scm-meta --ignore-errors --force -r ansible/requirements.yml requirements-check: ansible/versioncheck.py +requirements: requirements-install requirements-check + $(PROVISIONER_PATH): @mkdir -p $(TF_PLUGINS_DIR)/$(ARCH); \ wget -q $(PROVISIONER_URL) -O $(PROVISIONER_PATH); \ diff --git a/ansible/bootstrap.yml b/ansible/bootstrap.yml index 37f1bc8..f6b636e 100644 --- a/ansible/bootstrap.yml +++ b/ansible/bootstrap.yml @@ -9,6 +9,16 @@ # # This is run on every newly provisioned host. # +- name: Verify Ansible versions + hosts: all + tags: always + become: false + run_once: true + gather_facts: false + tasks: + - local_action: command ./versioncheck.py + changed_when: false + - name: Bootstrap Python support for Ansible become: true gather_facts: False diff --git a/ansible/geth.yml b/ansible/geth.yml index 3b060b5..1fbd52a 100644 --- a/ansible/geth.yml +++ b/ansible/geth.yml @@ -1,9 +1,9 @@ --- -- name: 'Verify Ansible versions' +- name: Verify Ansible versions hosts: all - run_once: true - connection: local tags: always + become: false + run_once: true gather_facts: false tasks: - local_action: command ./versioncheck.py diff --git a/ansible/logs.yml b/ansible/logs.yml index 8f84005..003a300 100644 --- a/ansible/logs.yml +++ b/ansible/logs.yml @@ -1,9 +1,9 @@ --- -- name: 'Verify Ansible versions' +- name: Verify Ansible versions hosts: all - run_once: true - connection: local tags: always + become: false + run_once: true gather_facts: false tasks: - local_action: command ./versioncheck.py diff --git a/ansible/mainnet.yml b/ansible/mainnet.yml index ec55c5e..206a558 100644 --- a/ansible/mainnet.yml +++ b/ansible/mainnet.yml @@ -1,9 +1,9 @@ --- - name: 'Verify Ansible versions' hosts: all - run_once: true - connection: local tags: always + become: false + run_once: true gather_facts: false tasks: - local_action: command ./versioncheck.py diff --git a/ansible/prater.yml b/ansible/prater.yml index 3b7ed39..d6b3df5 100644 --- a/ansible/prater.yml +++ b/ansible/prater.yml @@ -1,9 +1,9 @@ --- -- name: 'Verify Ansible versions' +- name: Verify Ansible versions hosts: all - run_once: true - connection: local tags: always + become: false + run_once: true gather_facts: false tasks: - local_action: command ./versioncheck.py diff --git a/ansible/pyrmont.yml b/ansible/pyrmont.yml index 26dc207..8d90a4f 100644 --- a/ansible/pyrmont.yml +++ b/ansible/pyrmont.yml @@ -1,9 +1,9 @@ --- -- name: 'Verify Ansible versions' +- name: Verify Ansible versions hosts: all - run_once: true - connection: local tags: always + become: false + run_once: true gather_facts: false tasks: - local_action: command ./versioncheck.py diff --git a/ansible/rayonism.yml b/ansible/rayonism.yml index 861ed8b..3715df7 100644 --- a/ansible/rayonism.yml +++ b/ansible/rayonism.yml @@ -1,9 +1,9 @@ --- -- name: 'Verify Ansible versions' +- name: Verify Ansible versions hosts: all - run_once: true - connection: local tags: always + become: false + run_once: true gather_facts: false tasks: - local_action: command ./versioncheck.py