diff --git a/.gitignore b/.gitignore index 6c9f051..5830af1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ .*~ venv .task +collections/ansible_collections/* +!collections/ansible_collections/nullified collections/ansible_collections/*/*/tests/* collections/ansible_collections/*/*/logs/* !collections/ansible_collections/*/*/tests/config.yml diff --git a/Taskfile.yml b/Taskfile.yml index 968f0f4..e9d6036 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -8,7 +8,7 @@ vars: MOLECULE_DIR: '{{.ROOT_DIR}}/collections/ansible_collections/nullified/infrastructure/extensions' tasks: - venv:setup: + setup:venv: desc: install a Python3 virtualenv and all the required ansible / molecule dependencies. cmds: - | @@ -19,6 +19,17 @@ tasks: status: - test -d venv + setup:ansible: + desc: install ansible galaxy collections + cmds: + - '{{.PYTHON_WRAPPER}} ansible-galaxy collection install -r ansible_galaxy-requirements.yml' + + setup: + desc: set up environment for Python virtualenv and ansible dependencies + cmds: + - task: 'setup:venv' + - task: 'setup:ansible' + test:modules: desc: run `ansible-test sanity` on collections to find common issues for modules and collections dir: collections/ansible_collections diff --git a/ansible_galaxy-requirements.yml b/ansible_galaxy-requirements.yml new file mode 100644 index 0000000..1e535cf --- /dev/null +++ b/ansible_galaxy-requirements.yml @@ -0,0 +1,4 @@ +--- +collections: + - name: kubernetes.core + version: 3.0.0 diff --git a/collections/ansible_collections/nullified/infrastructure/extensions/molecule/default/requirements.yml b/collections/ansible_collections/nullified/infrastructure/extensions/molecule/default/requirements.yml index 78b3f09..6a4a42e 100644 --- a/collections/ansible_collections/nullified/infrastructure/extensions/molecule/default/requirements.yml +++ b/collections/ansible_collections/nullified/infrastructure/extensions/molecule/default/requirements.yml @@ -1,3 +1,4 @@ collections: - community.docker - ansible.netcommon + - kubernetes.core