diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index c235de88..0c6b880f 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -10,4 +10,5 @@ liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username otechie: # Replace with a single Otechie username lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry +buy_me_a_coffee: johnmcc custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/workflows/ansible-test-windows.yml b/.github/workflows/ansible-test-windows.yml index d764d601..56c53726 100644 --- a/.github/workflows/ansible-test-windows.yml +++ b/.github/workflows/ansible-test-windows.yml @@ -46,28 +46,18 @@ jobs: matrix: os: - windows-2022 + wsl: + - Ubuntu-24.04 ansible: - - stable-2.13 - - stable-2.14 - - stable-2.15 - stable-2.16 + - stable-2.17 - devel python: - python3 - - python3.10 group: # windows/group/#/ - "1" - "2" #- '3' - exclude: - - ansible: stable-2.13 - python: python3.10 - - ansible: stable-2.14 - python: python3.10 - - ansible: stable-2.15 - python: python3.10 - - ansible: devel - python: python3 defaults: run: shell: wsl-bash {0} @@ -104,10 +94,10 @@ jobs: shell: cmd run: echo 127.0.0.1 sqlserver >> "%WinDir%\System32\Drivers\etc\hosts" - - uses: Vampire/setup-wsl@v3.0.0 + - uses: Vampire/setup-wsl@v3.1.1 with: - distribution: Ubuntu-22.04 - update: "true" + distribution: ${{ matrix.wsl }} + update: "false" use-cache: "true" additional-packages: | git @@ -141,9 +131,11 @@ jobs: $ws = ConvertTo-LinuxPathCrappy -LiteralPath "${{ github.workspace }}" Add-Content -LiteralPath $env:GITHUB_ENV -Value "GHWS=$ws" + # Override break-sys-pkg defaults, because we don't need to bother with python venv for CI - name: Install ansible-base (${{ matrix.ansible }}) run: | - ${{ matrix.python }} -m pip install --upgrade pip setuptools pypsrp --disable-pip-version-check --retries 10 + ${{ matrix.python }} -m pip config set global.break-system-packages true + ${{ matrix.python }} -m pip install --upgrade setuptools pypsrp --disable-pip-version-check --retries 10 ${{ matrix.python }} -m pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check --retries 10 - name: Install collection dependencies @@ -190,6 +182,6 @@ jobs: ansible-test coverage xml -v --requirements # See the reports at https://codecov.io/gh/lowlydba/lowlydba.sqlserver - - uses: codecov/codecov-action@v4.1.0 + - uses: codecov/codecov-action@v4.5.0 with: fail_ci_if_error: false diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index 242c7a64..f63a8db9 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -68,7 +68,7 @@ jobs: path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} - name: Run confidence tests - uses: ansible-community/ansible-test-gh-action@v1.14.1 + uses: ansible-community/ansible-test-gh-action@v1.15.0 with: ansible-core-version: ${{ matrix.ansible }} testing-type: sanity @@ -79,7 +79,7 @@ jobs: working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} # See the reports at https://codecov.io/gh/lowlydba/lowlydba.sqlserver - - uses: codecov/codecov-action@v4.1.0 + - uses: codecov/codecov-action@v4.5.0 with: fail_ci_if_error: false @@ -128,7 +128,7 @@ jobs: # Prevent dbatools v2+ issues with newer docker image for 2.13 - name: Run integration tests - v2.13 workaround if: ${{ matrix.ansible == 'stable-2.13' }} - uses: ansible-community/ansible-test-gh-action@v1.14.1 + uses: ansible-community/ansible-test-gh-action@v1.15.0 with: docker-image: 'quay.io/ansible/default-test-container:6.13.0' ansible-core-version: ${{ matrix.ansible }} @@ -139,7 +139,7 @@ jobs: - name: Run integration tests if: ${{ matrix.ansible != 'stable-2.13'}} - uses: ansible-community/ansible-test-gh-action@v1.14.1 + uses: ansible-community/ansible-test-gh-action@v1.15.0 with: ansible-core-version: ${{ matrix.ansible }} #target-python-version: ${{ matrix.python }} @@ -153,6 +153,6 @@ jobs: working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} # See the reports at https://codecov.io/gh/lowlydba/lowlydba.sqlserver - - uses: codecov/codecov-action@v4.1.0 + - uses: codecov/codecov-action@v4.5.0 with: fail_ci_if_error: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 201875bc..33773fb9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -69,7 +69,7 @@ jobs: - name: Create Release id: create_release - uses: softprops/action-gh-release@v2.0.0 + uses: softprops/action-gh-release@v2.0.8 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a9c7adc6..fa412ffc 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,31 @@ lowlydba.sqlserver Release Notes .. contents:: Topics +v2.3.3 +====== + +Release Summary +--------------- + +Minor bugfix for ag listener input types, thanks @daarrn for the contribution! + +Bugfixes +-------- + +- fixed the expected type of the ip_address, subnet_ip, and subnet_mask parameters to be lists instead of strings (lowlydba.sqlserver.ag_listener) + +v2.3.2 +====== + +Release Summary +--------------- + +Small fix for documentation and upstream fix available in dbatools v2.1.9. + +Bugfixes +-------- + +- Update documentation for agent_job_schedule to reflect proper input formatting. (https://github.com/lowlydba/lowlydba.sqlserver/pull/229) v2.3.2 ====== diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 57c71a1e..a8a45ded 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -494,3 +494,14 @@ releases: - 2-3-2-release-summary.yml - 229-docs-update.yml release_date: '2024-03-09' + 2.3.3: + changes: + bugfixes: + - fixed the expected type of the ip_address, subnet_ip, and subnet_mask parameters + to be lists instead of strings (lowlydba.sqlserver.ag_listener) + release_summary: Minor bugfix for ag listener input types, thanks @daarrn for + the contribution! + fragments: + - 2-3-3-release-summary.yml + - 245-ag_listener-ip_address-fix.yml + release_date: '2024-06-06' diff --git a/galaxy.yml b/galaxy.yml index ed8ca71c..dd7ab08d 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -2,7 +2,7 @@ namespace: lowlydba name: sqlserver -version: 2.3.2 +version: 2.3.3 readme: README.md authors: - John McCall (github.com/lowlydba) diff --git a/plugins/modules/ag_listener.ps1 b/plugins/modules/ag_listener.ps1 index e20238ed..21cc0553 100644 --- a/plugins/modules/ag_listener.ps1 +++ b/plugins/modules/ag_listener.ps1 @@ -15,9 +15,9 @@ $spec = @{ options = @{ ag_name = @{type = 'str'; required = $true } listener_name = @{type = 'str'; required = $true } - ip_address = @{type = 'str'; required = $false } - subnet_ip = @{type = 'str'; required = $false } - subnet_mask = @{type = 'str'; required = $false; default = '255.255.255.0' } + ip_address = @{type = 'list'; elements = 'str'; required = $false } + subnet_ip = @{type = 'list'; elements = 'str'; required = $false } + subnet_mask = @{type = 'list'; elements = 'str'; required = $false; default = '255.255.255.0' } port = @{type = 'int'; required = $false; default = 1433 } dhcp = @{type = 'bool'; required = $false; default = $false } state = @{type = "str"; required = $false; default = "present"; choices = @("present", "absent") } diff --git a/plugins/modules/ag_listener.py b/plugins/modules/ag_listener.py index 12f0ec63..e835678a 100644 --- a/plugins/modules/ag_listener.py +++ b/plugins/modules/ag_listener.py @@ -25,17 +25,20 @@ ip_address: description: - IP address(es) of the listener. Comma separated if multiple. - type: str + type: list + elements: str required: false subnet_ip: description: - Subnet IP address(es) of the listener. Comma separated if multiple. - type: str + type: list + elements: str required: false subnet_mask: description: - Sets the subnet IP mask(s) of the availability group listener. Comma separated if multiple. - type: str + type: list + elements: str required: false default: 255.255.255.0 port: @@ -71,9 +74,13 @@ sql_instance_primary: sql-01.myco.io ag_name: AG_MyDatabase listener_name: aglMyDatabase - ip_address: 10.0.20.20,10.1.77.77 - subnet_ip: 255.255.252.0 - subnet_mask: 255.255.255.0 + ip_address: + - 10.0.20.20 + - 10.1.77.77 + subnet_ip: + - 255.255.252.0 + subnet_mask: + - 255.255.255.0 ''' RETURN = r''' diff --git a/plugins/modules/spn.py b/plugins/modules/spn.py index 0fabb934..d08d825b 100644 --- a/plugins/modules/spn.py +++ b/plugins/modules/spn.py @@ -52,9 +52,13 @@ sql_instance_primary: sql-01.myco.io ag_name: AG_MyDatabase listener_name: aglMyDatabase - ip_address: 10.0.20.20,10.1.77.77 - subnet_ip: 255.255.252.0 - subnet_mask: 255.255.255.0 + ip_address: + - 10.0.20.20 + - 10.1.77.77 + subnet_ip: + - 255.255.252.0 + subnet_mask: + - 255.255.255.0 - name: Add SPN for new AG listener on port 1433 lowlydba.sqlserver.spn: diff --git a/tests/integration/targets/win_ag_listener/tasks/main.yml b/tests/integration/targets/win_ag_listener/tasks/main.yml index b4142a48..68604997 100644 --- a/tests/integration/targets/win_ag_listener/tasks/main.yml +++ b/tests/integration/targets/win_ag_listener/tasks/main.yml @@ -25,8 +25,10 @@ ag_name: "{{ ag_name }}" listener_name: "{{ listener_name }}" port: "{{ port }}" - ip_address: "192.168.6.9" - subnet_mask: "255.255.255.0" + ip_address: + - "192.168.6.9" + subnet_mask: + - "255.255.255.0" tags: ["ag_listener"] block: - name: Enable hadr