Skip to content

Commit

Permalink
Merge branch 'main' into fix-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lowlydba committed Sep 7, 2024
2 parents 9c96308 + 76dec6b commit 5d2fd36
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 39 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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']
28 changes: 10 additions & 18 deletions .github/workflows/ansible-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
10 changes: 5 additions & 5 deletions .github/workflows/ansible-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
======
Expand Down
11 changes: 11 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/ag_listener.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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") }
Expand Down
19 changes: 13 additions & 6 deletions plugins/modules/ag_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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'''
Expand Down
10 changes: 7 additions & 3 deletions plugins/modules/spn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 4 additions & 2 deletions tests/integration/targets/win_ag_listener/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5d2fd36

Please sign in to comment.