diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 261bf2e6..f5d5aff0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,19 @@ lowlydba.sqlserver Release Notes .. contents:: Topics +v2.3.1 +====== + +Release Summary +--------------- + +Update the install script feature to accommodate the latest minor DbOps release (v0.9.x) + +Minor Changes +------------- + +- Add new input strings to be compatible with dbops v0.9.x (https://github.com/lowlydba/lowlydba.sqlserver/pull/231) + v2.3.0 ====== diff --git a/README.md b/README.md index 11e7eeec..3de85074 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lowlydba.sqlserver Collection for Ansible +# lowlydba.sqlserver Collection for Ansible ![GPL v3](https://img.shields.io/github/license/lowlydba/lowlydba.sqlserver) [![CI](https://github.com/lowlydba/lowlydba.sqlserver/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/lowlydba/lowlydba.sqlserver/actions/workflows/ansible-test.yml) @@ -11,11 +11,17 @@ - [Contributing to this collection](#contributing-to-this-collection) - [Collection maintenance](#collection-maintenance) - [Tested with](#tested-with) + - [Ansible](#ansible) + - [SQL Server](#sql-server) - [External requirements](#external-requirements) - [Using this collection](#using-this-collection) - [Installing the Collection from Ansible Galaxy](#installing-the-collection-from-ansible-galaxy) -- [Release notes](#release-notes) - [Releasing](#releasing) + - [Release notes](#release-notes) + - [Next Release](#next-release) + - [Schedule](#schedule) + - [Versioning](#versioning) + - [Deprecation](#deprecation) ## Modules @@ -73,7 +79,7 @@ To learn how to maintain / become a maintainer of this collection, refer to the - PowerShell modules - [dbatools][dbatools] >= 2.0.0 - - [dbops][dbops] >= 0.8.0 + - [dbops][dbops] >= 0.9.0 ## Using this collection diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index b8e5db22..def69557 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -473,3 +473,13 @@ releases: - 2-2-4-release-summary.yml - 227-skip-pwd-reset.yml release_date: '2024-02-10' + 2.3.1: + changes: + minor_changes: + - Add new input strings to be compatible with dbops v0.9.x (https://github.com/lowlydba/lowlydba.sqlserver/pull/231) + release_summary: Update the install script feature to accommodate the latest + minor DbOps release (v0.9.x) + fragments: + - 2-3-1-release-summary.yml + - 231-dbops-v09.yml + release_date: '2024-02-24' diff --git a/galaxy.yml b/galaxy.yml index 64904509..ee9765b3 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -2,7 +2,7 @@ namespace: lowlydba name: sqlserver -version: 2.3.0 +version: 2.3.1 readme: README.md authors: - John McCall (github.com/lowlydba) diff --git a/plugins/modules/install_script.ps1 b/plugins/modules/install_script.ps1 index f6717316..ae552f48 100644 --- a/plugins/modules/install_script.ps1 +++ b/plugins/modules/install_script.ps1 @@ -7,7 +7,7 @@ #AnsibleRequires -CSharpUtil Ansible.Basic #AnsibleRequires -PowerShell ansible_collections.lowlydba.sqlserver.plugins.module_utils._SqlServerUtils #Requires -Modules @{ ModuleName="dbatools"; ModuleVersion="2.0.0" } -#Requires -Modules @{ ModuleName="dbops"; ModuleVersion="0.8.0" } +#Requires -Modules @{ ModuleName="dbops"; ModuleVersion="0.9.0" } $spec = @{ supports_check_mode = $true @@ -15,7 +15,7 @@ $spec = @{ database = @{type = 'str'; required = $true } path = @{type = 'str'; required = $true } deployment_method = @{type = 'str'; required = $false; default = 'NoTransaction' - choices = @('NoTransaction', 'SingleTransaction', 'TransactionPerScript') + choices = @('NoTransaction', 'SingleTransaction', 'TransactionPerScript', 'AlwaysRollback') } schema_version_table = @{type = 'str'; required = $false } no_log_version = @{type = 'bool'; required = $false; default = $false } diff --git a/plugins/modules/install_script.py b/plugins/modules/install_script.py index 4dbf78f4..d233fb7b 100644 --- a/plugins/modules/install_script.py +++ b/plugins/modules/install_script.py @@ -33,10 +33,11 @@ - C(SingleTransaction) - wrap all the deployment scripts into a single transaction and rollback whole deployment on error. - C(TransactionPerScript) - wrap each script into a separate transaction; rollback single script deployment in case of error. - C(NoTransaction) - deploy as is. + - C(AlwaysRollback) - roll back the transaction. type: str required: false default: 'NoTransaction' - choices: ['NoTransaction', 'SingleTransaction', 'TransactionPerScript'] + choices: ['NoTransaction', 'SingleTransaction', 'TransactionPerScript', 'AlwaysRollback'] no_log_version: description: - If set, the deployment will not be tracked in the database. That will also mean that all the scripts diff --git a/tests/integration/targets/setup_sqlserver/vars/main.yml b/tests/integration/targets/setup_sqlserver/vars/main.yml index 346090d7..bece0f6f 100644 --- a/tests/integration/targets/setup_sqlserver/vars/main.yml +++ b/tests/integration/targets/setup_sqlserver/vars/main.yml @@ -6,7 +6,7 @@ dbatools_install_cmd: > Set-DbatoolsInsecureConnection -Scope FileUserLocal } -dbops_min_version: 0.8.0 +dbops_min_version: 0.9.0 dbops_install_cmd: > if (-not(Get-Module -FullyQualifiedName @{ModuleName='dbops';ModuleVersion='{{ dbops_min_version }}'} -ListAvailable)) { Install-Module dbops -MinimumVersion {{ dbops_min_version }} -Force -SkipPublisherCheck -AllowClobber