c36e15b
%if 0%{?rhel} && ! 0%{?epel}
c36e15b
%bcond_with ansible
c36e15b
%else
c36e15b
%bcond_without ansible
c36e15b
%endif
c36e15b
38bbbaa
%bcond_with collection_artifact
38bbbaa
387a7f8
%if 0%{?fedora} || 0%{?rhel} >= 8
387a7f8
%bcond_without html
387a7f8
%else
387a7f8
# pandoc is not supported in rhel 7 and older,
387a7f8
# which is needed for converting .md to .html.
387a7f8
%bcond_with html
387a7f8
%endif
387a7f8
4f0c496
%if 0%{?rhel}
4f0c496
Name: rhel-system-roles
4f0c496
%else
4f0c496
Name: linux-system-roles
4f0c496
%endif
7c7eb82
Url: https://github.com/linux-system-roles
4f0c496
Summary: Set of interfaces for unified system management
72db513
Version: 1.9.0
db15385
Release: 2%{?dist}
4f0c496
4f0c496
#Group: Development/Libraries
ff949aa
License: GPLv3+ and MIT and BSD and PSFL
ceb7e05
%global installbase %{_datadir}/linux-system-roles
ceb7e05
%global _pkglicensedir %{_licensedir}/%{name}
4f0c496
%global rolealtprefix linux-system-roles.
c36e15b
%global roleprefix %{name}.
c36e15b
%global roleinstprefix %{nil}
ceb7e05
%global rolealtrelpath ../../linux-system-roles/
ceb7e05
%if 0%{?rhel}
c36e15b
%global roleinstprefix %{roleprefix}
ceb7e05
%global installbase %{_datadir}/ansible/roles
ceb7e05
%global rolealtrelpath %{nil}
ceb7e05
%endif
4f0c496
c36e15b
%if 0%{?rhel}
c36e15b
%global collection_namespace redhat
c36e15b
%global collection_name rhel_system_roles
c36e15b
%else
c36e15b
%global collection_namespace fedora
c36e15b
%global collection_name linux_system_roles
c36e15b
%endif
f9d616f
%global subrole_prefix "private_${role}_subrole_"
c36e15b
c36e15b
%global collection_version %{version}
c36e15b
c36e15b
# Helper macros originally from macros.ansible by Igor Raits <ignatenkobrain>
c36e15b
# Not available on RHEL, so we must define those macros locally here without using ansible-galaxy
c36e15b
c36e15b
# Not used (yet). Could be made to point to AH in RHEL - but what about CentOS Stream?
c36e15b
#%%{!?ansible_collection_url:%%define ansible_collection_url() https://galaxy.ansible.com/%%{collection_namespace}/%%{collection_name}}
c36e15b
387a7f8
%if 0%{?fedora} || 0%{?rhel} >= 8
f04c75a
%{!?ansible_collection_files:%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/}
387a7f8
%else
387a7f8
# Define undefined macro using "!?ansible_collection_files:..." does not work for rhel-7
387a7f8
%if %{?ansible_collection_files:0}%{!?ansible_collection_files:1}
f04c75a
%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/
387a7f8
%endif
387a7f8
%endif
387a7f8
c36e15b
c36e15b
%if %{with ansible}
c36e15b
BuildRequires: ansible >= 2.9.10
c36e15b
%endif
c36e15b
c36e15b
%if %{without ansible}
72032a4
# We don't have ansible-galaxy.
c36e15b
# Simply copy everything instead of galaxy-installing the built artifact.
f04c75a
%define ansible_collection_build_install() tar -cf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz .; 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)
c36e15b
%else
72032a4
%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
c36e15b
%endif
c36e15b
c36e15b
# For each role, call either defcommit() or deftag(). The other macros
b6e295a
# (%%id and %%shortid) can be then used in the same way in both cases.
0179288
# This way  the rest of the spec file des not need to know whether we are
0179288
# dealing with a tag or a commit.
c36e15b
%global archiveext tar.gz
c36e15b
# list of role names
c36e15b
%global rolenames %nil
c36e15b
# list of assignments that can be used to populate a bash associative array variable
c36e15b
%global rolestodir %nil
c36e15b
%define getarchivedir() %(p=%{basename:%{S:%{1}}}; echo ${p%%.%{archiveext}})
c36e15b
c36e15b
%define defcommit() %{expand:%%global ref%{1} %{2}
c36e15b
%%global shortcommit%{1} %%(c=%%{ref%{1}}; echo ${c:0:7})
c36e15b
%%global extractdir%{1} %%{expand:%%getarchivedir %{1}}
c36e15b
%%{!?repo%{1}:%%global repo%{1} %%{rolename%{1}}}
7c7eb82
%%global archiveurl%{1} %%{?forgeorg%{1}}%%{!?forgeorg%{1}:%%{url}}/%%{repo%{1}}/archive/%%{ref%{1}}/%%{repo%{1}}-%%{ref%{1}}.tar.gz
c36e15b
%%global rolenames %%{?rolenames} %%{rolename%{1}}
c36e15b
%%global roletodir%{1} [%{rolename%{1}}]="%{extractdir%{1}}"
c36e15b
%%global rolestodir %%{?rolestodir} %{roletodir%{1}}
e85e068
}
e85e068
c36e15b
%define deftag() %{expand:%%global ref%{1} %{2}
c36e15b
%%global extractdir%{1} %%{expand:%%getarchivedir %{1}}
c36e15b
%%{!?repo%{1}:%%global repo%{1} %%{rolename%{1}}}
7c7eb82
%%global archiveurl%{1} %%{?forgeorg%{1}}%%{!?forgeorg%{1}:%%{url}}/%%{repo%{1}}/archive/%%{ref%{1}}/%%{repo%{1}}-%%{ref%{1}}.tar.gz
c36e15b
%%global rolenames %%{?rolenames} %%{rolename%{1}}
c36e15b
%%global roletodir%{1} [%{rolename%{1}}]="%{extractdir%{1}}"
c36e15b
%%global rolestodir %%{?rolestodir} %%{roletodir%{1}}
e85e068
}
e85e068
f0ea5fb
#%%defcommit 1 14314822b529520ac12964e0d2938c4bb18ab895
4f0c496
%global rolename1 postfix
8614462
%deftag 1 1.1.0
4f0c496
f0ea5fb
#%%defcommit 2 9fe6eb36772e83b53dcfb8ceb73608fd4f72eeda
4f0c496
%global rolename2 selinux
72db513
%deftag 2 1.3.2
4f0c496
f0ea5fb
#%%defcommit 3 8db8f9ed9088432bac7abf68f1b284475a3baa38
4f0c496
%global rolename3 timesync
72db513
%deftag 3 1.6.1
c36e15b
f0ea5fb
#%%defcommit 4 02fc72b482e165472624b2f68eecd2ddce1d93b1
c36e15b
%global rolename4 kdump
72db513
%deftag 4 1.1.1
4f0c496
72db513
%defcommit 5 c0f603808217f691f603d535becf7ff307790cac
4f0c496
%global rolename5 network
72db513
#%%deftag 5 1.4.0
4f0c496
f0ea5fb
#%%defcommit 6 b3b456183edb7b8aa6ceff7ce667d8e22009ef6a
c36e15b
%global rolename6 storage
72db513
%deftag 6 1.6.2
c36e15b
f0ea5fb
#%%defcommit 7 0673d842fb32c437501e2aada2e38921da98e115
c36e15b
%global rolename7 metrics
06ff97e
%deftag 7 1.3.1
c36e15b
f0ea5fb
#%%defcommit 8 2b9e53233ee3a68bdb532e62f289733e436a6106
c36e15b
%global rolename8 tlog
8614462
%deftag 8 1.2.0
c36e15b
f0ea5fb
#%%defcommit 9 9373303b98e09ef38df7afc8d06e5e55812096c7
c36e15b
%global rolename9 kernel_settings
8614462
%deftag 9 1.1.0
c36e15b
f0ea5fb
#%%defcommit 10 20dd3e5520ca06dcccaa9b3f1fb428d055e0c23f
c36e15b
%global rolename10 logging
72db513
%deftag 10 1.6.0
c36e15b
f0ea5fb
#%%defcommit 11 c57d0b1f3384c525738fa26ba4bdca485e162567
c36e15b
%global rolename11 nbde_server
8614462
%deftag 11 1.1.0
c36e15b
f0ea5fb
#%%defcommit 12 bef2fad5e365712d1f40e53662490ba2550a253f
c36e15b
%global rolename12 nbde_client
8614462
%deftag 12 1.1.0
c36e15b
f0ea5fb
#%%defcommit 13 310fc53db04e8d3134524afb7a89b0477a2ffb83
c36e15b
%global rolename13 certificate
8614462
%deftag 13 1.1.0
c36e15b
f0ea5fb
#%%defcommit 14 b2a9857ac661fa32e66666e444b73bfdb34cdf95
c36e15b
%global rolename14 crypto_policies
8614462
%deftag 14 1.2.0
c36e15b
7c7eb82
%global forgeorg15 https://github.com/willshersystems
c36e15b
%global repo15 ansible-sshd
c36e15b
%global rolename15 sshd
72db513
#%%defcommit 15 57c54e5268d9c09ab31b1357558cdcaa68116015
72db513
%deftag 15 v0.14.1
c36e15b
f0ea5fb
#%%defcommit 16 59b9fd7b25607d8bd33bdb082748955f2652846a
f9d616f
%global rolename16 ssh
72db513
%deftag 16 1.1.1
f9d616f
f0ea5fb
#%%defcommit 17 f901239cb91878719c9e7461760ef8d4789d626d
f9d616f
%global rolename17 ha_cluster
72db513
%deftag 17 1.3.1
f9d616f
f0ea5fb
#%%defcommit 18 5f6cb73e6753fbdbb219b7d3079f0378b2d3bdb3
2ff4921
%global rolename18 vpn
72db513
%deftag 18 1.2.1
2ff4921
db15385
%global mainid fdbd3caaa3dbbd760627b9d177509cd05142bf46
f0ea5fb
Source: %{url}/auto-maintenance/archive/%{mainid}/auto-maintenance-%{mainid}.tar.gz
c36e15b
Source1: %{archiveurl1}
c36e15b
Source2: %{archiveurl2}
c36e15b
Source3: %{archiveurl3}
c36e15b
Source4: %{archiveurl4}
c36e15b
Source5: %{archiveurl5}
c36e15b
Source6: %{archiveurl6}
c36e15b
Source7: %{archiveurl7}
c36e15b
Source8: %{archiveurl8}
c36e15b
Source9: %{archiveurl9}
c36e15b
Source10: %{archiveurl10}
c36e15b
Source11: %{archiveurl11}
c36e15b
Source12: %{archiveurl12}
c36e15b
Source13: %{archiveurl13}
c36e15b
Source14: %{archiveurl14}
c36e15b
Source15: %{archiveurl15}
f9d616f
Source16: %{archiveurl16}
f9d616f
Source17: %{archiveurl17}
2ff4921
Source18: %{archiveurl18}
c36e15b
ff949aa
# Collection tarballs from Automation Hub
ff949aa
# Not used on Fedora.
ff949aa
Source801: ansible-posix-1.3.0.tar.gz
ff949aa
Source802: ansible-netcommon-2.4.0.tar.gz
ff949aa
ff949aa
# Collection tarballs from Galaxy
ff949aa
# Not used on Fedora.
ff949aa
Source901: community-general-3.6.0.tar.gz
ff949aa
c36e15b
# Script to convert the collection README to Automation Hub.
c36e15b
# Not used on Fedora.
c36e15b
Source998: collection_readme.sh
4f0c496
2706688
Patch51: network-tier1-tags.diff
2706688
Patch52: network-disable-bondtests.diff
f9d616f
4f0c496
BuildArch: noarch
4f0c496
387a7f8
%if %{with html}
8169129
# Requirements for md2html.sh to build the documentation
8169129
%if 0%{?fedora} || 0%{?rhel} >= 9
8169129
BuildRequires: rubygem-kramdown-parser-gfm
8169129
%else
4f0c496
BuildRequires: pandoc
8169129
BuildRequires: asciidoc
4f0c496
BuildRequires: highlight
8169129
%endif
387a7f8
%endif
8169129
8169129
# Requirements for galaxy_transform.py
c36e15b
BuildRequires: python3
387a7f8
%if 0%{?fedora} || 0%{?rhel} >= 8
c36e15b
BuildRequires: python3dist(ruamel.yaml)
c36e15b
Requires: python3-jmespath
2ff4921
Requires: python3-netaddr
387a7f8
%else
387a7f8
BuildRequires: python3-ruamel-yaml
387a7f8
387a7f8
Requires: python-jmespath
387a7f8
Requires: python-netaddr
387a7f8
%endif
4f0c496
fadab11
Obsoletes: rhel-system-roles-techpreview < 1.0-3
fadab11
c36e15b
%if %{undefined __ansible_provides}
c36e15b
Provides: ansible-collection(%{collection_namespace}.%{collection_name}) = %{collection_version}
c36e15b
%endif
c36e15b
# be compatible with the usual Fedora Provides:
c36e15b
Provides: ansible-collection-%{collection_namespace}-%{collection_name} = %{version}-%{release}
c36e15b
25bb523
# We need to put %%description within the if block to avoid empty
25bb523
# lines showing up.
25bb523
%if 0%{?rhel}
4f0c496
%description
4f0c496
Collection of Ansible roles and modules that provide a stable and
4f0c496
consistent configuration interface for managing multiple versions
4f0c496
of Red Hat Enterprise Linux.
25bb523
%else
25bb523
%description
25bb523
Collection of Ansible roles and modules that provide a stable and
25bb523
consistent configuration interface for managing multiple versions
25bb523
of Fedora, Red Hat Enterprise Linux & CentOS.
25bb523
%endif
4f0c496
38bbbaa
%if %{with collection_artifact}
38bbbaa
%package collection-artifact
38bbbaa
Summary: Collection artifact to import to Automation Hub / Ansible Galaxy
38bbbaa
38bbbaa
%description collection-artifact
38bbbaa
Collection artifact for %{name}. This package contains %{collection_namespace}-%{collection_name}-%{version}.tar.gz
38bbbaa
%endif
38bbbaa
4f0c496
%prep
2ff4921
%setup -q -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -a12 -a13 -a14 -a15 -a16 -a17 -a18 -n %{getarchivedir 0}
c36e15b
043e6d4
for file in %_sourcedir/*.tar.gz; do
043e6d4
    if [[ "$file" =~ %_sourcedir/([^-]+)-([^-]+)-(.+).tar.gz ]]; then
043e6d4
        ns=${BASH_REMATCH[1]}
043e6d4
        name=${BASH_REMATCH[2]}
043e6d4
        ver=${BASH_REMATCH[3]}
043e6d4
        mkdir -p .external/$ns/$name
043e6d4
        pushd .external/$ns/$name > /dev/null
043e6d4
        tar xfz "$file"
043e6d4
        popd > /dev/null
043e6d4
    fi
043e6d4
done
043e6d4
c36e15b
declare -A ROLESTODIR=(%{rolestodir})
c36e15b
for rolename in %{rolenames}; do
f0ea5fb
    dir_from_archive="${ROLESTODIR[${rolename}]}"
f0ea5fb
    if [ ! -d "$dir_from_archive" ]; then
f0ea5fb
        # ansible-sshd uses tags like vX.Y.Z
f0ea5fb
        # using the github archive/ link with a tag like this strips
f0ea5fb
        # the leading v from the tag used to construct the directory
f0ea5fb
        # name in the archive
f0ea5fb
        if [[ "$dir_from_archive" =~ %{repo15}-v([0-9]+[.][0-9]+.*) ]]; then
f0ea5fb
            dir_from_archive="%{repo15}-${BASH_REMATCH[1]}"
f0ea5fb
        fi
f0ea5fb
    fi
f0ea5fb
    mv "$dir_from_archive" ${rolename}
c36e15b
done
c36e15b
ebbd49b
cd %{rolename2}/tests
ebbd49b
# this test causes avcs we want to ignore
ebbd49b
sed -r -i -e '/hosts: all/a\
ebbd49b
  tags:\
ebbd49b
    - tests::avc' tests_selinux_disabled.yml
ebbd49b
cd ../..
ebbd49b
c36e15b
cd %{rolename5}
c36e15b
%patch51 -p1
4f0c496
%patch52 -p1
f9d616f
cd ..
c36e15b
cd %{rolename15}
bbca426
sed -r -i -e "s/ansible-sshd/linux-system-roles.sshd/" tests/*.yml examples/*.yml
8614462
sed -r -i -e "s/ willshersystems.sshd/ linux-system-roles.sshd/" tests/*.yml examples/*.yml README.md
8614462
sed -r -i -e "s/min_ansible_version: 2.8/min_ansible_version: 2.9/" meta/main.yml
4f0c496
cd ..
4f0c496
ff949aa
%if 0%{?rhel}
ff949aa
# Unpack tar.gz to retrieve to be vendored modules and place them in the roles library.
ff949aa
# ansible.posix:
ff949aa
#   - library:
ff949aa
#     - Module selinux and seboolean for the selinux role
ff949aa
#     - Module mount for the storage role
ff949aa
declare -A module_map=( ["selinux.py"]="selinux" ["seboolean.py"]="selinux"  ["mount.py"]="storage" )
ff949aa
for module in "${!module_map[@]}"; do
ff949aa
  role="${module_map[${module}]}"
ff949aa
  if [ ! -d $role/library ]; then
ff949aa
    mkdir $role/library
ff949aa
  fi
043e6d4
  cp -pL .external/ansible/posix/plugins/modules/$module $role/library/$module
ff949aa
  sed -i -e ':a;N;$!ba;s/description:\n\( *\)/description:\n\1- WARNING: Do not use this module directly! It is only for role internal use.\n\1/' -e "s/ansible_collections.ansible.posix.plugins.module_utils/ansible.module_utils.${role}_lsr/" $role/library/$module
ff949aa
done
ff949aa
ff949aa
# ansible.posix:
ff949aa
#   - module_utils:
ff949aa
#     - Module_util mount for the storage role
ff949aa
module_map=( ["mount.py"]="storage" )
ff949aa
for module in "${!module_map[@]}"; do
ff949aa
  role="${module_map[${module}]}"
ff949aa
  if [ ! -d $role/module_utils/${role}_lsr ]; then
ff949aa
    mkdir -p $role/module_utils/${role}_lsr
ff949aa
  fi
043e6d4
  cp -pL .external/ansible/posix/plugins/module_utils/$module $role/module_utils/${role}_lsr/$module
ff949aa
  sed -i -e ':a;N;$!ba;s/description:\n\( *\)/description:\n\1- WARNING: Do not use this module directly! It is only for role internal use.\n\1/' $role/library/$module
ff949aa
done
ff949aa
ff949aa
# ansible.netcommon:
ff949aa
#   - filter_plugins:
ff949aa
#     - Filter ipaddr for the vpn role
ff949aa
declare -A module_map=( ["ipaddr.py"]="vpn" )
ff949aa
for module in "${!module_map[@]}"; do
ff949aa
  role="${module_map[${module}]}"
ff949aa
  if [ ! -d $role/filter_plugins ]; then
ff949aa
    mkdir $role/filter_plugins
ff949aa
  fi
043e6d4
  cp -pL .external/ansible/netcommon/plugins/filter/$module $role/filter_plugins/$module
ff949aa
  sed -i -e ':a;N;$!ba;s/description:\n\( *\)/description:\n\1- WARNING: Do not use this module directly! It is only for role internal use.\n\1/' $role/filter_plugins/$module
ff949aa
done
ff949aa
ff949aa
# community.general:
ff949aa
#   - library:
ff949aa
#     - Module seport, sefcontext and selogin for the selinux role rolename2
ff949aa
module_map=( ["seport.py"]="selinux" ["sefcontext.py"]="selinux"  ["selogin.py"]="selinux" )
ff949aa
for module in "${!module_map[@]}"; do
ff949aa
  role="${module_map[${module}]}"
ff949aa
  if [ ! -d $role/library ]; then
ff949aa
    mkdir $role/library
ff949aa
  fi
043e6d4
  cp -pL .external/community/general/plugins/modules/$module $role/library/$module
043e6d4
  ls -alrtF $role/library/$module
ff949aa
  sed -i -e ':a;N;$!ba;s/description:\n\( *\)/description:\n\1- WARNING: Do not use this module directly! It is only for role internal use.\n\1/' $role/library/$module
ff949aa
done
ff949aa
%endif
ff949aa
043e6d4
# Replacing "linux-system-roles.rolename" with "rhel-system-roles.rolename" in each role
043e6d4
%if "%{roleprefix}" != "linux-system-roles."
043e6d4
for rolename in %{rolenames}; do
043e6d4
    find $rolename -type f -exec \
043e6d4
         sed "s/linux-system-roles[.]${rolename}\\>/%{roleprefix}${rolename}/g" -i {} \;
043e6d4
done
043e6d4
%endif
043e6d4
043e6d4
# Removing symlinks in tests/roles
043e6d4
for rolename in %{rolenames}; do
043e6d4
    if [ -d ${rolename}/tests/roles ]; then
043e6d4
        find ${rolename}/tests/roles -type l -exec rm {} \;
043e6d4
        if [ -d ${rolename}/tests/roles/linux-system-roles.${rolename} ]; then
043e6d4
            rm -r ${rolename}/tests/roles/linux-system-roles.${rolename}
043e6d4
        fi
043e6d4
    fi
043e6d4
done
043e6d4
rm %{rolename5}/tests/modules
043e6d4
rm %{rolename5}/tests/module_utils
043e6d4
rm %{rolename5}/tests/playbooks/roles
043e6d4
# Drop network/{scripts/print_all_options.py,tests/ensure_provider_tests.py}
043e6d4
# from rpm. These 2 files fail in brp-python-bytecompile due to f-strings
043e6d4
# when python2 is default python.
043e6d4
rm %{rolename5}/scripts/print_all_options.py
043e6d4
rm %{rolename5}/tests/ensure_provider_tests.py
043e6d4
# Drop storage tests/scripts
043e6d4
rm -rf %{rolename6}/tests/scripts
043e6d4
043e6d4
# transform ambiguous #!/usr/bin/env python shebangs to python3 to stop brp-mangle-shebangs complaining
043e6d4
find -type f -executable -name '*.py' -exec \
043e6d4
     sed -i -r -e '1s@^(#! */usr/bin/env python)(\s|$)@#\13\2@' '{}' +
043e6d4
4f0c496
%build
387a7f8
%if %{with html}
dce247f
readmes=""
dce247f
for role in %{rolenames}; do
dce247f
    readmes="${readmes} $role/README.md"
dce247f
done
dce247f
sh md2html.sh $readmes
387a7f8
%endif
c36e15b
c36e15b
mkdir .collections
c36e15b
%if 0%{?rhel}
c36e15b
# Convert the upstream collection readme to the downstream one
c36e15b
%{SOURCE998} lsr_role2collection/collection_readme.md
db15385
./galaxy_transform.py "%{collection_namespace}" "%{collection_name}" "%{collection_version}" \
db15385
                      "Red Hat Enterprise Linux System Roles Ansible Collection" \
db15385
                      "https://linux-system-roles.github.io" \
db15385
                      "https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/administration_and_configuration_tasks_using_system_roles_in_rhel" \
db15385
                      "https://access.redhat.com/articles/3050101" \
db15385
                      "https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%208&component=rhel-system-roles" \
db15385
                      > galaxy.yml.tmp
db15385
%else
db15385
./galaxy_transform.py "%{collection_namespace}" "%{collection_name}" "%{collection_version}" \
db15385
                      "Linux System Roles Ansible Collection" \
db15385
                      > galaxy.yml.tmp
c36e15b
%endif
f9d616f
mv galaxy.yml.tmp galaxy.yml
f9d616f
6c7a141
includes=""
6a9abe0
for role in %{rolenames}; do
6c7a141
    includes="$includes --include $role"
c36e15b
done
c36e15b
db15385
LANG=en_US.utf-8 LC_ALL=en_US.utf-8 python3 release_collection.py --galaxy-yml galaxy.yml \
db15385
    --src-path $(pwd) --dest-path $(pwd)/.collections $includes --force --no-update \
6c7a141
	--skip-git --skip-check --debug
6c7a141
ff949aa
%if 0%{?rhel}
ff949aa
# Convert vendored plugins to FQCN for collection
ff949aa
#   ansible.netcommon:
ff949aa
#     - filter_plugins:
ff949aa
#       - Filter ipaddr for the vpn role
ff949aa
declare -A module_map=( ["ipaddr"]="vpn" )
ff949aa
for module in "${!module_map[@]}"; do
ff949aa
  role="${module_map[${module}]}"
ff949aa
  find .collections/ansible_collections/%{collection_namespace}/%{collection_name}/*/vpn \( -iname "*.yml" -o -iname "*.j2" \) -exec sed -i -e "s/\<$module\>/%{collection_namespace}.%{collection_name}.&/g" {} \;
ff949aa
done
ff949aa
%endif
ff949aa
9d8ad98
# copy requirements.txt and bindep.txt from auto-maintenance/lsr_role2collection
9d8ad98
if [ -f lsr_role2collection/collection_requirements.txt ]; then
9d8ad98
    cp lsr_role2collection/collection_requirements.txt \
9d8ad98
       .collections/ansible_collections/%{collection_namespace}/%{collection_name}/requirements.txt
9d8ad98
fi
9d8ad98
if [ -f lsr_role2collection/collection_bindep.txt ]; then
9d8ad98
    cp lsr_role2collection/collection_bindep.txt \
9d8ad98
       .collections/ansible_collections/%{collection_namespace}/%{collection_name}/bindep.txt
9d8ad98
fi
9d8ad98
512e2de
# Remove table of contents from logging README.md
512e2de
# It is not needed for html and AH/Galaxy
512e2de
sed -i -e 's/^\(## Table of Contents\)/## Background\n\1/' \
512e2de
  .collections/ansible_collections/%{collection_namespace}/%{collection_name}/roles/logging/README.md
512e2de
sed -i -e '/^## Table of Contents/,/^## Background/d' \
512e2de
  .collections/ansible_collections/%{collection_namespace}/%{collection_name}/roles/logging/README.md
512e2de
512e2de
# Remove internal links from readme files
512e2de
# They are not rendered properly on AH.
512e2de
for role in %{rolenames}; do
f0ea5fb
    sed -r -i -e 's/\[([^[]+)\]\(#[^)]+\)/\1/g' \
512e2de
    .collections/ansible_collections/%{collection_namespace}/%{collection_name}/roles/$role/README.md
512e2de
done
512e2de
4f0c496
%install
ceb7e05
mkdir -p $RPM_BUILD_ROOT%{installbase}
4f0c496
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles
4f0c496
dce247f
for role in %{rolenames}; do
dce247f
    cp -pR "$role" "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role"
dce247f
done
4f0c496
4f0c496
%if 0%{?rolealtprefix:1}
dce247f
for role in %{rolenames}; do
dce247f
    ln -s    "%{rolealtrelpath}%{roleinstprefix}$role"   "$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}$role"
dce247f
done
4f0c496
%endif
4f0c496
23afe6b
mkdir -p $RPM_BUILD_ROOT%{_pkglicensedir}
dce247f
rm $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/roles
dce247f
for role in %{rolenames}; do
dce247f
    mkdir -p "$RPM_BUILD_ROOT%{_pkgdocdir}/$role"
dce247f
    cp -p "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/README.md" \
dce247f
       "$RPM_BUILD_ROOT%{_pkgdocdir}/$role"
387a7f8
%if %{with html}
387a7f8
    cp -p "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/README.html" \
387a7f8
       "$RPM_BUILD_ROOT%{_pkgdocdir}/$role"
387a7f8
%endif
dce247f
    if [ -f "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/COPYING" ]; then
dce247f
        cp -p "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/COPYING" \
dce247f
           "$RPM_BUILD_ROOT%{_pkglicensedir}/$role.COPYING"
dce247f
    fi
dce247f
    if [ -f "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/LICENSE" ]; then
dce247f
        cp -p "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/LICENSE" \
dce247f
           "$RPM_BUILD_ROOT%{_pkglicensedir}/$role.LICENSE"
dce247f
    fi
dce247f
    if [ -d "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/examples" ]; then
dce247f
        for file in "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/examples/"*.yml ; do
dce247f
            basename=$(basename "$file" .yml)
dce247f
            newname="$basename"
dce247f
            if [[ "$newname" != example-* ]]; then
dce247f
                newname="example-$newname"
dce247f
            fi
dce247f
            if [[ "$newname" != *-playbook ]]; then
dce247f
                newname="${newname}-playbook"
dce247f
            fi
dce247f
            cp "$file" "$RPM_BUILD_ROOT%{_pkgdocdir}/$role/${newname}.yml"
dce247f
            rm "$file"
dce247f
        done
dce247f
        if [ -f "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/examples/inventory" ]; then
dce247f
            cp "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/examples/inventory" \
dce247f
               "$RPM_BUILD_ROOT%{_pkgdocdir}/$role/example-inventory"
dce247f
            rm "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/examples/inventory"
dce247f
        fi
dce247f
        # special case for network
dce247f
        # this will error if the directory is unexpectedly empty
dce247f
        rmdir "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/examples"
dce247f
    fi
dce247f
done
c36e15b
c36e15b
rm $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}*/semaphore
c36e15b
rm -r $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}*/molecule
c36e15b
c36e15b
rm -r $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}*/.[A-Za-z]*
c36e15b
rm $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}*/tests/.git*
c36e15b
dce247f
# NOTE: sshd/examples/example-root-login.yml is
c36e15b
# referenced in the configuring-openssh-servers-using-the-sshd-system-role documentation module
c36e15b
# must be updated if changing the file path
c36e15b
38bbbaa
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
72032a4
%ansible_collection_build_install
dce247f
popd
4f0c496
6a9abe0
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/collection
6a9abe0
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles
6a9abe0
f04c75a
cp -p %{buildroot}%{ansible_collection_files}%{collection_name}/README.md \
dce247f
   $RPM_BUILD_ROOT%{_pkgdocdir}/collection
6a9abe0
6a9abe0
for rolename in %{rolenames}; do
f04c75a
  if [ -f %{buildroot}%{ansible_collection_files}%{collection_name}/roles/${rolename}/README.md ]; then
6a9abe0
    mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles/${rolename}
f04c75a
    cp -p %{buildroot}%{ansible_collection_files}%{collection_name}/roles/${rolename}/README.md \
6a9abe0
        $RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles/${rolename}
6a9abe0
  fi
6a9abe0
done
6a9abe0
387a7f8
%if %{with html}
72032a4
# converting README.md to README.html for collection in $RPM_BUILD_ROOT%{_pkgdocdir}/collection
72032a4
readmes="$RPM_BUILD_ROOT%{_pkgdocdir}/collection/README.md"
72032a4
for role in %{rolenames}; do
72032a4
    readmes="${readmes} $RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles/${role}/README.md"
72032a4
done
72032a4
sh md2html.sh $readmes
387a7f8
%endif
72032a4
38bbbaa
%if %{with collection_artifact}
38bbbaa
# Copy collection artifact to /usr/share/ansible/collections/ for collection-artifact
0d4e50e
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
38bbbaa
if [ -f %{collection_namespace}-%{collection_name}-%{version}.tar.gz ]; then
faabe10
    mv %{collection_namespace}-%{collection_name}-%{version}.tar.gz \
faabe10
       $RPM_BUILD_ROOT%{_datadir}/ansible/collections/
38bbbaa
fi
0d4e50e
popd
38bbbaa
%endif
4f0c496
dce247f
# generate the %files section in the file files_section.txt
dce247f
format_item_for_files() {
dce247f
    # $1 is directory or file name in buildroot
dce247f
    # $2 - if true, and item is a directory, use %dir
dce247f
    local item
dce247f
    local files_item
dce247f
    item="$1"
dce247f
    files_item=${item##"%{buildroot}"}
dce247f
    if [ -L "$item" ]; then
dce247f
        echo "$files_item"
dce247f
    elif [ -d "$item" ]; then
dce247f
        if [[ "$item" == */doc* ]]; then
dce247f
            echo "%doc $files_item"
dce247f
        elif [ "${2:-false}" = true ]; then
dce247f
            echo "%dir $files_item"
dce247f
        else
dce247f
            echo "$files_item"
dce247f
        fi
dce247f
    elif [[ "$item" == */README.md ]] || [[ "$item" == */README.html ]]; then
dce247f
        if [[ "$item" == */private_* ]]; then
dce247f
            # mark as regular file, not %doc
dce247f
            echo "$files_item"
dce247f
        else
dce247f
            echo "%doc $files_item"
dce247f
        fi
0939811
    elif [[ "$item" != */COPYING* ]] && [[ "$item" != */LICENSE* ]]; then
0939811
        # Avoid dynamically using the license macro since the license macro
0939811
        # is replaced with the value of License directive in the older rpmbuild.
dce247f
        echo "$files_item"
dce247f
    fi
dce247f
}
dce247f
dce247f
files_section=files_section.txt
dce247f
rm -f $files_section
dce247f
touch $files_section
c36e15b
%if %{without ansible}
dce247f
echo '%dir %{_datadir}/ansible' >> $files_section
dce247f
echo '%dir %{_datadir}/ansible/roles' >> $files_section
c36e15b
%endif
c36e15b
%if "%{installbase}" != "%{_datadir}/ansible/roles"
dce247f
echo '%dir %{installbase}' >> $files_section
c36e15b
%endif
dce247f
echo '%dir %{ansible_collection_files}' >> $files_section
f04c75a
echo '%dir %{ansible_collection_files}%{collection_name}' >> $files_section
f04c75a
find %{buildroot}%{ansible_collection_files}%{collection_name} -mindepth 1 -maxdepth 1 | \
dce247f
    while read item; do
dce247f
        if [[ "$item" == */roles ]]; then
dce247f
            format_item_for_files "$item" true >> $files_section
dce247f
            find "$item" -mindepth 1 -maxdepth 1 | while read roles_dir; do
dce247f
                format_item_for_files "$roles_dir" true >> $files_section
dce247f
                find "$roles_dir" -mindepth 1 -maxdepth 1 | while read roles_item; do
dce247f
                    format_item_for_files "$roles_item" >> $files_section
dce247f
                done
dce247f
            done
dce247f
        else
dce247f
            format_item_for_files "$item" >> $files_section
dce247f
        fi
dce247f
    done
dce247f
dce247f
find %{buildroot}%{installbase} -mindepth 1 -maxdepth 1 | \
dce247f
    while read item; do
dce247f
        if [ -d "$item" ]; then
dce247f
            format_item_for_files "$item" true >> $files_section
dce247f
            find "$item" -mindepth 1 -maxdepth 1 | while read roles_item; do
dce247f
                format_item_for_files "$roles_item" >> $files_section
dce247f
            done
dce247f
        else
dce247f
            format_item_for_files "$item" >> $files_section
dce247f
        fi
dce247f
    done
dce247f
if [ "%{installbase}" != "%{_datadir}/ansible/roles" ]; then
dce247f
    find %{buildroot}%{_datadir}/ansible/roles -mindepth 1 -maxdepth 1 | \
dce247f
        while read item; do
dce247f
            if [ -d "$item" ]; then
dce247f
                format_item_for_files "$item" true >> $files_section
dce247f
                find "$item" -mindepth 1 -maxdepth 1 | while read roles_item; do
dce247f
                    format_item_for_files "$roles_item" >> $files_section
dce247f
                done
dce247f
            else
dce247f
                format_item_for_files "$item" >> $files_section
dce247f
            fi
dce247f
        done
dce247f
fi
dce247f
# cat files_section.txt
dce247f
# done with files_section.txt generation
dce247f
dce247f
dce247f
%files -f files_section.txt
c88da19
%{_pkgdocdir}/*/README.md
387a7f8
%if %{with html}
c88da19
%{_pkgdocdir}/*/README.html
387a7f8
%endif
dce247f
%{_pkgdocdir}/*/example-*
6a9abe0
%{_pkgdocdir}/collection/roles/*/README.md
387a7f8
%if %{with html}
6a9abe0
%{_pkgdocdir}/collection/roles/*/README.html
387a7f8
%endif
23afe6b
%license %{_pkglicensedir}/*
0939811
%license %{installbase}/*/COPYING*
0939811
%license %{installbase}/*/LICENSE*
0939811
%license %{ansible_collection_files}/%{collection_name}/COPYING*
0939811
%license %{ansible_collection_files}/%{collection_name}/LICENSE*
0939811
%if 0%{?rhel} < 8
0939811
# Needs to list excluded files in this hardcoded style since when
0939811
# format_item_for_files is executed, brp-python-bytecompile is not
0939811
# executed yet.
0939811
%exclude %{installbase}/*/*.py?
0939811
%exclude %{installbase}/*/*/*.py?
0939811
%exclude %{installbase}/*/*/*/*.py?
0939811
%exclude %{installbase}/*/*/*/*/*.py?
0939811
%exclude %{ansible_collection_files}/%{collection_name}/*/*/*.py?
0939811
%exclude %{ansible_collection_files}/%{collection_name}/*/*/*/*.py?
0939811
%exclude %{ansible_collection_files}/%{collection_name}/*/*/*/*/*.py?
0939811
%endif
4f0c496
38bbbaa
%if %{with collection_artifact}
38bbbaa
%files collection-artifact
38bbbaa
%{_datadir}/ansible/collections/%{collection_namespace}-%{collection_name}-%{version}.tar.gz
38bbbaa
%endif
38bbbaa
4f0c496
%changelog
db15385
* Tue Oct 19 2021 Rich Megginson <rmeggins@redhat.com> - 1.9.0-2
db15385
- customize galaxy.yml for Red Hat
db15385
  Resolves rhbz#2011808 (EL8)
db15385
  Resolves rhbz#2012342 (EL9)
db15385
- use release_collection.py to assemble the collection - replaces lsr_role2collection.py
db15385
  Resolves rhbz#2012298 (EL9)
db15385
  Resolves rhbz#2012316 (EL8)
db15385
72db513
* Wed Oct 6 2021 Sergei Petrosian <spetrosi@redhat.com> - 1.9.0-1
72db513
- Support ansible-core and improve roles:
72db513
  - selinux: Add support for Rocky Linux 8, fix ansible_distribution_major_version
72db513
  - timesync: Support ansible-core, use ansible_managed | comment
72db513
  - kdump: Support ansible-core, use ansible_managed | comment
72db513
  - network: Support ansible-core; deprecate RHEL 9 in readme; validate that ipv6_disabled is conflicting with other settings; specify PCI address to configure profile - adds match and path settings)
72db513
  - storage: Support ansible-core, add skip checks feature to speed up the tests
72db513
  - logging: Support ansible-core, add the `uid` option for elasticsearch, improve performance, use ansible_manged | comment
6a1f872
    Resolves rhbz#1990490
72db513
  - ssh: Use ansible_manged | comment
72db513
  - sshd: Use ansible_managed | comment
72db513
  - ha_cluster: Support ansible-core, fix password_hash salt length
72db513
  - vpn: Support ansible-core, use wait_for_connection instead of wait_for with ssh
72db513
  - ansible_managed | comment BZs:
6a1f872
    Resolves rhbz#2006230 (EL9)
6a1f872
    Resolves rhbz#2006231 (EL8)
6a1f872
    Resolves rhbz#2006233 (EL7)
6a1f872
  - Support ansible-core BZs:
6a1f872
    Resolves rhbz#2012298 (EL9)
6a1f872
    Resolves rhbz#2012316 (EL8)
72db513
b9986c7
* Wed Sep 22 2021 Rich Megginson <rmeggins@redhat.com> - 1.8.2-3
b9986c7
- untar the collection tarballs and copy the files
b9986c7
ff949aa
* Wed Sep 22 2021 Noriko Hosoi <nhosoi@redhat.com> - 1.8.2-2
ff949aa
- Add vendoring code for rhel / centos
ff949aa
  - selinux: selinux, seboolean, seport, selogin, sefcontext
ff949aa
  - storage: mount
ff949aa
  - vpn: ipaddr
ff949aa
  Resolves rhbz#2006076 (EL9)
ff949aa
  Resolves rhbz#2006081 (EL8)
ff949aa
28f40e0
* Thu Aug 26 2021 Rich Megginson <rmeggins@redhat.com> - 1.8.2-1
28f40e0
- logging - Update the certificates copy tasks
28f40e0
  Resolves rhbz#1996777 (EL9)
28f40e0
  Resolves rhbz#1994580 (EL8)
28f40e0
- storage - revert the dm-vdo workaround fix for vdo testing
28f40e0
  Resolves rhbz#1978488 (EL9)
28f40e0
  Resolves rhbz#1991141 (EL8)
28f40e0
ebbd49b
* Fri Aug 20 2021 Rich Megginson <rmeggins@redhat.com> - 1.8.1-2
ebbd49b
- selinux - tag tests_selinux_disabled.yml with tests::avc
ebbd49b
  Resolves rhbz#1996315 (EL9)
ebbd49b
  Resolves rhbz#1996317 (EL8)
ebbd49b
06ff97e
* Mon Aug 16 2021 Rich Megginson <rmeggins@redhat.com> - 1.8.1-1
06ff97e
- metrics - the bpftrace role does not properly configure bpftrace agent
06ff97e
  Resolves rhbz#1994180 (EL9)
ebbd49b
  Resolves rhbz#1993240 (EL8)
06ff97e
8614462
* Thu Aug 12 2021 Rich Megginson <rmeggins@redhat.com> - 1.8.0-1
8614462
- drop support for Ansible 2.8 - min_ansible_version is now 2.9
8614462
  Resolves rhbz#1989197 (EL9)
8614462
  Resolves rhbz#1989199 (EL8)
8614462
- sshd - fix rhel6 support - failed to validate: error:Missing Match criteria for all Bad Match condition
8614462
  Resolves rhbz#1991598 (EL9)
8614462
  Resolves rhbz#1990947 (EL8)
8614462
a85ede7
* Fri Aug 06 2021 Rich Megginson <rmeggins@redhat.com> - 1.7.5-1
a85ede7
- storage - tests_create_lvmvdo_then_remove fails - Module dm-vdo not found
a85ede7
  Resolves rhbz#1991141 (EL8)
a85ede7
  Resolves rhbz#1991062 (EL9)
a85ede7
- storage - Get syntax errors in tests_lvm_errors.yml
a85ede7
  Resolves rhbz#1990793 (EL8)
a85ede7
  Resolves rhbz#1991142 (EL9)
a85ede7
6e83ea8
* Fri Aug 06 2021 Rich Megginson <rmeggins@redhat.com> - 1.7.4-1
6e83ea8
- logging, certificate - Instead of the archive module, use "tar" command for backup.
6e83ea8
  Resolves rhbz#1984182 (EL9)
6e83ea8
  Resolves rhbz#1987096 (EL8)
6e83ea8
- logging - Add a support for list value to server_host in the elasticsearch output
6e83ea8
  Resolves rhbz#1986460 (EL9)
6e83ea8
  Resolves rhbz#1986463 (EL8)
6e83ea8
- logging - tests_relp.yml; Can't detect any of the required Python libraries cryptography (>= 1.2.3) or PyOpenSSL (>= 0.6)
6e83ea8
  Resolves rhbz#1989962 (EL9)
6e83ea8
  Resolves rhbz#1990142 (EL8)
6e83ea8
a919765
* Tue Aug 03 2021 Rich Megginson <rmeggins@redhat.com> - 1.7.3-1
a919765
- storage - tag tests that use NVME and SCSI
a919765
  Resolves rhbz#1989211 (EL9)
a919765
  Resolves rhbz#1989638 (EL8)
a919765
f988cf1
* Tue Aug 03 2021 Rich Megginson <rmeggins@redhat.com> - 1.7.2-1
f988cf1
- sshd - support for rhel9 managed hosts
f988cf1
  Resolves rhbz#1989221 (EL9)
f988cf1
  Resolves rhbz#1989638 (EL8)
f988cf1
c9b7a09
* Thu Jul 29 2021 Rich Megginson <rmeggins@redhat.com> - 1.7.1-1
c9b7a09
- network - tests_provider_nm.yml fails with an error: Failure in test 'I can manage a veth interface with NM after I managed it with initscripts.
c9b7a09
  Resolves rhbz#1935919
c9b7a09
- network - _initscripts tests fail because "No package network-scripts available."
c9b7a09
  Resolves rhbz#1935916
c9b7a09
- network - Test tests_bond_initscripts.yml failed to create interface
c9b7a09
  Resolves rhbz#1980870
c9b7a09
- storage - covscan error - DEADCODE - vdopool if create_vdo else parent
c9b7a09
  Resolves rhbz#1985571 (EL9)
c9b7a09
  Resolves rhbz#1985572 (EL8)
c9b7a09
- network - network: tests_bond_initscripts.yml leaves behind unusable resolv.conf in CI
c9b7a09
  Resolves rhbz#1915017
c9b7a09
597164e
* Wed Jul 28 2021 Rich Megginson <rmeggins@redhat.com> - 1.7.0-1
526c86f
- network - Skip tests on RHEL9 that use hostapd
526c86f
  Resolves rhbz#1945348
526c86f
- network - Fix the bond test on DHCP
526c86f
  Resolves rhbz#1918252
597164e
- certificate, logging - Use 'tar' command instead of archive module
597164e
  Resolves rhbz#1984182 (EL9)
597164e
  Resolves rhbz#1987096 (EL8)
597164e
- kernel_settings - Disable bootloader testing on EL9
597164e
  Resolves rhbz#1944599
597164e
- logging - Add a support for list value to server_host in the elasticsearch output
597164e
  Resolves rhbz#1986460 (EL9)
597164e
  Resolves rhbz#1986463 (EL8)
597164e
- storage - Add support for percentage-based volume sizes
597164e
  Resolves rhbz#1984583 (EL9)
597164e
  Resolves rhbz#1894642 (EL8)
597164e
- storage -storage_test_actual_size != storage_test_requested_size observed with tests_lvm_auto_size_cap.yml
597164e
  Resolves rhbz#1986284 (EL8)
526c86f
a9d89f4
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-1
a9d89f4
- Error: device becoming unmanaged and pytest not reproducible in tests_integration_pytest.yml
a9d89f4
  Resolves rhbz#1985382 (EL9)
a9d89f4
  Resolves rhbz#1932699 (EL8)
a9d89f4
- EPEL yum repository configuration for tests
a9d89f4
  Rebasing to latest picks up this fix - see rhel7 bz1980439
a9d89f4
- connections: workaround DeprecationWarning for NM.SettingEthtool.set_feature()
a9d89f4
  Rebasing to latest picks up this fix
a9d89f4
bc2f2ba
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.1-2
bc2f2ba
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
bc2f2ba
882dfa0
* Tue Jul 20 2021 Rich Megginson <rmeggins@redhat.com> - 1.6.1-1
882dfa0
- metrics - Grafana dashboard not working after metrics role run unless services manually restarted
882dfa0
  Resolves rhbz#1984150 (EL9)
882dfa0
  Resolves rhbz#1978357 (EL8)
882dfa0
f2813e8
* Thu Jul 15 2021 Rich Megginson <rmeggins@redhat.com> - 1.6.0-1
f2813e8
- ha_cluster - add pacemaker cluster properties configuration
f2813e8
  Resolves rhbz#1982913 (EL8)
f2813e8
  Resolves rhbz#1982906 (EL9)
f2813e8
470be0e
* Thu Jul 15 2021 Rich Megginson <rmeggins@redhat.com> - 1.5.0-1
470be0e
- crypto_policies - rename 'policy modules' to 'subpolicies'
470be0e
  Resolves rhbz#1982896 (EL9)
470be0e
  Resolves rhbz#1982897 (EL8)
470be0e
453a746
* Thu Jul 15 2021 Rich Megginson <rmeggins@redhat.com> - 1.4.2-1
453a746
- storage - relabel doesn't support - Fixed volume relabeling
453a746
  Resolves rhbz#1876315 (EL8)
453a746
  Resolves rhbz#1982841 (EL9)
453a746
879bbec
* Fri Jul  9 2021 Rich Megginson <rmeggins@redhat.com> - 1.4.1-1
879bbec
- network - Re-running the network system role results in "changed: true" when nothing has actually changed
879bbec
  Resolves rhbz#1943384
879bbec
- network - Test tests_bond_initscripts.yml failed to create interface
879bbec
  Resolves rhbz#1918210
879bbec
f3ca7c3
* Thu Jul  8 2021 Rich Megginson <rmeggins@redhat.com> - 1.4.0-1
f3ca7c3
- storage - LVMVDO support
f3ca7c3
  Resolves rhbz#1882475
f3ca7c3
  Resolves rhbz#1978488
f3ca7c3
f0ea5fb
* Wed Jun 23 2021 Rich Megginson <rmeggins@redhat.com> - 1.3.0-1
f0ea5fb
- ha_cluster - add pacemaker resources configuration
f0ea5fb
  Resolves rhbz#1963283
f0ea5fb
- ha_cluster - code cleanup
f0ea5fb
  Resolves rhbz#1970666
f0ea5fb
- Postfix RHEL system role README.md missing variables under the "Role Variables" section
f0ea5fb
  Resolves rhbz#1961858
f0ea5fb
- logging README.html examples are rendered incorrectly
f0ea5fb
  Resolves rhbz#1962374
f0ea5fb
- make postfix role idempotent - round 2
f0ea5fb
  Resolves rhbz#1960375
f0ea5fb
- selinux task for semanage says Fedora in name but also runs on RHEL/CentOS 8
f0ea5fb
  Resolves rhbz#1966681
f0ea5fb
- metrics role task to enable logging for targeted hosts not working
f0ea5fb
  Resolves rhbz#1967335
f0ea5fb
- network - Add 'auto_gateway' option
f0ea5fb
  Resolves rhbz#1897565
f0ea5fb
- network - Only show stderr_lines by default
f0ea5fb
  Resolves rhbz#1970666
f0ea5fb
- storage - LVMVDO support
f0ea5fb
  Resolves rhbz#1882475
f0ea5fb
- storage - fix several linter issues
f0ea5fb
  Resolves rhbz#1970666
f0ea5fb
- ssh - Fix variable precedence when invoked through roles
f0ea5fb
  Resolves rhbz#1966711
f0ea5fb
- ssh - Update configuration options list for OpenSSH 8.6
f0ea5fb
  Resolves rhbz#1970666
f0ea5fb
- sshd - Fix variable precedence when invoked through roles
f0ea5fb
  Resolves rhbz#1966711
f0ea5fb
- sshd - Update configuration options list for OpenSSH 8.6
f0ea5fb
  Resolves rhbz#1970666
f0ea5fb
- sshd - support for appending a snippet to configuration file
f0ea5fb
  Resolves rhbz#1970642
f0ea5fb
- timesync - add NTS support
f0ea5fb
  Resolves rhbz#1970664
f0ea5fb
- timesync - rebase to latest
f0ea5fb
  Resolves rhbz#1970666
f0ea5fb
- nbde_client - rebase to latest
f0ea5fb
  Resolves rhbz#1970666
f0ea5fb
f04c75a
* Thu Jun 17 2021 Sergei Petrosian <spetrosi@redhat.com> - 1.2.3-3
f04c75a
- Make the ansible_collection_files macro defined in Fedora automatically and
f04c75a
  in RHEL manually consistent - having slash at the end to clean double-slashes
f04c75a
7c7eb82
* Wed Jun 16 2021 Sergei Petrosian <spetrosi@redhat.com> - 1.2.3-2
7c7eb82
- Remove slash (/) from the end of URLs to improve code readability
7c7eb82
cd1dc11
* Wed Jun 16 2021 Noriko Hosoi <nhosoi@redhat.com> - 1.2.3-1
cd1dc11
- Add EL 9 support for timesync and network
cd1dc11
  Resolves rhbz#1952887
cd1dc11
22443d9
* Tue Jun 15 2021 Rich Megginson <rmeggins@redhat.com> - 1.2.2-3
22443d9
- Fix HTML rendering of internal links when using pandoc/asciidoc
22443d9
- Uses pandoc gfm instead of markdown_github
22443d9
  Resolves rhbz#1962976
22443d9
387a7f8
* Fri Jun 11 2021 Noriko Hosoi <nhosoi@redhat.com> - 1.2.2-2
387a7f8
- Make spec file available for older versions of OSes.
387a7f8
- Drop python3-six dependency which was used by lsr_role2collection.py.
387a7f8
- Drop html files from rpm if the version has no markdown parser.
387a7f8
- Drop unnecessary python scripts which include python3 only code, e.g.,
387a7f8
  f-strings.
387a7f8
  Resolves rhbz#1970165
387a7f8
c3e536f
* Wed Jun  9 2021 Rich Megginson <rmeggins@redhat.com> - 1.2.2-1
c3e536f
- fix kdump tests_ssh for basic smoke test
c3e536f
  Resolves rhbz#1957876
c3e536f
512e2de
* Fri May 21 2021 Noriko Hosoi <nhosoi@redhat.com> - 1.2.1-1
512e2de
- fix logging README.html examples' rendering problems
512e2de
  Resolves rhbz#1962374
512e2de
- fix broken internal links in README.md files
512e2de
  Resolves rhbz#1962976
512e2de
387a7f8
* Fri May 21 2021 Sergei Petrosian <spetrosi@redhat.com> - 1.2.0-2
8169129
- Add BuildRequires: rubygem-kramdown for Fedora and RHEL >= 9
8169129
2706688
* Fri May 14 2021 Rich Megginson <rmeggins@redhat.com> - 1.2.0-1
2706688
- rebase roles to latest upstream
2706688
  Resolves rhbz#1957876
2706688
- make postfix role idempotent
2706688
  Resolves rhbz#1960375
2706688
- use FQRN in postfix README
2706688
  Resolves rhbz#1958963
2706688
- use relayhost in postfix README
2706688
  Resolves rhbz#1866544
2706688
- use lazy unmount to fix umount: target is busy
2706688
  Resolves rhbz#1945359
2706688
- network - Add support for ETHTOOL Ring option
2706688
  Resolves rhbz#1959649
2706688
- storage: calltrace observed when set type: partition for storage_pools
2706688
  Resolves rhbz#1854187
2706688
- ha_cluster - cannot read preshared key in binary format
2706688
  Resolves rhbz#1952620
2706688
34c4a9c
* Thu May 13 2021 Noriko Hosoi <nhosoi@redhat.com> - 1.1.0-2
34c4a9c
- Dependencies in the collection packaging
34c4a9c
  Resolves rhbz#1954747
34c4a9c
34ace9e
* Wed Apr 14 2021 Rich Megginson <rmeggins@redhat.com> - 1.1.0-1
34ace9e
- rebase timesync role to latest upstream
34ace9e
  Resolves rhbz#1937938
34ace9e
- timesync - add timesync_chrony_custom_settings variable for free-form
34ace9e
  local configs
34ace9e
  Resolves rhbz#1938023
34ace9e
- do not use ignore_errors in timesync role
34ace9e
  Resolves rhbz#1938014
34ace9e
- support for timesync_max_distance to configure maxdistance/maxdist parameter
34ace9e
  Resolves rhbz#1938016
34ace9e
- support for ntp xleave, filter, and hw timestamping
34ace9e
  Resolves rhbz#1938020
74bb4cd
- rebase selinux role to latest upstream
74bb4cd
  Resolves rhbz#1937938
74bb4cd
- should not reload the SELinux policy if its not changed
74bb4cd
  Resolves rhbz#1757869
74bb4cd
- Ability to install custom SELinux module via Ansible
74bb4cd
  Resolves rhbz#1848683
7558482
- rebase storage role to latest upstream
7558482
  Resolves rhbz#1937938
942d117
- rebase network role to latest upstream
942d117
  Resolves rhbz#1937938
942d117
- support for ipv6_disabled to disable ipv6 for address
942d117
  Resolves rhbz#1939711
c8d36f1
- rebase postfix role to latest upstream
c8d36f1
  Resolves rhbz#1937938
fc6594c
- rebase metrics role to latest upstream
fc6594c
  Resolves rhbz#1937938
adc3f96
- rebase sshd role to latest upstream
adc3f96
  Resolves rhbz#1937938
39d4b36
- rebase remaining roles to latest upstream
39d4b36
  Resolves rhbz#1937938
3aabdba
- Generate %%files dynamically
decbb9d
- add vpn role
decbb9d
  Resolves rhbz#1943679
34ace9e
38bbbaa
* Tue Apr 13 2021 Noriko Hosoi <nhosoi@redhat.com> - 1.0.1-2
38bbbaa
- Adding the -collection-artifact subpackage, enabled using
38bbbaa
  "--with collection_artifact". It is used for importing to
38bbbaa
  ansible galaxy/automation hub.
faabe10
- README.html files (main README for the collection and README
faabe10
  for each role) are not located in /usr/share/ansible/collections,
faabe10
  but just put in /usr/share/doc/linux-system-roles/collection in rpm.
faabe10
- The README.html files are not included in the collection artifact.
bbca426
- Fixing "sshd role README.md examples use incorrect role name".
38bbbaa
a92e661
* Tue Apr  6 2021 Pavel Cahyna <pcahyna@redhat.com> - 1.0.1-1
a92e661
- Sync with RHEL version 1.0.1-1.el8
a92e661
  Fix description field in galaxy.yml
a92e661
  Remove "Technology Preview" from Collection README
a92e661
  Merging individual ignore file and add it to the package
a92e661
  Add a note to each module Doc to indicate it is private
a92e661
  Add patches for network and storage role ansible-test fixes
a92e661
  Simplify doc tags in %%files, corrects a forgotten doc tag for ha_cluster
a92e661
  Suppress one ansible-lint warning in ha_cluster
a92e661
  Add patch for the inclusive language leftover on network-role README.md
a92e661
490700e
* Mon Feb 22 2021 Pavel Cahyna <pcahyna@redhat.com> - 1.0.0-16
490700e
- Sync with RHEL version 1.0.0-31
490700e
  Rebase certificate role to pick up a test fix
490700e
  Rebase logging role to fix default private key path,
490700e
  upstream PR #218
490700e
  Update collection doc transformation to match a modified text
490700e
  and include the Tech Preview note again (for RHEL)
490700e
f9d616f
* Fri Feb 19 2021 Pavel Cahyna <pcahyna@redhat.com> - 1.0.0-15
f9d616f
- Sync with RHEL version 1.0.0-29
f9d616f
  Added roles: ssh, ha_cluster
f9d616f
  Updated roles: certificate, kernel_settings, nbde_client,
f9d616f
  logging, network
f9d616f
  Improvements to collection build and metadata
f9d616f
- Two further improvements from RHEL:
f9d616f
  Corrected merge botch in files list - make ssh README a docfile
f9d616f
  Dynamically update galaxy.yml with our metadata even on Fedora,
f9d616f
  we can't rely on correct version number in auto-maintenance
f9d616f
7e67ef5
* Tue Feb  9 2021 Pavel Cahyna <pcahyna@redhat.com> - 1.0.0-14
7e67ef5
- Synchronize with RHEL, new roles added:
7e67ef5
  storage, metrics, tlog, kernel_settings, logging, nbde_server,
7e67ef5
  nbde_client, certificate, crypto_policies, sshd, and the
7e67ef5
  fedora.linux_system_roles collection.
7e67ef5
36c48d6
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-13
36c48d6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
36c48d6
e7629fb
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-12
e7629fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
e7629fb
9826975
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-11
9826975
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
9826975
dc4bff5
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-10
dc4bff5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
dc4bff5
fbaa090
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-9
fbaa090
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
fbaa090
ceb7e05
* Wed Dec 05 2018 Till Maas <opensource@till.name> - 1.0-8
ceb7e05
- Install roles at /usr/share/linux-system-roles, use symlinks in
ceb7e05
  /usr/share/ansible/roles/ to allow using alternatives
ceb7e05
c88da19
* Wed Nov 14 2018 Mike DePaulo <mikedep333@gmail.com> - 1.0-7
c88da19
- spec file improvement: Remove unnecessary %%doc for files under _pkgdocdor
23afe6b
- Install license files under /usr/share/licenses instead of /usr/share/doc
c88da19
25bb523
* Tue Nov 06 2018 Mike DePaulo <mikedep333@gmail.com> - 1.0-7
d9634a6
- Fix rpm build for added example timesync example playbooks
d9634a6
- Misc spec file comments fixes
d9634a6
- Fix rpmlint error by escaping a previous changelog entry with a macro
a4f11b7
- Comply with Fedora guidelines by always using "cp -p" in %%install
25bb523
- Update %%description to be different for Fedora.
d9634a6
1add951
* Wed Oct 24 2018 Pavel Cahyna <pcahyna@redhat.com> - 1.0-7
1add951
- Update to latest versions of selinux, kdump and timesync.
eb5bc48
- Update to the latest revision of postfix, fixes README markup
1add951
- Add Obsoletes for the -techpreview subpackage introduced mistakenly in 1.0-1
b6e295a
- spec file improvement: Unify the source macros with deftag() and defcommit()
1add951
451d940
* Tue Oct 23 2018 Till Maas <opensource@till.name> - 1.0-6
451d940
- Update Network system role to latest commit to include Fedora 29 fixes
451d940
- Update example timesync example playbooks
451d940
- Add comments about upstream status
451d940
4f0c496
* Tue Aug 14 2018 Pavel Cahyna <pcahyna@redhat.com> - 1.0-4
4f0c496
- Format the READMEs as html, by vdolezal, with changes to use highlight
4f0c496
  (source-highlight does not understand YAML)
4f0c496
4f0c496
* Thu Aug  9 2018 Pavel Cahyna <pcahyna@redhat.com> - 1.0-3
4f0c496
- Rebase the network role to the last revision (d866422).
4f0c496
  Many improvements to tests, introduces autodetection of the current provider
4f0c496
  and defaults to using profile name as interface name.
4f0c496
- Rebase the selinux, timesync and kdump roles to their 1.0rc1 versions.
4f0c496
  Many changes to the role interfaces to make them more consistent
4f0c496
  and conforming to Ansible best practices.
4f0c496
- Update the description.
4f0c496
4f0c496
* Fri May 11 2018 Pavel Cahyna <pcahyna@redhat.com> - 0.6-4
4f0c496
- Fix complaints about /usr/bin/python during RPM build by making the affected scripts non-exec
4f0c496
- Fix merge botch
4f0c496
4f0c496
* Mon Mar 19 2018 Troy Dawson <tdawson@redhat.com> - 0.6-3.1
acb49f6
- Use -a (after cd) instead of -b (before cd) in %%setup
4f0c496
4f0c496
* Wed Mar 14 2018 Pavel Cahyna <pcahyna@redhat.com> - 0.6-3
4f0c496
- Minor corrections of the previous change by Till Maas.
4f0c496
4f0c496
* Fri Mar  9 2018 Pavel Cahyna <pcahyna@redhat.com> - 0.6-2
4f0c496
- Document network role options: static routes, ethernet, dns
4f0c496
  Upstream PR#36, bz1550128, documents bz1487747 and bz1478576
4f0c496
4f0c496
* Tue Jan 30 2018 Pavel Cahyna <pcahyna@redhat.com> - 0.6-1
4f0c496
- Drop hard dependency on ansible (#1525655), patch from Yaakov Selkowitz
4f0c496
- Update the network role to version 0.4, solves bz#1487747, bz#1478576
4f0c496
4f0c496
* Tue Dec 19 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.5-3
4f0c496
- kdump: fix the wrong conditional for ssh checking and improve test (PR#10)
4f0c496
4f0c496
* Tue Nov 07 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.5-2
4f0c496
- kdump: add ssh support. upstream PR#9, rhbz1478707
4f0c496
4f0c496
* Tue Oct 03 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.5-1
4f0c496
- SELinux: fix policy reload when SELinux is disabled on CentOS/RHEL 6
4f0c496
  (bz#1493574)
4f0c496
- network: update to b856c7481bf5274d419f71fb62029ea0044b3ec1 :
4f0c496
  makes the network role idempotent (bz#1476053) and fixes manual
4f0c496
  network provider selection (bz#1485074).
4f0c496
4f0c496
* Mon Aug 28 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.4-1
4f0c496
- network: update to b9b6f0a7969e400d8d6ba0ac97f69593aa1e8fa5:
4f0c496
  ensure that state:absent followed by state:up works (bz#1478910), and change
4f0c496
  the example IP adresses to the IANA-assigned ones.
4f0c496
- SELinux: fix the case when SELinux is disabled (bz#1479546).
4f0c496
4f0c496
* Tue Aug 8 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.3-2
4f0c496
- We can't change directories to symlinks (rpm bug #447156) so keep the old
4f0c496
  names and create the new names as symlinks.
4f0c496
4f0c496
* Tue Aug 8 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.3-1
4f0c496
- Change the prefix to linux-system-roles., keeping compatibility
4f0c496
  symlinks.
4f0c496
- Update the network role to dace7654feb7b5629ded0734c598e087c2713265:
4f0c496
  adds InfiniBand support and other fixes.
4f0c496
- Drop a patch included upstream.
4f0c496
4f0c496
* Mon Jun 26 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.2-2
4f0c496
- Leave a copy of README and COPYING in every role's directory, as suggested by T. Bowling.
4f0c496
- Move the network example inventory to the documentation directory together.
4f0c496
  with the example playbooks and delete the now empty "examples" directory.
4f0c496
- Use proper reserved (by RFC 7042) MAC addresses in the network examples.
4f0c496
4f0c496
* Tue Jun 6 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.2-1
4f0c496
- Update the networking role to version 0.2 (#1459203)
4f0c496
- Version every role and the package separately. They live in separate repos
4f0c496
  and upstream release tags are not coordinated.
4f0c496
4f0c496
* Mon May 22 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.1-2
4f0c496
- Prefix the roles in examples and documentation with rhel-system-roles.
4f0c496
4f0c496
* Thu May 18 2017 Pavel Cahyna <pcahyna@redhat.com> - 0.1-1
4f0c496
- Update to 0.1 (first upstream release).
4f0c496
- Remove the tuned role, it is not ready yet.
4f0c496
- Move the example playbooks to /usr/share/doc/rhel-system-roles/$SUBSYSTEM
4f0c496
  directly to get rid of an extra directory.
4f0c496
- Depend on ansible.
4f0c496
4f0c496
* Thu May 4 2017  Pavel Cahyna <pcahyna@redhat.com> - 0-0.1.20170504
4f0c496
- Initial release.
4f0c496
- kdump r. fe8bb81966b60fa8979f3816a12b0c7120d71140
4f0c496
- postfix r. 43eec5668425d295dce3801216c19b1916df1f9b
4f0c496
- selinux r. 1e4a21f929455e5e76dda0b12867abaa63795ae7
4f0c496
- timesync r. 33a1a8c349de10d6281ed83d4c791e9177d7a141
4f0c496
- tuned r. 2e8bb068b9815bc84287e9b6dc6177295ffdf38b
4f0c496
- network r. 03ff040df78a14409a0d89eba1235b8f3e50a750
4f0c496