diff --git a/.ansible-lint b/.ansible-lint index 340b103..760980a 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -12,6 +12,7 @@ profile: production # min, basic, moderate, safety, shared, production exclude_paths: - .dev_dir/dev_vars.yml - .dev_dir/example_dev_vars.yml + - .github/workflows/requirements.yml # due to schema[requirements] - playbooks/results/ - playbooks/aws_sdwan_config* - playbooks/azure_sdwan_config* diff --git a/.github/workflows/galaxy-importer.yml b/.github/workflows/galaxy-importer.yml index ae587ae..47ba7b4 100644 --- a/.github/workflows/galaxy-importer.yml +++ b/.github/workflows/galaxy-importer.yml @@ -21,10 +21,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 with: python-version: '3.10' diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 01b1192..f65e234 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -23,15 +23,18 @@ jobs: steps: - name: Check out the repository - uses: actions/checkout@v4 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 with: python-version: '3.10' + - name: Run check-yaml, end-of-file-fixer, trailing-whitespace + uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 + - name: Run ansible-lint - uses: ansible/ansible-lint@main # or version tag instead of 'main' + uses: ansible/ansible-lint@95382d398ea1744bf6bfa47b030f14c38b3f6957 # v24.7.0 - name: Install detect-secrets run: pip install detect-secrets==1.4.0 diff --git a/.github/workflows/release-from-tag.yml b/.github/workflows/release-from-tag.yml index fed55d6..7155864 100644 --- a/.github/workflows/release-from-tag.yml +++ b/.github/workflows/release-from-tag.yml @@ -14,10 +14,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 with: python-version: '3.10' diff --git a/.github/workflows/requirements.yml b/.github/workflows/requirements.yml new file mode 100644 index 0000000..0c9d152 --- /dev/null +++ b/.github/workflows/requirements.yml @@ -0,0 +1,33 @@ +# .github/workflows/requirements.yml +name: requirements.txt combatibility + +on: + pull_request: + + push: + branches: + - main + +permissions: read-all + +jobs: + install-requirements: + runs-on: ubuntu-latest + + strategy: + matrix: + python-version: ['3.10', '3.11', '3.12'] + + steps: + - name: Checkout repository + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 532cc5c..c0ae37c 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -23,7 +23,7 @@ jobs: permissions: id-token: write security-events: write - secrets: inherit + secrets: inherit # pragma: allowlist secret with: # Publish results of Scorecard analysis publish-results: true diff --git a/README.md b/README.md index 4bb5d10..2826b29 100644 --- a/README.md +++ b/README.md @@ -61,13 +61,13 @@ Current coverage: - [x] Installation via git repository link - [x] Migration to CiscoDevNet/Cisco Open - [x] Separate role for cloudinit templating +- [x] Share roles via Ansible Galaxy Future Goals: +- [ ] Support for cluster deployment - [ ] Provide AWX (web-based user interface) -- [ ] Share roles via Ansible Galaxy - [ ] Deployment on GCP -- [ ] Support for cluster deployment - [ ] Enhance cloud-init configuration (complex bringup) --- diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 05d0244..6cc3118 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -45,3 +45,11 @@ ansible-galaxy install -r requirements.yml ``` You can reuse existing playbooks to test your code changes. + +--- + +## Release process + +According to [release workflow inside .github workflows](../.github/workflows/release-from-tag.yml) collection publication to Ansible Galaxy will happen when admin of the repository will push new tag. +This tag must match version used in [galaxy.yml](../galaxy.yml) file. +Release will happen only if desired version was not published on Ansible Galaxy yet. diff --git a/galaxy.yml b/galaxy.yml index d39df26..1c95092 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,6 +1,6 @@ namespace: cisco name: sdwan_deployment -version: 0.1.1 +version: 0.2.0 readme: README.md authors: - Arkadiusz Cichon diff --git a/requirements.txt b/requirements.txt index 23558e8..32659de 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,13 +3,14 @@ ansible==9.4.0 ansible-core==2.16.5 applicationinsights==0.11.10 argcomplete==1.12.3 -azure-cli-core==2.34.0 +azure-cli-core==2.0.6 +azure-cli-nspkg==3.0.4 azure-cli-telemetry==1.0.6 azure-common==1.1.11 azure-containerregistry==1.1.0 azure-core==1.28.0 azure-graphrbac==0.61.1 -azure-identity==1.7.0 +azure-identity==1.16.1 azure-keyvault==4.2.0 azure-keyvault-certificates==4.7.0 azure-keyvault-keys==4.8.0 @@ -54,29 +55,30 @@ azure-mgmt-storage==19.0.0 azure-mgmt-trafficmanager==1.0.0b1 azure-mgmt-web==6.1.0 azure-nspkg==2.0.0 -azure-storage-blob==12.11.0 +azure-storage-blob==12.13.0 bcrypt==4.1.2 boto3==1.34.78 botocore==1.34.78 certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.3.2 +colorama==0.4.6 cryptography==42.0.5 humanfriendly==10.0 -idna==3.6 +idna==3.7 isodate==0.6.1 Jinja2==3.1.3 jmespath==1.0.1 knack==0.9.0 MarkupSafe==2.1.5 -msal==1.23.0 +msal==1.28.0 msal-extensions==0.3.1 msrest==0.7.1 msrestazure==0.6.4 netaddr==1.2.1 oauthlib==3.2.2 packaging==21.3 -paramiko==2.12.0 +paramiko==3.4.0 pkginfo==1.10.0 portalocker==1.7.1 psutil==5.9.8 @@ -89,10 +91,11 @@ pyparsing==3.1.2 PySocks==1.7.1 python-dateutil==2.9.0.post0 PyYAML==6.0.1 -requests==2.31.0 +requests==2.32.2 requests-oauthlib==2.0.0 resolvelib==1.0.1 s3transfer==0.10.1 +setuptools==72.1.0 six==1.16.0 tabulate==0.9.0 typing_extensions==4.11.0