Add mssql_ha_virtual_ip, Use firewall role to configure firewall

- Add mssql_ha_virtual_ip
  Resolves: rhbz#2066337
- Use firewall role to configure firewall for SQL Server
  Resolves: rhbz#2120709
- Replace simple `mssql_input_sql_file` with `pre` and `post` variables
  Resolves: rhbz#2120712
- Add Requires: linux-system-roles or rhel-system-roles
- Replace fedora.linux_system_roles:redhat.rhel_system_roles on RHEL
- Add downstream values to galaxy.yml
- Change defcommit to defsource that takes both tags and commits
- Update CHANGELOG.md with the current date and copy it to collection
dir
This commit is contained in:
Sergei Petrosian 2022-08-23 17:45:44 +02:00
parent 245cf19627
commit a6fd249a33
3 changed files with 40 additions and 12 deletions

2
.gitignore vendored
View File

@ -4,3 +4,5 @@
/mssql-27201be4f2e557a6dcde36463354a1de0cbadb08.tar.gz
/auto-maintenance-fe4fd028db23607414acce481388f23ac51cd944.tar.gz
/mssql-4eb3dd55defd801a5032efa597983cbbec4bbeea.tar.gz
/mssql-1.2.1.tar.gz
/mssql-1.2.3.tar.gz

View File

@ -25,8 +25,8 @@
Name: ansible-collection-microsoft-sql
Url: https://github.com/linux-system-roles/mssql
Summary: The Ansible collection for Microsoft SQL Server management
Version: 1.2.0
Release: 2%{?dist}
Version: 1.2.3
Release: 1%{?dist}
#Group: Development/Libraries
License: MIT
@ -74,7 +74,6 @@ Requires: rhel-system-roles
BuildRequires: %{ansible_build_dep}
%endif
%if %{without ansible}
# We don't have ansible-galaxy.
# Simply copy everything instead of galaxy-installing the built artifact.
@ -83,7 +82,7 @@ BuildRequires: %{ansible_build_dep}
%define ansible_collection_build_install() ansible-galaxy collection build; ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name}-%{version}.tar.gz
%endif
# For each role, call defcommit() and the point to it with SourceN: %{archiveurlN}.
# For each role, call defsource() and the point to it with SourceN: %{archiveurlN}.
%global archiveext tar.gz
# list of source role names
%global rolenames %nil
@ -98,8 +97,8 @@ BuildRequires: %{ansible_build_dep}
%global parenturl https://github.com/linux-system-roles
%define defcommit() %{expand:%%global ref%{1} %{2}
%%global shortcommit%{1} %%(c=%%{ref%{1}}; echo ${c:0:7})
# You can feed either tag or commit to defsource
%define defsource() %{expand:%%global ref%{1} %{2}
%%global extractdir%{1} %%{expand:%%getarchivedir %{1}}
%%global archiveurl%{1} %%{parenturl}/%%{rolename%{1}}/archive/%%{ref%{1}}/%%{rolename%{1}}-%%{ref%{1}}.tar.gz
%%global rolenames %%{?rolenames} %%{rolename%{1}}
@ -111,12 +110,12 @@ BuildRequires: %{ansible_build_dep}
%%global collection_rolenames %%{?collection_rolenames} [%{rolename%{1}}]="%{collection_rolename%{1}}"
}
%defcommit 1 4eb3dd55defd801a5032efa597983cbbec4bbeea
%defsource 1 1.2.3
%global rolename1 mssql
%global target_rolename1 sql-server
%global collection_rolename1 server
%global mainid fe4fd028db23607414acce481388f23ac51cd944
%global mainid cdc706f14614ef5e80bbce8db10beb369e889df9
Source: %{parenturl}/auto-maintenance/archive/%{mainid}/auto-maintenance-%{mainid}.tar.gz
Source1: %{archiveurl1}
@ -136,7 +135,7 @@ BuildRequires: highlight
# Requirements for galaxy_transform.py
BuildRequires: python3
%if 0%{?fedora} || 0%{?rhel} >= 8
BuildRequires: python3dist(ruamel.yaml)
BuildRequires: %{py3_dist ruamel.yaml}
%else
BuildRequires: python3-ruamel-yaml
%endif
@ -222,7 +221,11 @@ declare -A COLLECTION_ROLENAMES=(%{collection_rolenames})
%if 0%{?rhel}
for rolename in %{rolenames}; do
sed -i 's/fedora\.linux_system_roles/redhat.rhel_system_roles/g' \
$rolename/tasks/*.yml $rolename/tests/*.yml $rolename/meta/*.yml
$rolename/CHANGELOG.md \
$rolename/README.md \
$rolename/tasks/*.yml \
$rolename/tests/*.yml \
$rolename/meta/*.yml
done
%endif
@ -244,6 +247,13 @@ rm -r .collections/ansible_collections/%{collection_namespace}/%{collection_name
# Copy galaxy.yml to the collection directory
cp -p galaxy.yml .collections/ansible_collections/%{collection_namespace}/%{collection_name}
# Update CHANGELOG.md with the current date and copy it to collection dir
curr_date=$(date +'%Y-%m-%d')
sed -i "s/^\([%{version}] - \).*/\1$curr_date/g" \
.collections/ansible_collections/%{collection_namespace}/%{collection_name}/roles/%{collection_rolename1}/CHANGELOG.md
mv .collections/ansible_collections/%{collection_namespace}/%{collection_name}/roles/%{collection_rolename1}/CHANGELOG.md \
.collections/ansible_collections/%{collection_namespace}/%{collection_name}/
%install
mkdir -p $RPM_BUILD_ROOT%{installbase}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles
@ -433,6 +443,21 @@ fi
%endif
%changelog
* Thu Aug 25 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.2.3-1
- Use firewall role to configure firewall for SQL Server
Resolves: rhbz#2120709
- Add mssql_ha_virtual_ip
Replace mssql_ha_db_name with mssql_ha_db_names to let users replicate multiple DBs
Resolves: rhbz#2066337
- Replace simple `mssql_input_sql_file` with `pre` and `post` variables
Resolves: rhbz#2120712
- Add Requires: linux-system-roles or rhel-system-roles
- Replace fedora.linux_system_roles:redhat.rhel_system_roles on RHEL
- Add downstream values to galaxy.yml
- Change defcommit to defsource that takes both tags and commits
- Update CHANGELOG.md with the current date and copy it to collection dir
* Mon Jul 4 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.2.0-2
- Update mssql commit
Resolves: rhbz#2066337

View File

@ -1,2 +1,3 @@
SHA512 (auto-maintenance-fe4fd028db23607414acce481388f23ac51cd944.tar.gz) = d2d627f7c7500c5e0250a2270129d50e425414c900026b4be0f9bcb65630156d27742f9db6896f9908f12734571719caef6341ef662726dd2fd286ebc7a114fc
SHA512 (mssql-4eb3dd55defd801a5032efa597983cbbec4bbeea.tar.gz) = aead90c53c2e22083704e0fa01fb0e5715346b7ee68f03cba59b1698938608b757f94a8c083086d25588e8b3ccb05fd591b56da0af76400a22f978692bb5827b
SHA512 (auto-maintenance-cdc706f14614ef5e80bbce8db10beb369e889df9.tar.gz) = b1e57a6b59dd9317f2273a89759fcb92c59b818711b036c459043cf01570c86cebfeb2d5643e7c629da4c35167091454b18c91b39f3663b8464dda4758dc4ac1
SHA512 (mssql-1.2.1.tar.gz) = 35f9f5c1bd69955eb9d0ab949ad91098a36e52ec2d4757540b32fe847f6c33f88443de7e22230e4024ec488847f21fe9047d30696c7cad72a9a3154e8421c998
SHA512 (mssql-1.2.3.tar.gz) = 18b716f4b379ceea5241957ce86d37f867da23a1159e3bddbe0d7c6dae93211a544c6e4d2a61dbf6c3093361162d4619e266f67c015e7892cfb4b7b815d466d8