ansible: add meta requirements target, add check to bootstrap

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2021-05-10 15:29:38 +02:00
parent e50e7f7764
commit 657e8a098f
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
8 changed files with 30 additions and 18 deletions

View File

@ -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); \

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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