Skip to content

Commit

Permalink
Bump molecule version
Browse files Browse the repository at this point in the history
Add ansible collection specific requirements since they are no more
installed by default. Also, installing molecule-podman cause error
(ansible/molecule#3895)
  • Loading branch information
fauust committed Apr 26, 2023
1 parent a7b1c29 commit 9ab2a3b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.venv
.vendor
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
VENV_DIR := .venv
VENDOR_DIR := .vendor
SHELL := /usr/bin/env bash
.DEFAULT_GOAL := help

Expand All @@ -10,19 +11,24 @@ venv: ## Create python3 venv if it does not exists
[[ -d $(VENV_DIR) ]] || $(shell command -v python3) -m venv $(VENV_DIR)

install: ## Install all necessary tools
$(MAKE) \
venv \
install-pip-packages
$(MAKE) venv
$(MAKE) install-pip-packages
$(MAKE) install-galaxy
@echo -e "\n--> You should now activate the python3 venv with:"
@echo -e "source $(VENV_DIR)/bin/activate"

install-pip-packages: ## Install python3 requirements
$(info --> Install requirements via `pip3`)
@( \
source $(VENV_DIR)/bin/activate; \
pip3 install -U pip; \
pip3 install -r requirements.txt; \
)

install-galaxy: ## Install galaxy requirements
$(info --> Install galaxy requirements)
ansible-galaxy collection install -r requirements.yml --force -p $(VENDOR_DIR)/collections

upgrade-pip-packages: ## Upgrade python3 requirements
$(shell command -v pip3) install -U -r requirements.txt

Expand All @@ -40,3 +46,4 @@ pre-commit-run-all: ## Run pre-commit on the whole repository

clean: ## Clean venv
[[ ! -d $(VENV_DIR) ]] || rm -rf $(VENV_DIR)
[[ ! -d $(VENDOR_DIR) ]] || rm -rf $(VENDOR_DIR)
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ansible
molecule==4.0.*
molecule-podman
ansible-core
molecule
molecule-plugins
4 changes: 4 additions & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
collections:
- name: community.mysql
- name: containers.podman

0 comments on commit 9ab2a3b

Please sign in to comment.