Skip to content

Commit

Permalink
Merge pull request #26 from CiscoDevNet/jk-dev
Browse files Browse the repository at this point in the history
Updated tests to current Ansible stable versions
  • Loading branch information
jasonking3 authored Feb 26, 2023
2 parents a357501 + 5104919 commit 9ccc0e6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ jobs:
ansible:
# It's important that Sanity is tested against all stable-X.Y branches
# Testing against `devel` may fail as new tests are added.
# - stable-2.9 # Only if your collection supports Ansible 2.9
- stable-2.10
- stable-2.11
- stable-2.13
- stable-2.14
- devel
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Makefile
PYTHON_EXE = python3
PYTHON_EXE = python3.10
COLLECTION_NAME="cisco.cml"
COLLECTION_VERSION := $(shell awk '/^version:/{print $$NF}' galaxy.yml)
TARBALL_NAME=cisco-cml-${COLLECTION_VERSION}.tar.gz
Expand Down Expand Up @@ -40,10 +40,10 @@ test: $(VENV) $(TARBALL_NAME) ## Run Sanity Tests
ansible-galaxy collection install --force $(TARBALL_NAME) -p ./ansible_collections
cd ./ansible_collections/cisco/cml && git init .
$(VENV_BIN)/pip uninstall -y ansible-base
$(VENV_BIN)/pip install https://github.com/ansible/ansible/archive/stable-2.10.tar.gz --disable-pip-version-check
$(VENV_BIN)/pip install https://github.com/ansible/ansible/archive/stable-2.13.tar.gz --disable-pip-version-check
cd ./ansible_collections/cisco/cml && ../../../$(VENV_BIN)/ansible-test sanity --docker -v --color
$(VENV_BIN)/pip uninstall -y ansible-base
$(VENV_BIN)/pip install https://github.com/ansible/ansible/archive/stable-2.11.tar.gz --disable-pip-version-check
$(VENV_BIN)/pip install https://github.com/ansible/ansible/archive/stable-2.14.tar.gz --disable-pip-version-check
cd ./ansible_collections/cisco/cml && ../../../$(VENV_BIN)/ansible-test sanity --docker -v --color
$(VENV_BIN)/pip uninstall -y ansible-base
$(VENV_BIN)/pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
Expand Down
1 change: 0 additions & 1 deletion plugins/modules/cml_lab.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
from ansible_collections.cisco.cml.plugins.module_utils.cml_utils import cmlModule, cml_argument_spec
from ansible.module_utils.basic import AnsibleModule, env_fallback
import os
import traceback


def run_module():
Expand Down
1 change: 0 additions & 1 deletion plugins/modules/cml_lab_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
var: results
"""

import traceback
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.cisco.cml.plugins.module_utils.cml_utils import cmlModule, cml_argument_spec

Expand Down
1 change: 0 additions & 1 deletion plugins/modules/cml_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
config: "{{ day0_config | default(omit) }}"
"""

import traceback
from ansible.module_utils.basic import AnsibleModule, env_fallback
from ansible_collections.cisco.cml.plugins.module_utils.cml_utils import cmlModule, cml_argument_spec

Expand Down

0 comments on commit 9ccc0e6

Please sign in to comment.