|
|
|
@ -1,15 +1,12 @@
|
|
|
|
|
# NOTE: Even though ansible-core is in 8.6, it is only available
|
|
|
|
|
# at *runtime*, not at *buildtime* - so we can't have
|
|
|
|
|
# ansible-core as a build_dep on RHEL8
|
|
|
|
|
%if 0%{?fedora} || 0%{?rhel} >= 9
|
|
|
|
|
%bcond_without ansible
|
|
|
|
|
# NOTE: ansible-core is in rhel-8.6 and newer, but not installable
|
|
|
|
|
# in buildroot as it depended on modular Python.
|
|
|
|
|
# It has been installable at buildtime in 8.8 and newer.
|
|
|
|
|
%if 0%{?fedora}
|
|
|
|
|
BuildRequires: ansible-packaging
|
|
|
|
|
%else
|
|
|
|
|
%if 0%{?rhel} >= 8
|
|
|
|
|
BuildRequires: ansible-core >= 2.11.0
|
|
|
|
|
%endif
|
|
|
|
|
%else
|
|
|
|
|
%bcond_with ansible
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%bcond_with collection_artifact
|
|
|
|
@ -24,8 +21,8 @@ BuildRequires: ansible-core >= 2.11.0
|
|
|
|
|
Name: ansible-collection-microsoft-sql
|
|
|
|
|
Url: https://github.com/linux-system-roles/mssql
|
|
|
|
|
Summary: The Ansible collection for Microsoft SQL Server management
|
|
|
|
|
Version: 1.3.0
|
|
|
|
|
Release: 3%{?dist}
|
|
|
|
|
Version: 2.0.1
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
|
|
|
|
|
License: MIT
|
|
|
|
|
|
|
|
|
@ -37,24 +34,6 @@ License: MIT
|
|
|
|
|
%global legacy_rolename %{collection_namespace}.sql-server
|
|
|
|
|
%global _pkglicensedir %{_licensedir}/%{name}
|
|
|
|
|
|
|
|
|
|
# Helper macros originally from macros.ansible by Igor Raits <ignatenkobrain>
|
|
|
|
|
# On RHEL, not available, so we must define those macros locally
|
|
|
|
|
# On Fedora, provided by ansible-packager
|
|
|
|
|
# Not used (yet). Could be made to point to AH in RHEL - but what about CentOS Stream?
|
|
|
|
|
#%%{!?ansible_collection_url:%%define ansible_collection_url() https://galaxy.ansible.com/%%{collection_namespace}/%%{collection_name}}
|
|
|
|
|
%if 0%{?rhel}
|
|
|
|
|
Provides: ansible-collection(%{collection_namespace}.%{collection_name}) = %{collection_version}
|
|
|
|
|
%global ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/
|
|
|
|
|
%define ansible_roles_dir %{_datadir}/ansible/roles
|
|
|
|
|
%if %{without ansible}
|
|
|
|
|
# Untar and copy everything instead of galaxy-installing the built artifact when ansible is not available
|
|
|
|
|
%define ansible_collection_build() tar -cf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz .
|
|
|
|
|
%define ansible_collection_install() mkdir -p %{buildroot}%{ansible_collection_files}%{collection_name}; (cd %{buildroot}%{ansible_collection_files}%{collection_name}; tar -xf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz)
|
|
|
|
|
%else
|
|
|
|
|
%define ansible_collection_build() ansible-galaxy collection build
|
|
|
|
|
%define ansible_collection_install() ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name}-%{version}.tar.gz
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
# be compatible with the usual Fedora Provides:
|
|
|
|
|
Provides: ansible-collection-%{collection_namespace}-%{collection_name} = %{collection_version}-%{release}
|
|
|
|
|
|
|
|
|
@ -83,6 +62,10 @@ Requires: linux-system-roles
|
|
|
|
|
Source: %{parenturl}/auto-maintenance/archive/%{mainid}/auto-maintenance-%{mainid}.tar.gz
|
|
|
|
|
Source1: %{parenturl}/%{rolename}/archive/%{source1id}/%{rolename}-%{source1id}.tar.gz
|
|
|
|
|
|
|
|
|
|
# Includes with ansible_collection_build/_install that differ between RHEL versions
|
|
|
|
|
Source1002: ansible-packaging.inc
|
|
|
|
|
%include %{SOURCE1002}
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%if %{with html}
|
|
|
|
@ -112,7 +95,7 @@ Summary: Collection artifact to import to Automation Hub / Ansible Galaxy
|
|
|
|
|
|
|
|
|
|
%description collection-artifact
|
|
|
|
|
Collection artifact for %{name}. This package contains
|
|
|
|
|
%{collection_namespace}-%{collection_name}-%{version}.tar.gz
|
|
|
|
|
%{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%pretrans -p <lua>
|
|
|
|
@ -149,7 +132,7 @@ cp %{rolename}/.collection/galaxy.yml ./
|
|
|
|
|
|
|
|
|
|
%if 0%{?rhel}
|
|
|
|
|
# Ensure the correct entries in galaxy.yml
|
|
|
|
|
./galaxy_transform.py "%{collection_namespace}" "%{collection_name}" "%{version}" \
|
|
|
|
|
./galaxy_transform.py "%{collection_namespace}" "%{collection_name}" "%{collection_version}" \
|
|
|
|
|
"Ansible collection for Microsoft SQL Server management" \
|
|
|
|
|
"https://github.com/linux-system-roles/mssql" \
|
|
|
|
|
"https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/administration_and_configuration_tasks_using_system_roles_in_rhel/assembly_configuring-microsoft-sql-server-using-microsoft-sql-server-ansible-role_assembly_updating-packages-to-enable-automation-for-the-rhel-system-roles" \
|
|
|
|
@ -157,7 +140,7 @@ cp %{rolename}/.collection/galaxy.yml ./
|
|
|
|
|
"https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%208&component=ansible-collection-microsoft-sql" \
|
|
|
|
|
> galaxy.yml.tmp
|
|
|
|
|
%else
|
|
|
|
|
./galaxy_transform.py "%{collection_namespace}" "%{collection_name}" "%{version}" \
|
|
|
|
|
./galaxy_transform.py "%{collection_namespace}" "%{collection_name}" "%{collection_version}" \
|
|
|
|
|
"Ansible collection for Microsoft SQL Server management" \
|
|
|
|
|
> galaxy.yml.tmp
|
|
|
|
|
%endif
|
|
|
|
@ -166,8 +149,8 @@ mv galaxy.yml.tmp galaxy.yml
|
|
|
|
|
%if 0%{?rhel}
|
|
|
|
|
# Replace "fedora.linux_system_roles" with "redhat.rhel_system_roles"
|
|
|
|
|
# This is for the "roles calling other roles" case
|
|
|
|
|
find %{rolename} -type f -exec \
|
|
|
|
|
sed -e "s/fedora[.]linux_system_roles[.]/redhat.rhel_system_roles./g" \
|
|
|
|
|
find . -type f -exec \
|
|
|
|
|
sed -e "s/fedora\.linux_system_roles/redhat.rhel_system_roles/g" \
|
|
|
|
|
-i {} \;
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
@ -263,8 +246,8 @@ sh md2html.sh -t %{buildroot}%{_pkgdocdir}/collection/roles/%{collection_rolenam
|
|
|
|
|
%if %{with collection_artifact}
|
|
|
|
|
# Copy collection artifact to /usr/share/ansible/collections/ for collection-artifact
|
|
|
|
|
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
|
|
|
|
|
if [ -f %{collection_namespace}-%{collection_name}-%{version}.tar.gz ]; then
|
|
|
|
|
mv %{collection_namespace}-%{collection_name}-%{version}.tar.gz \
|
|
|
|
|
if [ -f %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz ]; then
|
|
|
|
|
mv %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz \
|
|
|
|
|
%{buildroot}%{_datadir}/ansible/collections/
|
|
|
|
|
fi
|
|
|
|
|
popd
|
|
|
|
@ -346,43 +329,42 @@ find %{buildroot}%{ansible_roles_dir} -mindepth 1 -maxdepth 1 | \
|
|
|
|
|
|
|
|
|
|
%if %{with collection_artifact}
|
|
|
|
|
%files collection-artifact
|
|
|
|
|
%{_datadir}/ansible/collections/%{collection_namespace}-%{collection_name}-%{version}.tar.gz
|
|
|
|
|
%{_datadir}/ansible/collections/%{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Thu Jul 27 2023 Sergei Petrosian <spetrosi@redhat.com> - 2.0.1-1
|
|
|
|
|
- Update role to version 2.0.1 to enhance AD integration
|
|
|
|
|
Resolves: RHEL-877
|
|
|
|
|
Resolves: RHEL-878
|
|
|
|
|
Resolves: RHEL-879
|
|
|
|
|
Resolves: RHEL-880
|
|
|
|
|
|
|
|
|
|
* Wed May 31 2023 Sergei Petrosian <spetrosi@redhat.com> - 1.4.1-1
|
|
|
|
|
- Update BuiildRequires to use ansible-core on RHEL > 8.8
|
|
|
|
|
- Move RHEL related code into an include for spec readability
|
|
|
|
|
- Update role to version 1.4.1 to add customizable storage paths
|
|
|
|
|
Resolves: RHEL-529
|
|
|
|
|
|
|
|
|
|
* Thu Feb 23 2023 Sergei Petrosian <spetrosi@redhat.com> - 1.3.0-3
|
|
|
|
|
- Spec: add functionality to build from a commit hash
|
|
|
|
|
- Use latest 1.3.0 to add flexibility to AD integration functionality
|
|
|
|
|
Resolves: rhbz#2163696
|
|
|
|
|
Resolves: rhbz#2163709
|
|
|
|
|
|
|
|
|
|
* Thu Feb 16 2023 Sergei Petrosian <spetrosi@redhat.com> - 1.3.0-2
|
|
|
|
|
* Fri Feb 17 2023 Sergei Petrosian <spetrosi@redhat.com> - 1.3.0-2
|
|
|
|
|
- Replace fedora.linux_system_roles/redhat.rhel_system_roles and
|
|
|
|
|
linux-system-roles.mssql with microsoft.sql.server in the role.
|
|
|
|
|
Resolves: rhbz#2129106
|
|
|
|
|
Resolves: rhbz#2151281
|
|
|
|
|
- Use latest 1.3.0 to fix ad_Integration issues
|
|
|
|
|
Resolves: rhbz#2163696
|
|
|
|
|
Resolves: rhbz#2163709
|
|
|
|
|
|
|
|
|
|
* Wed Feb 1 2023 Sergei Petrosian <spetrosi@redhat.com> - 1.3.0-1
|
|
|
|
|
- Keep spec consistent with linux-system-roles
|
|
|
|
|
* Thu Feb 2 2023 Sergei Petrosian <spetrosi@redhat.com> - 1.3.0-1
|
|
|
|
|
- Keep spec consistent with linux-system-roles and simplify
|
|
|
|
|
- Return conditionals related to EL to keep up- and downstream consistent
|
|
|
|
|
- Add pretrans scriplet to remove symlinks if exist to fix issue with update
|
|
|
|
|
- Instead of copying doc and license files create symlinks
|
|
|
|
|
- Dynamically generate %%files section
|
|
|
|
|
- Add -t to md2html to generate TOC
|
|
|
|
|
Resolves: rhbz#2129106
|
|
|
|
|
- On SQL Server Enterprise Edition, support configuring asynchronous replication
|
|
|
|
|
Resolves: rhbz#2144820
|
|
|
|
|
- Support configuring a read-scale SQL server availability group (without pacemaker
|
|
|
|
|
Resolves: rhbz#2144821
|
|
|
|
|
- Use the certificate role to create the cert and the key
|
|
|
|
|
Resolves: rhbz#2144852
|
|
|
|
|
- Support SQL Server version 2022
|
|
|
|
|
Resolves: rhbz#2153427
|
|
|
|
|
- Support integrating with AD Server for authentication
|
|
|
|
|
Resolves: rhbz#2163696
|
|
|
|
|
|
|
|
|
|
* Thu Sep 22 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.2.4-2
|
|
|
|
|
- Simplify spec file
|
|
|
|
|
- Do not install roles to /usr/share/microsoft and then create symlinks
|
|
|
|
|
to /usr/share/ansible/roles/, instead install directly to
|
|
|
|
|
/usr/share/ansible/roles/
|
|
|
|
@ -393,69 +375,83 @@ find %{buildroot}%{ansible_roles_dir} -mindepth 1 -maxdepth 1 | \
|
|
|
|
|
- Remove getarchivedir for simplicity
|
|
|
|
|
- Wrap description by 80 symbols and clarify it
|
|
|
|
|
- Remove tests/.fmf dir from the RPM
|
|
|
|
|
Resolves: rhbz#2129106
|
|
|
|
|
Resolves: rhbz#2151281
|
|
|
|
|
- On SQL Server Enterprise Edition, support configuring asynchronous replication
|
|
|
|
|
Resolves: rhbz#2151282
|
|
|
|
|
- Support configuring a read-scale SQL server availability group (without pacemaker
|
|
|
|
|
Resolves: rhbz#2151283
|
|
|
|
|
- Use the certificate role to create the cert and the key
|
|
|
|
|
Resolves: rhbz#2151284
|
|
|
|
|
- Support SQL Server version 2022
|
|
|
|
|
Resolves: rhbz#2153428
|
|
|
|
|
- Support integrating with AD Server for authentication
|
|
|
|
|
Resolves: rhbz#2163709
|
|
|
|
|
|
|
|
|
|
* Thu Sep 1 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.2.4-1
|
|
|
|
|
- Replicate all provided databases
|
|
|
|
|
- This change fixes the bug where only the first database provided with
|
|
|
|
|
mssql_ha_db_names got replicated
|
|
|
|
|
- Clarify that the role does not remove not listed databases
|
|
|
|
|
Resolves: rhbz#2129869
|
|
|
|
|
Resolves: rhbz#2066337
|
|
|
|
|
- Input multiple sql scripts
|
|
|
|
|
- Allow _input_sql_file vars to accept list of files
|
|
|
|
|
- Flush handlers prior to inputting post sql script
|
|
|
|
|
Resolves: rhbz#2129872
|
|
|
|
|
Resolves: rhbz#2120712
|
|
|
|
|
- Note that ha_cluster is not idempotent
|
|
|
|
|
- SPEC: Do not update dates in CHANGELOG.md
|
|
|
|
|
|
|
|
|
|
* Thu Aug 25 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.2.3-1
|
|
|
|
|
- Use firewall role to configure firewall for SQL Server
|
|
|
|
|
Resolves: rhbz#2120714
|
|
|
|
|
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#2066338
|
|
|
|
|
Resolves: rhbz#2066337
|
|
|
|
|
|
|
|
|
|
- Replace simple `mssql_input_sql_file` with `pre` and `post` variables
|
|
|
|
|
Resolves: rhbz#2120713
|
|
|
|
|
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-3
|
|
|
|
|
* Mon Jul 4 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.2.0-2
|
|
|
|
|
- Update mssql commit
|
|
|
|
|
Resolves: rhbz#2066338
|
|
|
|
|
Resolves: rhbz#2066337
|
|
|
|
|
- Add condition for upstream spec build for galaxy_transform
|
|
|
|
|
- Replace extra-mapping with replacing in the legacy format with sed
|
|
|
|
|
|
|
|
|
|
* Fri Jun 17 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.2.0-2
|
|
|
|
|
Return mistakenly deleted galaxy.yml string and bump release
|
|
|
|
|
|
|
|
|
|
* Fri Jun 17 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.2.0-1
|
|
|
|
|
- Add MVP HA functionality to the server role
|
|
|
|
|
Resolves: rhbz#2066338
|
|
|
|
|
Resolves: rhbz#2066337
|
|
|
|
|
- Add mssql_tls_remote_src to the server role
|
|
|
|
|
Resolves: rhbz#2039990
|
|
|
|
|
Resolves: rhbz#2098212
|
|
|
|
|
- Add Requires: linux-system-roles or rhel-system-roles
|
|
|
|
|
- Add downstream values to galaxy.yml
|
|
|
|
|
|
|
|
|
|
* Mon Mar 21 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.1.1-3
|
|
|
|
|
- Fix inserting ansible_managed
|
|
|
|
|
Resolves: rhbz#2065206
|
|
|
|
|
Resolves: rhbz#2057652
|
|
|
|
|
- Users now can provide a custom URLs to pull packages and RPM key from
|
|
|
|
|
Resolves: rhbz#2067175
|
|
|
|
|
Resolves: rhbz#2070452
|
|
|
|
|
- Add "Requires: ansible-core or ansible"
|
|
|
|
|
Resolves: rhbz#2067496
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Mar 18 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.1.1-2
|
|
|
|
|
- RHEL8.6, 9 - add "Requires: ansible-core or ansible"
|
|
|
|
|
Resolves: rhbz#2067172
|
|
|
|
|
Resolves: rhbz#2065669 (EL9)
|
|
|
|
|
|
|
|
|
|
* Thu Mar 17 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.1.1-1
|
|
|
|
|
- Insert the "Ansible managed" comment to the /var/opt/mssql/mssql.conf file
|
|
|
|
|
Resolves rhbz#2065206
|
|
|
|
|
Resolves rhbz#2064690 (EL9)
|
|
|
|
|
|
|
|
|
|
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Sep 23 2021 Sergei Petrosian <spetrosi@redhat.com> - 1.1.0-2
|
|
|
|
|
- Bump release to build with gating.yaml added
|
|
|
|
|
|
|
|
|
|
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|