Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 5.0.0 #85

Merged
merged 39 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
228c4be
Bump version to 4.3.0-dev
evgeni Aug 30, 2024
e27bcbf
update inventory tests to Foreman 3.12 and PostgreSQL 13
evgeni Sep 2, 2024
221b0a1
fix sync plans role tests
evgeni Sep 6, 2024
defc756
fix resource_info tests
evgeni Sep 10, 2024
68256d9
don't require password_hash when creating an OS
evgeni Sep 12, 2024
f1e53a9
Add Ansible 2.18 to test matrix
evgeni Sep 24, 2024
f909a92
Update README.md
abradshaw Sep 26, 2024
e7ba006
adjust compute profiles role test setup
evgeni Sep 27, 2024
c972e56
cleanup maybe existing hostgroups
evgeni Oct 4, 2024
ff0d153
re-record hostgroup on recent nightly
evgeni Oct 4, 2024
1ece6a2
add Python 3.13 to CI
evgeni Oct 8, 2024
e95f577
split inventory plugin setup in container and data steps
evgeni Sep 2, 2024
b816765
allow disabling of container usage in inventory tests
evgeni Sep 2, 2024
cfb0807
allow using a different foreman url/username/pass in inventory tests
evgeni Sep 2, 2024
298319c
move inventory specific vars to an own file
evgeni Sep 2, 2024
fb0a70d
don't always require community.docker
evgeni Sep 5, 2024
286ceab
install community docker for 2.9 ansible too
evgeni Sep 5, 2024
4bd3992
allow overriding pytest command
evgeni Oct 17, 2024
226cd56
Drop support for Python 2.7 and 3.5
evgeni Oct 28, 2024
62b1165
keep running GH workflow with -vv
evgeni Oct 28, 2024
a70672c
support hidden values when creating params
evgeni Oct 4, 2024
e5a488b
test hidden params in hostgroup
evgeni Oct 8, 2024
e53808c
also fetch hidden params for other entities
evgeni Oct 8, 2024
fa555d5
re-record subnet
evgeni Oct 8, 2024
193a024
re-record domain
evgeni Oct 8, 2024
40635a6
re-record host_interface_attributes
evgeni Oct 8, 2024
7bbd011
re-record host
evgeni Oct 8, 2024
a0aa2f4
re-record katello_hostgroup
evgeni Oct 15, 2024
935f365
re-record luna_hostgroup
evgeni Oct 15, 2024
331bb4d
set collections_path in ansible.cfg for tests
evgeni Oct 30, 2024
5ccdf18
Drop support for Ansible 2.9
evgeni Nov 7, 2024
a0fbed2
redhat_manifest: drop Ansible pre 2.9 special casing
evgeni Nov 7, 2024
a9a2e13
ignore _ansible_internal_redirect_list in callback tests
evgeni Nov 7, 2024
7944e73
support bare "from typing" imports that are not guarded
evgeni Nov 19, 2024
203f451
drop old rpm-python for Python2 from bindep
evgeni Nov 10, 2024
a03ea94
Update vendored apypie version to 0.5.0
evgeni Nov 21, 2024
6f0e926
don't try/except typing imports anymore
evgeni Nov 21, 2024
67e7c26
Release 5.0.0
evgeni Nov 22, 2024
59e6137
Merge tag 'v5.0.0' into rel500
evgeni Nov 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 13 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push, pull_request]
env:
COLORTERM: 'yes'
TERM: 'xterm-256color'
PYTEST_ADDOPTS: '--color=yes'
PYTEST_ADDOPTS: '-vv --color=yes'

concurrency:
group: ${{ github.ref_name }}-${{ github.workflow }}
Expand All @@ -25,18 +25,11 @@ jobs:
- stable-2.15
- stable-2.16
- stable-2.17
- stable-2.18
- devel
include:
- python: "3.8"
ansible: "v2.9.17"
- python: "3.8"
ansible: "stable-2.10"
- python: "2.7"
ansible: "stable-2.11"
container: "python:2.7"
- python: "3.5"
ansible: "stable-2.11"
container: "python:3.5"
ansible: "v2.10.4"
- python: "3.6"
ansible: "stable-2.11"
- python: "3.7"
Expand All @@ -49,6 +42,8 @@ jobs:
ansible: "stable-2.13"
- python: "3.12"
ansible: "devel"
- python: "3.13"
ansible: "devel"
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand All @@ -72,16 +67,19 @@ jobs:
if: matrix.container == null
- name: Install Ansible
run: pip install --upgrade https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz
- name: Ensure Jinja version is old enough for Ansible 2.9
- name: Ensure Jinja version is old enough for Ansible 2.10
run: pip install --upgrade 'Jinja2<3.1'
if: matrix.ansible == 'v2.9.17'
if: matrix.ansible == 'v2.10.4'
- name: Install dependencies
run: make test-setup
- name: prepare a redhat-uep.pem, even if we run on Ubuntu
run: sudo mkdir -p /etc/rhsm/ca/ && sudo curl -o /etc/rhsm/ca/redhat-uep.pem https://ftp.redhat.com/redhat/convert2rhel/redhat-uep.pem
- name: Install required collections for ansible-base (2.10+)
- name: Install required collections
run: ansible-galaxy collection install https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/community-docker-3.12.0.tar.gz
if: matrix.ansible != 'v2.9.17'
if: matrix.ansible != 'v2.10.4'
- name: Install required collections for ansible 2.10
run: ansible-galaxy collection install https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/community-docker-2.7.12.tar.gz
if: matrix.ansible == 'v2.10.4'
- name: Run crud tests
run: make test-crud
- name: Run other tests
Expand All @@ -90,7 +88,7 @@ jobs:
run: make dist-test
- name: Run sanity tests
run: make SANITY_OPTS="--docker" sanity
if: matrix.ansible != 'v2.9.17' && matrix.ansible != 'stable-2.10' && matrix.ansible != 'stable-2.11' && matrix.ansible != 'stable-2.12' && matrix.ansible != 'stable-2.13' && matrix.ansible != 'stable-2.14'
if: matrix.ansible != 'v2.10.4' && matrix.ansible != 'stable-2.11' && matrix.ansible != 'stable-2.12' && matrix.ansible != 'stable-2.13' && matrix.ansible != 'stable-2.14'

checkmode:
runs-on: ubuntu-latest
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ redhat.satellite Release Notes

This changelog describes changes after version 0.8.1.

v5.0.0
======

Minor Changes
-------------

- host, hostgroup, domain, operatingsystem, subnet, organization, location - support setting hidden parameters

Breaking Changes / Porting Guide
--------------------------------

- Drop support for Ansible 2.9.
- Drop support for Python 2.7 and 3.5.

v4.2.0
======

Expand Down
19 changes: 10 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ $(foreach PLUGIN_TYPE,$(PLUGIN_TYPES),$(eval _$(PLUGIN_TYPE) := $(filter-out %__
DEPENDENCIES := $(METADATA) $(foreach PLUGIN_TYPE,$(PLUGIN_TYPES),$(_$(PLUGIN_TYPE))) $(foreach ROLE,$(ROLES),$(wildcard $(ROLE)/*/*)) $(foreach ROLE,$(ROLES),$(ROLE)/README.md) $(TESTDATA)

PYTHON_VERSION = $(shell $(PYTHON_COMMAND) -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')
ANSIBLE_SUPPORTS_REDIRECTS = $(shell ansible --version | grep -q 'ansible 2.9' && echo 0 || echo 1)
COLLECTION_COMMAND ?= ansible-galaxy
SANITY_OPTS = --venv
TEST =
FLAGS =
PYTEST = pytest -n 4 --forked -vv
PYTEST_COMMAND ?= pytest
PYTEST = $(PYTEST_COMMAND) -n 4 --forked
# PYTEST_ADDOPTS is exported to sub-shells and picked up by *all* pytest invocations
PYTEST_ADDOPTS ?= -vv
export PYTEST_ADDOPTS

APIPIE_VERSION ?= v0.4.0
APIPIE_VERSION ?= v0.5.0

default: help
help:
Expand Down Expand Up @@ -72,17 +75,17 @@ test-other:
$(PYTEST) -k 'not test_crud.py'

livetest: $(MANIFEST) | tests/test_playbooks/vars/server.yml
pytest -vv 'tests/test_crud.py::test_crud' --vcrmode live $(FLAGS)
$(PYTEST_COMMAND) 'tests/test_crud.py::test_crud' --vcrmode live $(FLAGS)

test_%: FORCE $(MANIFEST) | tests/test_playbooks/vars/server.yml
pytest -vv 'tests/test_crud.py::test_crud[$*]' 'tests/test_crud.py::test_check_mode[$*]' $(FLAGS)
$(PYTEST_COMMAND) 'tests/test_crud.py::test_crud[$*]' 'tests/test_crud.py::test_check_mode[$*]' $(FLAGS)

livetest_%: FORCE $(MANIFEST) | tests/test_playbooks/vars/server.yml
pytest -vv 'tests/test_crud.py::test_crud[$*]' --vcrmode live $(FLAGS)
$(PYTEST_COMMAND) 'tests/test_crud.py::test_crud[$*]' --vcrmode live $(FLAGS)

record_%: FORCE $(MANIFEST)
$(RM) tests/test_playbooks/fixtures/$*-*.yml
pytest -vv 'tests/test_crud.py::test_crud[$*]' --vcrmode record $(FLAGS)
$(PYTEST_COMMAND) 'tests/test_crud.py::test_crud[$*]' --vcrmode record $(FLAGS)

clean_%: FORCE $(MANIFEST)
ansible-playbook --tags teardown,cleanup -i tests/inventory/hosts 'tests/test_playbooks/$*.yml'
Expand All @@ -99,9 +102,7 @@ tests/test_playbooks/vars/server.yml:

dist-test: $(MANIFEST)
SATELLITE_SERVER_URL=https://foreman.example.test ansible -m $(NAMESPACE).$(NAME).organization -a "username=admin password=changeme name=collectiontest" localhost | grep -q "Failed to connect to Foreman server.*foreman.example.test"
ifeq ($(ANSIBLE_SUPPORTS_REDIRECTS),1)
SATELLITE_SERVER_URL=https://foreman.example.test ansible -m $(NAMESPACE).$(NAME).foreman_organization -a "username=admin password=changeme name=collectiontest" localhost | grep -q "Failed to connect to Foreman server.*foreman.example.test"
endif
SATELLITE_SERVER_URL=http://foreman.example.test ansible -m $(NAMESPACE).$(NAME).organization -a "username=admin password=changeme name=collectiontest" localhost 2>&1| grep -q "You have configured a plain HTTP server URL."
ansible-doc $(NAMESPACE).$(NAME).organization | grep -q "Manage Organization"

Expand Down
2 changes: 1 addition & 1 deletion ansible.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[defaults]
collections_paths = build/collections
collections_path = build/collections
inventory = tests/inventory/hosts
retry_files_enabled = False
devel_warning = False
Expand Down
1 change: 0 additions & 1 deletion bindep.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
python3-rpm [(platform:redhat platform:base-py3)]
rpm-python [(platform:redhat platform:base-py2)]
python38-requests [platform:centos-8 platform:rhel-8]
13 changes: 13 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -915,3 +915,16 @@ releases:
- 1769-callback-vault-facts.yml
- lce-role-state.yml
release_date: '2024-08-30'
5.0.0:
changes:
breaking_changes:
- Drop support for Ansible 2.9.
- Drop support for Python 2.7 and 3.5.
minor_changes:
- host, hostgroup, domain, operatingsystem, subnet, organization, location
- support setting hidden parameters
fragments:
- 1785-hidden_parameters.yml
- drop-ansible-29.yaml
- drop-python-pre-36.yaml
release_date: '2024-11-22'
3 changes: 2 additions & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ authors:
- "Thomas Mueller <[email protected]>"
- "William Bradford Clark <[email protected]>"
- "Yifat Makias <[email protected]>"
- "ab <[email protected]>"
- "achevalet <[email protected]>"
- "alesc <[email protected]>"
- "bob <[email protected]>"
Expand All @@ -108,7 +109,7 @@ authors:
- "russianguppie <[email protected]>"
- "willtome <[email protected]>"
- "yuqo2450 <[email protected]>"
version: "4.2.0"
version: "5.0.0"
license:
- "GPL-3.0-or-later"
tags:
Expand Down
5 changes: 5 additions & 0 deletions plugins/doc_fragments/foreman.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ class ModuleDocFragment(object):
- 'yaml'
- 'json'
type: str
hidden_value:
description:
- Should the value be hidden
required: false
type: bool
'''

OS_FAMILY = '''
Expand Down
Loading
Loading