Merge pull request #1380 from rjeffman/python_requirements

Fixes several linter issues for recent tool versions.
This commit is contained in:
Thomas Woerner
2025-11-11 13:04:51 +01:00
committed by GitHub
8 changed files with 21 additions and 12 deletions

View File

@@ -13,7 +13,9 @@ parameters:
type: object
default:
- { distro: "c8s", ansible_version: "2.16" }
- { distro: "c9s", ansible_version: "2.14" }
# c9s should use 2.14, but this version has an invalid certificate
# and so is unsuable against ansible-galaxy.
- { distro: "c9s", ansible_version: "2.16" }
- { distro: "c10s", ansible_version: "2.16" }
variables:

View File

@@ -107,7 +107,7 @@ from ansible.plugins.inventory import BaseInventoryPlugin
from ansible.module_utils.six.moves.urllib.parse import quote
class InventoryModule(BaseInventoryPlugin):
class InventoryModule(BaseInventoryPlugin): # pylint: disable=R0901
NAME = 'freeipa'

View File

@@ -4,3 +4,4 @@ junit_family = xunit1
markers=
source_order: mark test as order bound
playbook: playbook tests
pythonpath = tests

View File

@@ -1,8 +1,8 @@
-r requirements.txt
pytest==7.1.3
pytest-sourceorder==0.6.0
pytest
pytest-sourceorder
pytest-split>=0.8.0
pytest-custom_exit_code>=0.3.0
pytest-testinfra==6.8.0
pytest-randomly==3.12.0
pytest-testinfra
pytest-randomly
pyyaml>=3

View File

@@ -0,0 +1 @@
setuptools

View File

@@ -181,10 +181,10 @@
- name: Install - Store the previously obtained OTP
no_log: yes
when: result_ipaclient_get_otp.host is defined
ansible.builtin.set_fact:
ipaadmin_orig_password: "{{ ipaadmin_password | default(omit) }}"
ipaadmin_password: "{{ result_ipaclient_get_otp.host.randompassword
if result_ipaclient_get_otp.host is defined }}"
ipaadmin_password: "{{ result_ipaclient_get_otp.host.randompassword | default(omit) }}"
rescue:
- name: Install - Report error for OTP generation
ansible.builtin.debug:

View File

@@ -61,7 +61,12 @@ good-names =
dt, ca,
# These are utils tools, and not part of the released collection.
galaxyfy-playbook, galaxyfy-README, galaxyfy-module-EXAMPLES,
module_EXAMPLES
module_EXAMPLES,
MODULE_IMPORT_ERROR, ANSIBLE_IPA_CLIENT_MODULE_IMPORT_ERROR,
CLIENT_SUPPORTS_NO_DNSSEC_VALIDATION, ANSIBLE_IPA_REPLICA_MODULE_IMPORT_ERROR,
SYSTEMD_RESOLVED_IPA_CONF, ANSIBLE_IPA_SERVER_MODULE_IMPORT_ERROR,
NETWORK_MANAGER_IPA_CONF, ANSIBLE_FREEIPA_MODULE_IMPORT_ERROR,
FIX_6741_DEEPCOPY_OBJECTCLASSES
[pylint.IMPORTS]

View File

@@ -400,7 +400,7 @@
searchrecordslimit: '{{ previousconfig.config.searchrecordslimit | default(100) | int }}'
usersearch: '{{ previousconfig.config.usersearch | default(omit) }}'
groupsearch: '{{ previousconfig.config.groupsearch | default(omit) }}'
enable_migration: '{{ previousconfig.config.enable_migration | default(False) | bool }}'
enable_migration: '{{ omit if previousconfig.config.enable_migration is not defined else (previousconfig.config.enable_migration | bool) }}'
groupobjectclasses: '{{ previousconfig.config.groupobjectclasses | default(omit) }}'
userobjectclasses: '{{ previousconfig.config.userobjectclasses | default(omit) }}'
pwdexpnotify: '{{ previousconfig.config.pwdexpnotify | default(4) | int }}'
@@ -436,7 +436,7 @@
searchrecordslimit: '{{ previousconfig.config.searchrecordslimit | default(omit) | int }}'
usersearch: '{{ previousconfig.config.usersearch | default(omit) }}'
groupsearch: '{{ previousconfig.config.groupsearch | default(omit) }}'
enable_migration: '{{ previousconfig.config.enable_migration | default(omit) | bool }}'
enable_migration: '{{ omit if previousconfig.config.enable_migration is not defined else (previousconfig.config.enable_migration | bool) }}'
groupobjectclasses: '{{ previousconfig.config.groupobjectclasses | default(omit) }}'
userobjectclasses: '{{ previousconfig.config.userobjectclasses | default(omit) }}'
pwdexpnotify: '{{ previousconfig.config.pwdexpnotify | default(omit) | int }}'
@@ -473,7 +473,7 @@
searchrecordslimit: '{{ previousconfig.config.searchrecordslimit | default(omit) | int }}'
usersearch: '{{ previousconfig.config.usersearch | default(omit) }}'
groupsearch: '{{ previousconfig.config.groupsearch | default(omit) }}'
enable_migration: '{{ previousconfig.config.enable_migration | default(omit) | bool }}'
enable_migration: '{{ omit if previousconfig.config.enable_migration is not defined else (previousconfig.config.enable_migration | bool) }}'
groupobjectclasses: '{{ previousconfig.config.groupobjectclasses | default(omit) }}'
userobjectclasses: '{{ previousconfig.config.userobjectclasses | default(omit) }}'
pwdexpnotify: '{{ previousconfig.config.pwdexpnotify | default(omit) | int }}'