Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* text=auto
*.py text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
8 changes: 4 additions & 4 deletions .github/workflows/galaxy-importer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up Python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.10'
python-version: '3.13'

- name: Get collection namespace and name from galaxy.yml
id: collection-name
Expand All @@ -47,7 +47,7 @@ jobs:

- name: Install Ansible and importer
run: |
pip install ansible==9.4.0
pip install ansible==14.3.1
pip install ansible-importer
pip install galaxy-importer

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
python-version: ['3.14']
defaults:
run:
shell: sh

steps:
- name: Check out the repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up Python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.10'
python-version: '3.14'

- uses: isort/isort-action@f14e57e1d457956c45a19c05a89cccdf087846e5 # v1.1.0
with:
Expand All @@ -36,10 +36,10 @@ jobs:
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

- name: Run ansible-lint
uses: ansible/ansible-lint@95382d398ea1744bf6bfa47b030f14c38b3f6957 # v24.7.0
uses: ansible/ansible-lint@665d9e07a1943254d2910faffc106adaf7ea7294 # v26.8.0

- name: Install detect-secrets
run: pip install detect-secrets==1.4.0
run: pip install detect-secrets==1.5.0

- name: Run detect-secrets
run: detect-secrets scan
8 changes: 4 additions & 4 deletions .github/workflows/release-from-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up Python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.10'
python-version: '3.13'

- name: Get collection version from galaxy.yml
id: collection-version
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:

- name: Install Ansible
run: |
pip install ansible==9.4.0
pip install ansible==14.3.1

- name: Build collection
run: |
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# .github/workflows/requirements.yml
name: requirements.txt combatibility
name: requirements.txt compatibility

on:
pull_request:
Expand All @@ -16,18 +16,19 @@ jobs:

strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
python-version: ['3.12', '3.13', '3.14']

steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt --no-deps
pip install -r requirements.txt
ansible-galaxy collection install -r requirements.yml --force
38 changes: 38 additions & 0 deletions .github/workflows/sanity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Ansible sanity

on:
pull_request:
push:
branches:
- main
schedule:
- cron: "23 9 * * 1"
workflow_dispatch:

permissions: read-all

jobs:
sanity:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.13", "3.14"]

steps:
- name: Check out the collection
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: ansible_collections/cisco/sdwan

- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "${{ matrix.python-version }}"

- name: Install ansible-test
run: python -m pip install "ansible==14.3.1"

- name: Run collection sanity tests
working-directory: ansible_collections/cisco/sdwan
run: ansible-test sanity --python "${{ matrix.python-version }}" --color yes
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v6.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/ansible-community/ansible-lint.git
rev: v24.2.1 # latest release tag from https://github.com/ansible-community/ansible-lint/releases/
rev: v26.8.0
hooks:
- id: ansible-lint
files: \.(yaml|yml)$

- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
rev: v1.5.0
hooks:
- id: detect-secrets
42 changes: 23 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ This project is cross-platform and can be set up on the following operating syst

### Python requirement

Supported version: Python >=3.10+
Current tested versions: Python 3.12-3.14

- Due to [ansible-core==2.16](https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix) requirement, this collection requires Python 3.10 or greater.
- The latest tested stack is Ansible 14.3.1 with ansible-core 2.21.3.
- Older automation environments remain governed by `meta/runtime.yml`; use the
current `requirements.txt` and `requirements.yml` for the maintained stack.

### Cloud authentication requirement

Expand All @@ -99,7 +101,7 @@ Current version of the full workflow for bringup SD-WAN assumes that users are f

## Installing this collection

### Install by cloning this repostiory - recommended way
### Install by cloning this repository - recommended way

You can install collection by first cloning this repository:

Expand All @@ -108,12 +110,12 @@ git clone git@github.com:cisco-en-programmability/ansible-collection-sdwan.git
```

Then setting your python environment.
Recommended way: use supported version of Python (>=3.10) and set up your environment with:
Recommended way: use a tested version of Python (3.12-3.14) and set up your environment with:

```bash
python3 -m venv <your-venv-name>
source <your-venv-name>/bin/activate
pip install -r requirements.txt --no-deps
python -m pip install -r requirements.txt
```

And then install ansible requirements:
Expand All @@ -124,7 +126,7 @@ ansible-galaxy install -r requirements.yml

### Install with Ansible Galaxy

***Note*** that when installing this collection with `ansible-galaxy` command, it will be placed inside your system collections path. That migth introduce additional complexity for using configuration files etc.
***Note*** that when installing this collection with `ansible-galaxy`, it will be placed inside your configured collections path. That might introduce additional complexity for using configuration files.

You can install this collection with the Ansible Galaxy CLI (requires `ansible` package installed)

Expand All @@ -133,7 +135,7 @@ ansible-galaxy collection install cisco.sdwan
```

The python module dependencies are not installed by ansible-galaxy. They can be manually installed using pip.
Recommended way: use supported version of Python (>=3.10) and set up your environment with:
Recommended way: use a tested version of Python (3.12-3.14) and set up your environment with:

```bash
python3 -m venv <your-venv-name>
Expand All @@ -143,14 +145,22 @@ source <your-venv-name>/bin/activate
And then install python requirements:

```bash
pip install -r requirements.txt --no-deps
python -m pip install -r requirements.txt
```

</br></br>

***Note***: For python packages installation troubleshooting see [python-packages-installation](#5-python-packages-installation)

Verify that your ansible version is using python modules from vevn by using test playbook:
For Azure deployments, also install the Python dependencies shipped by the
installed `azure.azcollection` collection. The current provider dependency set
contains a pinned prerelease package, so allow prereleases explicitly:

```bash
python -m pip install --pre -r ~/.ansible/collections/ansible_collections/azure/azcollection/requirements.txt
```

Verify that your Ansible version is using Python modules from the virtual environment by using the test playbook:

For AWS:

Expand Down Expand Up @@ -287,16 +297,10 @@ Ansible defaults to installing the collection in `~/.ansible/collections`. This

### 5. Python packages installation

Python packages requirements are formed to include all dependencies.
Therefore if you face issues with installation, note that there is known confict:

```log
The user requested packaging
catalystwan 0.31.2 depends on packaging<24.0 and >=23.0
azure-cli-core 2.34.0 depends on packaging<22.0 and >=20.9
```

solved by using: `pip install -r requirements.txt --no-deps` command.
Install `requirements.txt` normally so that pip resolves and installs transitive
dependencies. The historical `packaging` conflict between catalystwan 0.31.2
and azure-cli-core 2.34.0 no longer applies to the maintained dependency set.
Install the Azure collection's own requirements with `--pre` as shown above.

---

Expand Down
3 changes: 2 additions & 1 deletion ansible.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[defaults]
# vault_password_file = /path/to/vault/password/file
stdout_callback = yaml
stdout_callback = default
callback_result_format = yaml
bin_ansible_callbacks = True
callbacks_enabled = profile_tasks
remote_tmp = /tmp/.ansible_remote/tmp
Expand Down
19 changes: 13 additions & 6 deletions galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace: cisco
name: sdwan
version: 0.3.6
version: 0.3.7
readme: README.md
authors:
- Arkadiusz Cichon <acichon@cisco.com>
Expand All @@ -21,9 +21,16 @@ tags:
- networking

dependencies:
"cisco.sdwan_deployment": ">=0.1.1"
"cisco.catalystwan": ">=0.1.1"
"amazon.aws": ">=6.5.0"
"azure.azcollection": ">=1.19.0"
"cisco.sdwan_deployment": ">=0.3.3"
"cisco.catalystwan": ">=0.3.2"
"amazon.aws": ">=11.4.0"
"azure.azcollection": ">=3.21.0"

build_ignore: []
build_ignore:
- .git
- .github
- .pytest_cache
- .venv
- "**/__pycache__"
- "**/*.pyc"
- "*.tar.gz"
4 changes: 2 additions & 2 deletions meta/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

collections:
- name: amazon.aws
version: 6.5.0
version: 11.4.0
- name: azure.azcollection
version: 1.19.0
version: 3.21.0
- name: git@github.com:cisco-en-programmability/ansible-collection-catalystwan.git
type: git
version: main
Expand Down
Loading
Loading